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

#include <command_worker.h>

Public Member Functions

 CommandWorker (VirtualDeviceManager &vdm, Notifier &notifier, IncomingMachineMessage &incoming_machine_message)
 
void run ()
 Execute the Command Worker. More...
 
MachineMessage::Protocol get_protocol () const
 Get the protocol of the client that has sent the request (command) Command Worker is working on. More...
 
const std::string & get_connection_id () const
 Get the ID of the client that has sent the request (command) Command Worker is working on. More...
 
moodycamel::ReaderWriterQueue< motionmaster::MotionMasterMessage > & get_status_queue ()
 Get all of the Status messages meant for the client. More...
 
bool is_done ()
 Check if the Command Worker is done processing the request (command) More...
 
MotionMasterError get_error ()
 Get the current error (if any) More...
 
void abort_motion_operations ()
 

Constructor & Destructor Documentation

◆ CommandWorker()

CommandWorker::CommandWorker ( VirtualDeviceManager vdm,
Notifier notifier,
IncomingMachineMessage incoming_machine_message 
)

Member Function Documentation

◆ abort_motion_operations()

void CommandWorker::abort_motion_operations ( )

◆ get_connection_id()

const std::string & CommandWorker::get_connection_id ( ) const

Get the ID of the client that has sent the request (command) Command Worker is working on.

Returns
the client id

◆ get_error()

MotionMasterError CommandWorker::get_error ( )

Get the current error (if any)

Returns
current error if any

◆ get_protocol()

MachineMessage::Protocol CommandWorker::get_protocol ( ) const

Get the protocol of the client that has sent the request (command) Command Worker is working on.

Returns
the client protocol

◆ get_status_queue()

moodycamel::ReaderWriterQueue< motionmaster::MotionMasterMessage > & CommandWorker::get_status_queue ( )

Get all of the Status messages meant for the client.

Returns
moodycamel::ReaderWriterQueue of (protobuf) Status messages

◆ is_done()

bool CommandWorker::is_done ( )

Check if the Command Worker is done processing the request (command)

Returns
true if done, false otherwise

◆ run()

void CommandWorker::run ( )

Execute the Command Worker.

Attention
Filter out all of the internal PDO mapping placeholders when sending the parameter info to the clients

All of the internal PDO mapping OD entries have exactly 10 entries, but most of them are placeholders in order to enable Motion Master to manipulate them. Since they actually do not exist on the slave side, if a PDO mapping OD entry at subindex 0 is set to a value less than 10, only send that many parameters back to the client.


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