fesa-core  4.2.0
fesa::NotificationProducer Class Reference

this class is responsible for sending notification messages to the notification consumer, thus connecting the RT and server parts More...

#include <NotificationProducer.h>

Inheritance diagram for fesa::NotificationProducer:
fesa::HasMetrics

Public Member Functions

void sendAutomaticNotification (const uint32_t &notificationID, boost::shared_ptr< MultiplexingContext > &muxContext, const std::string &className, uint32_t msgPrio=DEFAULT_MQ_PRIO)
 this generates an automatic notification msg and puts it on the queue More...
 
void sendManualNotification (const ManualNotificationMessage &message)
 
void sendCommandMessage (const std::string &command, const std::string &parameter1, const std::string &parameter2, uint32_t msgPrio=DEFAULT_MQ_PRIO)
 this generates a sendCommandMessage and puts it on the queue More...
 
std::size_t getCurrentMsgCount ()
 returns the number of Messages, which are stored in the notification queue. More...
 
bool canSendNotification () const
 
- Public Member Functions inherited from fesa::HasMetrics
 HasMetrics (const std::string &componentName)
 

Static Public Member Functions

static NotificationProducergetInstance ()
 returns the single instance of this Object
 

Additional Inherited Members

- Protected Member Functions inherited from fesa::HasMetrics
template<typename T >
void registerMetric (const std::string &name, T &value)
 
template<typename T >
void registerMetric (const std::string &name, boost::atomic< T > &value)
 

Detailed Description

this class is responsible for sending notification messages to the notification consumer, thus connecting the RT and server parts

Member Function Documentation

bool fesa::NotificationProducer::canSendNotification ( ) const

Returns true if notifications can be sent; otherwise returns false. Notifications cannot be sent if the server part is not up.

std::size_t fesa::NotificationProducer::getCurrentMsgCount ( )
inline

returns the number of Messages, which are stored in the notification queue.

Returns
the current Message count
void fesa::NotificationProducer::sendAutomaticNotification ( const uint32_t &  notificationID,
boost::shared_ptr< MultiplexingContext > &  muxContext,
const std::string &  className,
uint32_t  msgPrio = DEFAULT_MQ_PRIO 
)

this generates an automatic notification msg and puts it on the queue

Parameters
notificationIDthe Notification, which should be triggered on the Server side
muxContextThe Multiplexing Context for the Msg ( cycle-number )
classNameThe name of the FESA class that sends the notification
msgPrioThe Message Priority ( always set to DEFAULT_MQ_PRIO )
void fesa::NotificationProducer::sendCommandMessage ( const std::string &  command,
const std::string &  parameter1,
const std::string &  parameter2,
uint32_t  msgPrio = DEFAULT_MQ_PRIO 
)

this generates a sendCommandMessage and puts it on the queue

Parameters
commandThe name of the command
parameter1of the command as string
parameter2of the command as string
msgPrioThe Message Priority ( always set to DEFAULT_MQ_PRIO )
void fesa::NotificationProducer::sendManualNotification ( const ManualNotificationMessage &  message)

Sends a ManualNotificationMessage.

Parameters
messagethe manual notification message

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