-void ArduControl::push_command(const PendingCommand &cmd)
-{
- MutexLock lock(mutex);
- command_queue.push_back(cmd);
-}
-
-bool ArduControl::pop_command(PendingCommand &cmd)
-{
- MutexLock lock(mutex);
- if(command_queue.empty())
- return false;
- cmd = command_queue.front();
- command_queue.pop_front();
- return true;
-}
-
-void ArduControl::push_completed_tag(const Tag &tag)
-{
- MutexLock lock(mutex);
- completed_commands.push_back(tag);
-}
-
-ArduControl::Tag ArduControl::pop_completed_tag()
-{
- MutexLock lock(mutex);
- if(completed_commands.empty())
- return Tag();
- Tag tag = completed_commands.front();
- completed_commands.pop_front();
- return tag;
-}
-