Motion Master
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
SignalGeneratorMachine Class Reference

#include <signal_generator_machine.h>

Inheritance diagram for SignalGeneratorMachine:
Inheritance graph
[legend]
Collaboration diagram for SignalGeneratorMachine:
Collaboration graph
[legend]

Public Member Functions

 SignalGeneratorMachine (VirtualDeviceManager &vdm, ctpl::thread_pool &thread_pool, Notifier &notifier, moodycamel::ReaderWriterQueue< OutgoingMachineMessage > &outgoing_machine_message_queue)
 
void execute (uint64_t pending_signals) override
 Execute the machine. More...
 
void abort_client_requests (const std::string &connection_id) override
 Abort all of the requests a certain client has issues. More...
 
bool done () override
 Check if all of the machine started processes are done (including the Command Workers) More...
 
- Public Member Functions inherited from Machine
void add_message (IncomingMachineMessage &incoming_machine_message)
 Add a new incoming machine message to the queue. More...
 
virtual void execute (uint64_t pending_signals)=0
 Execute the machine. More...
 
virtual void abort_client_requests (const std::string &connection_id)=0
 Abort all of the requests a certain client has issues. More...
 
bool command_workers_done ()
 Check if all started Command Workers are done. More...
 
virtual bool done ()=0
 Check if all of the machine started processes are done (including the Command Workers) More...
 

Additional Inherited Members

- Protected Member Functions inherited from Machine
 Machine (VirtualDeviceManager &vdm, ctpl::thread_pool &thread_pool, Notifier &notifier, moodycamel::ReaderWriterQueue< OutgoingMachineMessage > &outgoing_machine_message_queue)
 
virtual ~Machine ()
 
void start_command_worker (IncomingMachineMessage &incoming_machine_message)
 
void process_command_workers (std::function< void(CommandWorker *)> process=nullptr)
 Process all of the available Command Workers. More...
 
void send_response (MachineMessage::Protocol protocol, std::string connection_id, motionmaster::MotionMasterMessage &message)
 Send the response (Status protobuf message) to the proper client. More...
 
- Protected Attributes inherited from Machine
VirtualDeviceManagervdm_
 
ctpl::thread_pool & thread_pool_
 
std::queue< IncomingMachineMessageincoming_message_queue_
 
Notifiernotifier_
 

Constructor & Destructor Documentation

◆ SignalGeneratorMachine()

SignalGeneratorMachine::SignalGeneratorMachine ( VirtualDeviceManager vdm,
ctpl::thread_pool &  thread_pool,
Notifier notifier,
moodycamel::ReaderWriterQueue< OutgoingMachineMessage > &  outgoing_machine_message_queue 
)

Member Function Documentation

◆ abort_client_requests()

void SignalGeneratorMachine::abort_client_requests ( const std::string &  connection_id)
overridevirtual

Abort all of the requests a certain client has issues.

Parameters
connection_idclient connection ID

Implements Machine.

◆ done()

bool SignalGeneratorMachine::done ( )
overridevirtual

Check if all of the machine started processes are done (including the Command Workers)

Returns
true if all of the processes are done, false otherwise

Implements Machine.

◆ execute()

void SignalGeneratorMachine::execute ( uint64_t  pending_signals)
overridevirtual

Execute the machine.

Parameters
pending_signalsnumber of time intervals that passed since the last call to this function

Send all queued Axis execution messages (e.g. warnings)

Attention
Send only one of the queued execution status messages on each pass in order to avoid holding up the main machine thread. Since the main machine thread is executing each millisecond, this is more than enough to send out all of the accumulated execution status messages.

Implements Machine.


The documentation for this class was generated from the following files: