this class is responsible for sending notification messages to the notification consumer, thus connecting the RT and server parts More...
#include <NotificationProducer.h>
Public Member Functions | |
void | sendAutomaticNotification (const uint32_t ¬ificationID, MultiplexingContext &muxContext, uint32_t msgPrio=DEFAULT_MQ_PRIO) |
this generates a automatic notification msg and puts it on the queue | |
void | sendManualNotification (ManualNotificationMessage &manMsg) |
this puts a ManualNotificationMessage on the queue. | |
void | sendCommandMessage (const std::string &command, const std::string ¶meter1, const std::string ¶meter2, uint32_t msgPrio=DEFAULT_MQ_PRIO) |
this generates a sendCommandMessage and puts it on the queue | |
uint32_t | getCurrentMsgCount () |
returns the number of Messages, which are stored in the notification queue. | |
Static Public Member Functions | |
static NotificationProducer * | getInstance () |
returns the single instance of this Object | |
Private Member Functions | |
NotificationProducer (const std::string &queueName) | |
queueName name of the queue | |
NotificationProducer (const NotificationProducer &other) | |
copy constructor | |
NotificationProducer & | operator= (const NotificationProducer &other) |
~NotificationProducer () | |
Static Private Member Functions | |
static void | releaseInstance () |
releases the singleton instance .. only done by the Abstract Equipment, therefor ptivat + friend | |
Private Attributes | |
AbstractMsgQueue * | msgQueuePtr_ |
Static Private Attributes | |
static NotificationProducer * | theInstance_ = NULL |
the single instance of the concrete NotificationProducer | |
Friends | |
class | AbstractEquipment |
this class is responsible for sending notification messages to the notification consumer, thus connecting the RT and server parts
Definition at line 22 of file NotificationProducer.h.
fesa::NotificationProducer::NotificationProducer | ( | const std::string & | queueName | ) | [private] |
queueName name of the queue
Constructor
Definition at line 31 of file NotificationProducer.cpp.
References fesa::DiagnosticUtils::framework, getInstance(), fesa::MsgQueueFactory::getOrCreateMsgQueue(), fesa::DiagnosticUtils::DiagnosticMessage::msg, fesa::PropertyTag::MSG_NUM_MAX, msgQueuePtr_, and fesa::DiagnosticUtils::DiagnosticMessage::side.
Referenced by getInstance().
fesa::NotificationProducer::NotificationProducer | ( | const NotificationProducer & | other | ) | [private] |
copy constructor
fesa::NotificationProducer::~NotificationProducer | ( | ) | [private] |
destructor
Definition at line 44 of file NotificationProducer.cpp.
uint32_t fesa::NotificationProducer::getCurrentMsgCount | ( | ) | [inline] |
returns the number of Messages, which are stored in the notification queue.
Definition at line 103 of file NotificationProducer.h.
References fesa::AbstractMsgQueue::getCurrentMsgCount(), and msgQueuePtr_.
NotificationProducer * fesa::NotificationProducer::getInstance | ( | ) | [static] |
returns the single instance of this Object
Definition at line 148 of file NotificationProducer.cpp.
References fesa::AbstractEquipment::getEquipmentName(), NotificationProducer(), and theInstance_.
Referenced by fesa::AbstractRTAction::AbstractRTAction(), fesa::AbstractServerAction::AbstractServerAction(), NotificationProducer(), sendAutomaticNotification(), sendManualNotification(), fesa::ServiceLocatorServerSplitImplementation::triggerPersistency(), fesa::ServiceLocatorRealtimeSplitImplementation::triggerPersistency(), and fesa::ServiceLocatorUnsplitImplementation::triggerPersistency().
NotificationProducer& fesa::NotificationProducer::operator= | ( | const NotificationProducer & | other | ) | [private] |
void fesa::NotificationProducer::releaseInstance | ( | ) | [static, private] |
releases the singleton instance .. only done by the Abstract Equipment, therefor ptivat + friend
Definition at line 158 of file NotificationProducer.cpp.
References theInstance_.
void fesa::NotificationProducer::sendAutomaticNotification | ( | const uint32_t & | notificationID, | |
MultiplexingContext & | muxContext, | |||
uint32_t | msgPrio = DEFAULT_MQ_PRIO | |||
) |
this generates a automatic notification msg and puts it on the queue
notificationID | the Notification, which should be triggered on the Server side | |
muxContext | The Multiplexing Context for the Msg ( cycle-number ) | |
msgPrio | The Message Priority ( always set to DEFAULT_MQ_PRIO ) |
Definition at line 48 of file NotificationProducer.cpp.
References fesa::AbstractMsgQueue::checkState(), getInstance(), fesa::AbstractEquipment::getInstance(), fesa::FesaException::getMessage(), fesa::AbstractMsgQueue::getQueueName(), msgQueuePtr_, fesa::EquipmentData::notificationFailure_, fesa::AbstractMsgQueue::postMsg(), fesa::SIGFESA_NOTIFICATION_FAILURE, fesa::EquipmentData::srvProcessPid_, and fesa::unsplit.
Referenced by fesa::AbstractRTAction::executeAction().
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
command | The name of the command | |
parameter1 | of the command as string | |
parameter2 | of the command as string | |
msgPrio | The Message Priority ( always set to DEFAULT_MQ_PRIO ) |
Definition at line 123 of file NotificationProducer.cpp.
References fesa::AbstractMsgQueue::checkState(), fesa::AbstractEquipment::getInstance(), fesa::FesaException::getMessage(), fesa::AbstractMsgQueue::getQueueName(), msgQueuePtr_, fesa::AbstractMsgQueue::postMsg(), and fesa::unsplit.
Referenced by fesa::ServiceLocatorServerSplitImplementation::triggerPersistency(), fesa::ServiceLocatorRealtimeSplitImplementation::triggerPersistency(), and fesa::ServiceLocatorUnsplitImplementation::triggerPersistency().
void fesa::NotificationProducer::sendManualNotification | ( | ManualNotificationMessage & | manMsg | ) |
this puts a ManualNotificationMessage on the queue.
manMsg | Put in your manual notification message here | |
muxContext | The Multiplexing Context for the Msg | |
msgPrio | The Message Priority ( always set to DEFAULT_MQ_PRIO ) |
Definition at line 90 of file NotificationProducer.cpp.
References fesa::AbstractMsgQueue::checkState(), getInstance(), fesa::AbstractEquipment::getInstance(), fesa::FesaException::getMessage(), fesa::AbstractMsgQueue::getQueueName(), msgQueuePtr_, fesa::ManualNotificationMessage::muxContext_, fesa::EquipmentData::notificationFailure_, fesa::AbstractMsgQueue::postMsg(), fesa::AbstractMessage::prio_, fesa::SIGFESA_NOTIFICATION_FAILURE, fesa::EquipmentData::srvProcessPid_, and fesa::unsplit.
Referenced by fesa::AbstractServerAction::notify(), and fesa::AbstractRTAction::sendManualNotification().
friend class AbstractEquipment [friend] |
Definition at line 100 of file NotificationProducer.h.
The Pointer to the Notification Queue
Definition at line 74 of file NotificationProducer.h.
Referenced by getCurrentMsgCount(), NotificationProducer(), sendAutomaticNotification(), sendCommandMessage(), and sendManualNotification().
NotificationProducer * fesa::NotificationProducer::theInstance_ = NULL [static, private] |
the single instance of the concrete NotificationProducer
Definition at line 79 of file NotificationProducer.h.
Referenced by getInstance(), and releaseInstance().