33 virtual void execute(uint64_t pending_signals) = 0;
67 outgoing_machine_message_queue);
99 std::string connection_id,
100 motionmaster::MotionMasterMessage& message);
104 outgoing_machine_message_queue_;
105 std::list<CommandWorker*> command_workers_;
Definition command_worker.h:15
Definition incoming_machine_message.h:5
Protocol
Definition machine_message.h:9
Notifier & notifier_
Definition machine.h:74
void process_command_workers(std::function< void(CommandWorker *)> process=nullptr)
Process all of the available Command Workers.
Definition machine.cc:31
ctpl::thread_pool & thread_pool_
Definition machine.h:72
VirtualDeviceManager & vdm_
Definition machine.h:71
virtual void abort_client_requests(const std::string &connection_id)=0
Abort all of the requests a certain client has issues.
Definition machine.cc:71
virtual ~Machine()
Definition machine.cc:16
virtual bool done()=0
Check if all of the machine started processes are done (including the Command Workers)
std::queue< IncomingMachineMessage > incoming_message_queue_
Definition machine.h:73
void send_response(MachineMessage::Protocol protocol, std::string connection_id, motionmaster::MotionMasterMessage &message)
Send the response (Status protobuf message) to the proper client.
Definition machine.cc:81
virtual void execute(uint64_t pending_signals)=0
Execute the machine.
void start_command_worker(IncomingMachineMessage &incoming_machine_message)
Definition machine.cc:62
void add_message(IncomingMachineMessage &incoming_machine_message)
Add a new incoming machine message to the queue.
Definition machine.cc:58
Machine(VirtualDeviceManager &vdm, ctpl::thread_pool &thread_pool, Notifier ¬ifier, mm::core::containers::ThreadSafeQueue< OutgoingMachineMessage > &outgoing_machine_message_queue)
Definition machine.cc:7
bool command_workers_done()
Check if all started Command Workers are done.
Definition machine.cc:79
Definition virtual_device_manager.h:16
Thread-safe FIFO queue with optional capacity limit.
Definition thread_safe_queue.h:23