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

#include <notifier.h>

Public Member Functions

void send_slave_warning (uint32_t device_address, int32_t device_id, int32_t code, const std::string &additional_info="")
 Send a slave warning message over ZeroMQ. More...
 
void send_slave_error (uint32_t device_address, int32_t device_id, int32_t code, const std::string &additional_info="")
 Send a slave error message over ZeroMQ. More...
 
void send_status (motionmaster::MotionMasterMessage::Status *status, std::string topic="")
 Send a status message. More...
 
void send_monitoring_status (motionmaster::MotionMasterMessage::Status *status)
 Send a monitoring status message. More...
 
void send_notification_status (motionmaster::MotionMasterMessage::Status *status)
 Send a notification status message. More...
 
void send_mm_state_waiting_for_slaves ()
 Send a notification over ZeroMQ that Motion Master is waiting for slaves. More...
 
void send_mm_state_slaves_found ()
 Send a notification over ZeroMQ that Motion Master has found slaves. More...
 
void send_mm_state_initializing ()
 Send a notification over ZeroMQ that Motion Master is initializing. More...
 
void send_mm_state_initialized ()
 Send a notification over ZeroMQ that Motion Master has initialized. More...
 
void send_mm_state_deinitializing ()
 Send a notification over ZeroMQ that Motion Master is deinitializing. More...
 
void send_mm_state_deinitialized ()
 Send a notification over ZeroMQ that Motion Master has deinitialized. More...
 
void send_mm_state_terminating ()
 Send a notification over ZeroMQ that Motion Master is being terminated. More...
 
bool has_notification ()
 Check if there are any pending notifications. More...
 
bool get_next_notification (OutgoingMachineMessage &message)
 Get the next notification from the notification queue. More...
 

Member Function Documentation

◆ get_next_notification()

bool Notifier::get_next_notification ( OutgoingMachineMessage message)

Get the next notification from the notification queue.

Used by the Server to get the notifications in order to forward them to the clients. A simple queue is used that has a mutex lock which may, or may not be successfully obtained at the moment of checking.

Parameters
messageoutput parameter
Returns
true if a notification has been successfully fetched, false if not

◆ has_notification()

bool Notifier::has_notification ( )

Check if there are any pending notifications.

Returns
true if there are pending notifications, false otherwise

◆ send_mm_state_deinitialized()

void Notifier::send_mm_state_deinitialized ( )

Send a notification over ZeroMQ that Motion Master has deinitialized.

◆ send_mm_state_deinitializing()

void Notifier::send_mm_state_deinitializing ( )

Send a notification over ZeroMQ that Motion Master is deinitializing.

◆ send_mm_state_initialized()

void Notifier::send_mm_state_initialized ( )

Send a notification over ZeroMQ that Motion Master has initialized.

◆ send_mm_state_initializing()

void Notifier::send_mm_state_initializing ( )

Send a notification over ZeroMQ that Motion Master is initializing.

◆ send_mm_state_slaves_found()

void Notifier::send_mm_state_slaves_found ( )

Send a notification over ZeroMQ that Motion Master has found slaves.

◆ send_mm_state_terminating()

void Notifier::send_mm_state_terminating ( )

Send a notification over ZeroMQ that Motion Master is being terminated.

Create a Google Protocol Buffers terminating process message and send it over ZeroMQ

◆ send_mm_state_waiting_for_slaves()

void Notifier::send_mm_state_waiting_for_slaves ( )

Send a notification over ZeroMQ that Motion Master is waiting for slaves.

◆ send_monitoring_status()

void Notifier::send_monitoring_status ( motionmaster::MotionMasterMessage::Status *  status)

Send a monitoring status message.

Parameters
statusthe Motion Master API status message

◆ send_notification_status()

void Notifier::send_notification_status ( motionmaster::MotionMasterMessage::Status *  status)

Send a notification status message.

Parameters
statusthe Motion Master API status message

◆ send_slave_error()

void Notifier::send_slave_error ( uint32_t  device_address,
int32_t  device_id,
int32_t  code,
const std::string &  additional_info = "" 
)

Send a slave error message over ZeroMQ.

Create a Google Protocol Buffers error log message and send it over ZeroMQ

Parameters
device_addressdevice address
device_iddevice ID
codeerror code
additional_infoany additional information

◆ send_slave_warning()

void Notifier::send_slave_warning ( uint32_t  device_address,
int32_t  device_id,
int32_t  code,
const std::string &  additional_info = "" 
)

Send a slave warning message over ZeroMQ.

Create a Google Protocol Buffers warning log message and send it over ZeroMQ

Parameters
device_addressdevice address
device_iddevice ID
codewarning code
additional_infoany additional information

◆ send_status()

void Notifier::send_status ( motionmaster::MotionMasterMessage::Status *  status,
std::string  topic = "" 
)

Send a status message.

Parameters
statusthe Motion Master API status message
topica topic to send the status message to

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