OpenJAUS Software Development Kit  4.3.1
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
openjaus::core::services::Events Class Reference

Provides static methods for the Events service. More...

#include <Events.h>

Inherits openjaus::core::EventsInterface, and openjaus::core::services::Transport.

Inherited by openjaus::core::Events [virtual], openjaus::core::services::AccessControl [virtual], openjaus::core::services::Configuration [virtual], openjaus::core::services::Discovery [virtual], openjaus::core::services::DiscoveryClient [virtual], openjaus::core::services::Liveness [virtual], openjaus::hmi::services::AnalogControl [virtual], openjaus::hmi::services::Drawing [virtual], openjaus::hmi::services::Keyboard [virtual], openjaus::hmi::services::PointingDevice [virtual], openjaus::manipulator::services::ManipulatorJointForceTorqueSensor [virtual], openjaus::manipulator::services::ManipulatorJointPositionSensor [virtual], openjaus::manipulator::services::ManipulatorJointVelocitySensor [virtual], openjaus::manipulator::services::PanTiltJointPositionSensor [virtual], openjaus::manipulator::services::PanTiltJointVelocitySensor [virtual], openjaus::mobility::services::AccelerationStateSensor [virtual], openjaus::mobility::services::VelocityStateSensor [virtual], and openjaus::ugv::services::PlatformSpecifications [virtual].

Classes

class  Callback
 
struct  PublishedEventMetadata
 

Public Member Functions

 Events ()
 
virtual ~Events ()
 
virtual bool createEvent (CreateEvent *createEvent)
 CreateEvent action with input CreateEvent. More...
 
virtual bool processEvent (ProcessEventRequest *processEventRequest)
 ProcessEvent action with input ProcessEventRequest. More...
 
virtual bool resetEventTimer (CreateEvent *createEvent)
 ResetEventTimer action with input CreateEvent. More...
 
virtual bool resetEventTimer (UpdateEvent *updateEvent)
 ResetEventTimer action with input UpdateEvent. More...
 
virtual bool updateEvent (CreateEvent *createEvent)
 UpdateEvent action with input CreateEvent. More...
 
virtual bool updateEvent (UpdateEvent *updateEvent)
 UpdateEvent action with input UpdateEvent. More...
 
virtual bool cancelEvent (CancelEvent *cancelEvent)
 CancelEvent action with input CancelEvent. More...
 
virtual bool stopEventTimer (CancelEvent *cancelEvent)
 StopEventTimer action with input CancelEvent. More...
 
virtual RejectEventRequest getRejectEventRequest (CreateEvent *createEvent)
 Send action for RejectEventRequest with input message CreateEvent. More...
 
virtual RejectEventRequest getRejectEventRequest (UpdateEvent *updateEvent)
 Send action for RejectEventRequest with input message UpdateEvent. More...
 
virtual RejectEventRequest getRejectEventRequest (CancelEvent *cancelEvent)
 Send action for RejectEventRequest with input message CancelEvent. More...
 
virtual ConfirmEventRequest getConfirmEventRequest (CreateEvent *createEvent)
 Send action for ConfirmEventRequest with input message CreateEvent. More...
 
virtual ConfirmEventRequest getConfirmEventRequest (UpdateEvent *updateEvent)
 Send action for ConfirmEventRequest with input message UpdateEvent. More...
 
virtual ConfirmEventRequest getConfirmEventRequest (CancelEvent *cancelEvent)
 Send action for ConfirmEventRequest with input message CancelEvent. More...
 
virtual ReportEvents getReportEvents (QueryEvents *queryEvents)
 Send action for ReportEvents with input message QueryEvents. More...
 
virtual ReportEventTimeout getReportEventTimeout (QueryEventTimeout *queryEventTimeout)
 Send action for ReportEventTimeout with input message QueryEventTimeout. More...
 
virtual bool confirmEvent (ConfirmEventRequest *confirmEventRequest)
 ConfirmEvent action with input ConfirmEventRequest. More...
 
virtual bool rejectEvent (RejectEventRequest *rejectEventRequest)
 RejectEvent action with input RejectEventRequest. More...
 
virtual bool handleIncomingEvent (Event *event)
 HandleIncomingEvent action with input Event. More...
 
virtual bool handleReportEvents (ReportEvents *reportEvents)
 HandleReportEvents action with input ReportEvents. More...
 
virtual bool isSupported (CreateEvent *createEvent)
 isSupported condition. More...
 
virtual bool isSupported (UpdateEvent *updateEvent)
 isSupported condition. More...
 
virtual bool eventExists (CreateEvent *createEvent)
 eventExists condition. More...
 
virtual bool eventExists (UpdateEvent *updateEvent)
 eventExists condition. More...
 
virtual bool eventExists (CancelEvent *cancelEvent)
 eventExists condition. More...
 
bool createOutgoingPeriodicEvent (uint8_t eventId, double rateHz, model::Message *query)
 
bool createOutgoingOnChangeEvent (uint8_t eventId, model::Message *query)
 
OPENJAUS_DEPRECATED bool publish (model::Message *message)
 
OPENJAUS_DEPRECATED bool unpublish (model::Message *message)
 
OPENJAUS_DEPRECATED bool publish (uint16 messageId)
 
bool publish (uint16 messageId, double maximumRate_Hz, model::ConnectionType type)
 
bool unpublish (uint16 messageId)
 
bool notifyChanged (uint16 messageId)
 
uint32_t subscribePeriodic (transport::Address &address, model::Message *query, double rate_Hz)
 
uint32_t subscribePeriodic (transport::Address &address, model::Message *query, double rate_Hz, void(*subscribeCallback)(const model::EventRequestResponseArgs &args))
 
uint32_t subscribePeriodic (transport::Address &address, model::Message *query, double rate_Hz, void(*subscribeCallback)(void *object, const model::EventRequestResponseArgs &args), void *object)
 
uint32_t subscribeOnChange (transport::Address &address, model::Message *query)
 
uint32_t subscribeOnChange (transport::Address &address, model::Message *query, void(*subscribeCallback)(const model::EventRequestResponseArgs &args))
 
uint32_t subscribeOnChange (transport::Address &address, model::Message *query, void(*subscribeCallback)(void *object, const model::EventRequestResponseArgs &args), void *object)
 
bool unsubscribe (uint32_t subscriptionId)
 
bool unsubscribe (uint32_t subscriptionId, void(*callback)(const model::EventRequestResponseArgs &args))
 
bool unsubscribe (uint32_t subscriptionId, void(*callback)(void *object, const model::EventRequestResponseArgs &args), void *object)
 
bool isActive (uint32 subscriptionId)
 
uint8 getEventId (uint32 subscriptionId)
 
double getConfirmedRate_Hz (uint32 subscriptionId)
 
bool updatePeriodic (uint32 subscriptionId, double rate_Hz)
 
- Public Member Functions inherited from openjaus::core::EventsInterface
virtual ~EventsInterface ()
 
- Public Member Functions inherited from openjaus::core::TransportInterface
virtual ~TransportInterface ()
 
- Public Member Functions inherited from openjaus::core::services::Transport
 Transport ()
 
virtual ~Transport ()
 
virtual bool enqueue (model::Trigger *trigger)
 Convert the destination address into an unsigned integer such that the ComponentID maps to the least significant byte, NodeID to the next least significant byte and SubsystemID maps onto the remaining two bytes of the integer. More...
 
virtual bool broadcastLocalEnqueue (model::Trigger *trigger)
 Package the message as specified by the transport layer specification and send it to all endpoints in the local subsystem. More...
 
virtual bool broadcastGlobalEnqueue (model::Trigger *trigger)
 Package the message as specified by the transport layer specification and send it to all endpoints on all subsystems. More...
 
virtual bool sendMessage (model::Trigger *trigger)
 SendMessage action with input SendMessage. More...
 
virtual bool broadcastToNode (model::Trigger *trigger)
 Broadcasts message to all components within the local node Broadcasts message to all components within the local node. More...
 
virtual bool broadcastToSubsystem (model::Trigger *trigger)
 Broadcasts a given message to all nodes in the local subsystem (equivalent to broadcast local enqueue) Broadcasts a given message to all nodes in the local subsystem (equivalent to broadcast local enqueue) More...
 
virtual bool broadcastToSystem (model::Trigger *trigger)
 Broadcasts the message to all subsystems on the JAUS network (equivalent to broadcast global enqueue) Broadcasts the message to all subsystems on the JAUS network (equivalent to broadcast global enqueue) More...
 
virtual bool checkTransportPolicy (model::Trigger *trigger)
 CheckTransportPolicy action with input CheckTransportPolicy. More...
 
virtual ReportTransportPolicy getReportTransportPolicy (QueryTransportPolicy *queryTransportPolicy)
 Send action for ReportTransportPolicy with input message QueryTransportPolicy. More...
 
virtual bool storeTransportPolicy (ReportTransportPolicy *reportTransportPolicy)
 StoreTransportPolicy action with input ReportTransportPolicy. More...
 
model::StategetCurrentState ()
 
void addAckNakCallback (void(*callback)(const transport::AckNakEventArgs &args))
 Adds a static callback that will execute when an ACK/NAK events occurs on the JUDP Interface. More...
 
void addAckNakCallback (void(*callback)(void *object, const transport::AckNakEventArgs &args), void *object)
 Adds a class callback that will execute when an ACK/NAK events occurs on the JUDP Interface. More...
 
template<class MessageType , class CallbackClass >
void addMessageCallback (bool(CallbackClass::*callback)(MessageType &messageRef), CallbackClass *object)
 
template<class CallbackClass >
void addMessageCallback (bool(CallbackClass::*callback)(model::Trigger *trigger), CallbackClass *object)
 
template<class MessageType >
void addMessageCallback (bool(*callback)(MessageType &messageRef))
 

Static Public Member Functions

static const char * uri ()
 The URI for the Service. More...
 
static model::Servicecreate ()
 Builds a default instance of the Events Service and populates the URI and Version numbers. More...
 
- Static Public Member Functions inherited from openjaus::core::EventsInterface
static OPENJAUS_DEPRECATED model::Service EventsService ()
 Builds a default instance of the Events Service and populates the URI and Version numbers. More...
 
static OPENJAUS_DEPRECATED std::string EventsUri ()
 Static accessor for Service URI. More...
 
- Static Public Member Functions inherited from openjaus::core::TransportInterface
static OPENJAUS_DEPRECATED model::Service TransportService ()
 Builds a default instance of the Transport Service and populates the URI and Version numbers. More...
 
static OPENJAUS_DEPRECATED std::string TransportUri ()
 Static accessor for Service URI. More...
 
- Static Public Member Functions inherited from openjaus::core::services::Transport
static const char * uri ()
 The URI for the Service. More...
 
static model::Servicecreate ()
 Builds a default instance of the Transport Service and populates the URI and Version numbers. More...
 

Protected Member Functions

void configure (EventsSettingsInterface *settings)
 
void startService ()
 
void stopService ()
 
- Protected Member Functions inherited from openjaus::core::services::Transport
void configure (services::TransportSettingsInterface *settings)
 
void setComponentAddress (transport::Address *address)
 
void setReceiveQueue (system::PriorityQueue *queue)
 
void setSubsInterface (transport::Interface *interface)
 
void setNodeInterface (transport::Interface *interface)
 
void setComponentInterface (transport::Interface *interface)
 
void setJtcpInterface (transport::AS5669::JtcpInterface *interface)
 
void fireEvent (model::InternalEvent *event)
 
void sendToSelf (transport::Wrapper *wrapper)
 
transport::Address *& getComponentAddress ()
 

Private Member Functions

void configureEventsService ()
 
bool isSupported (EventTypeEnumeration::EventTypeEnum type, model::Message *query, double requestedRate_Hz)
 
void timerEvent (system::Timer *timer)
 
uint32_t subscribeIncoming (model::ConnectionType type, double rate_Hz, transport::Address &address, model::Message *query, Events::Callback *callback)
 
int16 getRequestId (const model::Connection &connection)
 
int32_t requestIncomingConnection (const model::Connection &connection, int16 &requestId, Events::Callback *callback)
 
int32_t getSubscriptionId (int16 requestId)
 
void sendCreateEventMessage (int16 requestId, const model::Connection &connection)
 
bool unsubscribeIncoming (uint32_t subscriptionId, Events::Callback *callback)
 
void sendCancelEventMessage (model::Connection *connection)
 
bool tryGetRequestInfo (int16 requestId, model::ConnectionRequestInfo &requestInfo)
 
bool tryGetConnection (uint32_t eventId, model::Connection *&connection)
 
bool createIncomingConnection (model::ConnectionRequestInfo &requestInfo, core::ConfirmEventRequest *confirmEventRequest)
 
bool cancelIncomingConnection (model::ConnectionRequestInfo &requestInfo)
 
bool updateIncomingConnection (model::ConnectionRequestInfo &requestInfo, core::ConfirmEventRequest *confirmEventRequest)
 
void rejectIncomingConnection (model::ConnectionRequestInfo &requestInfo, core::RejectEventRequest *rejectEventRequest)
 
uint8_t getAvailableUniqueEventId ()
 
uint8_t getAvailableRequestId ()
 
std::vector< PublishedEventMetadata >::iterator findEventMetadata (uint16 messageId)
 
double findSupportedPeriodicRate_Hz (uint16 queryId)
 
void cancelOutgoingPeriodicEvents ()
 
void cancelIncomingPeriodicEvents ()
 
void deleteOutgoingPeriodicTimers ()
 
void deletePendingRequest (model::Connection *connection)
 
void deleteConnectionRequest (model::Connection *connection)
 
void deleteIncomingConnection (model::Connection *connection)
 

Static Private Member Functions

static void executeConnectionCallback (model::Connection *connection, std::map< uint32_t, Events::Callback *> &callbackMap, model::EventRequestResponseType responseType)
 
static void executeConnectionCallback (model::Connection *connection, std::map< uint32_t, Events::Callback *> &callbackMap, model::EventRequestResponseType responseType, std::string errorString)
 

Private Attributes

EventsLoop eventsLoop
 
EventsSettingsInterfacesettings
 
system::Mutex mutex
 
std::map< system::Timer *, model::Connection * > periodicQueries
 
std::map< uint16, uint16messageIdMap
 
std::vector< PublishedEventMetadatapublishedEvents
 
std::map< uint32_t, model::Connection * > inConnections
 
std::map< uint8_t, model::Connection * > outConnections
 
std::map< uint8_t, model::ConnectionRequestInforequestMap
 
uint32_t localIdCount
 
core::ResponseCodeEnumeration::ResponseCodeEnum responseCode
 
std::string errorString
 
std::map< uint32_t, Events::Callback * > subscribeCallbackMap
 
std::map< uint32_t, Events::Callback * > unsubscribeCallbackMap
 

Additional Inherited Members

- Protected Attributes inherited from openjaus::core::services::Transport
model::StateMachine receive
 
model::State receivingState
 

Detailed Description

Constructor & Destructor Documentation

§ Events()

openjaus::core::services::Events::Events ( )

§ ~Events()

openjaus::core::services::Events::~Events ( )
virtual

Reimplemented in openjaus::core::Events.

Member Function Documentation

§ cancelEvent()

bool openjaus::core::services::Events::cancelEvent ( CancelEvent cancelEvent)
virtual

CancelEvent action with input CancelEvent.

Parameters
[in]cancelEvent- Input Trigger.
Returns
Whether the message was properly processed by this action.

Implements openjaus::core::EventsInterface.

§ cancelIncomingConnection()

bool openjaus::core::services::Events::cancelIncomingConnection ( model::ConnectionRequestInfo requestInfo)
private

§ cancelIncomingPeriodicEvents()

void openjaus::core::services::Events::cancelIncomingPeriodicEvents ( )
private

§ cancelOutgoingPeriodicEvents()

void openjaus::core::services::Events::cancelOutgoingPeriodicEvents ( )
private

§ configure()

void openjaus::core::services::Events::configure ( EventsSettingsInterface settings)
protected

§ configureEventsService()

void openjaus::core::services::Events::configureEventsService ( )
private

§ confirmEvent()

bool openjaus::core::services::Events::confirmEvent ( ConfirmEventRequest confirmEventRequest)
virtual

ConfirmEvent action with input ConfirmEventRequest.

Parameters
[in]confirmEventRequest- Input Trigger.
Returns
Whether the message was properly processed by this action.

Implements openjaus::core::EventsInterface.

§ create()

model::Service * openjaus::core::services::Events::create ( )
static
Returns
model::Service - The populated service.

§ createEvent()

bool openjaus::core::services::Events::createEvent ( CreateEvent createEvent)
virtual

CreateEvent action with input CreateEvent.

Parameters
[in]createEvent- Input Trigger.
Returns
Whether the message was properly processed by this action.

Implements openjaus::core::EventsInterface.

§ createIncomingConnection()

bool openjaus::core::services::Events::createIncomingConnection ( model::ConnectionRequestInfo requestInfo,
core::ConfirmEventRequest confirmEventRequest 
)
private

§ createOutgoingOnChangeEvent()

bool openjaus::core::services::Events::createOutgoingOnChangeEvent ( uint8_t  eventId,
model::Message query 
)

§ createOutgoingPeriodicEvent()

bool openjaus::core::services::Events::createOutgoingPeriodicEvent ( uint8_t  eventId,
double  rateHz,
model::Message query 
)

§ deleteConnectionRequest()

void openjaus::core::services::Events::deleteConnectionRequest ( model::Connection connection)
private

§ deleteIncomingConnection()

void openjaus::core::services::Events::deleteIncomingConnection ( model::Connection connection)
private

§ deleteOutgoingPeriodicTimers()

void openjaus::core::services::Events::deleteOutgoingPeriodicTimers ( )
private

This calls delete on each connection object

§ deletePendingRequest()

void openjaus::core::services::Events::deletePendingRequest ( model::Connection connection)
private

§ eventExists() [1/3]

bool openjaus::core::services::Events::eventExists ( CreateEvent createEvent)
virtual

eventExists condition.

Parameters
[in]createEvent- Input Trigger.
Returns
Whether the condition is true.

Implements openjaus::core::EventsInterface.

§ eventExists() [2/3]

bool openjaus::core::services::Events::eventExists ( UpdateEvent updateEvent)
virtual

eventExists condition.

Parameters
[in]updateEvent- Input Trigger.
Returns
Whether the condition is true.

Implements openjaus::core::EventsInterface.

§ eventExists() [3/3]

bool openjaus::core::services::Events::eventExists ( CancelEvent cancelEvent)
virtual

eventExists condition.

Parameters
[in]cancelEvent- Input Trigger.
Returns
Whether the condition is true.

Implements openjaus::core::EventsInterface.

§ executeConnectionCallback() [1/2]

void openjaus::core::services::Events::executeConnectionCallback ( model::Connection connection,
std::map< uint32_t, Events::Callback *> &  callbackMap,
model::EventRequestResponseType  responseType 
)
staticprivate

§ executeConnectionCallback() [2/2]

void openjaus::core::services::Events::executeConnectionCallback ( model::Connection connection,
std::map< uint32_t, Events::Callback *> &  callbackMap,
model::EventRequestResponseType  responseType,
std::string  errorString 
)
staticprivate

§ findEventMetadata()

std::vector< Events::PublishedEventMetadata >::iterator openjaus::core::services::Events::findEventMetadata ( uint16  messageId)
private

§ findSupportedPeriodicRate_Hz()

double openjaus::core::services::Events::findSupportedPeriodicRate_Hz ( uint16  queryId)
private

§ getAvailableRequestId()

uint8_t openjaus::core::services::Events::getAvailableRequestId ( )
private

§ getAvailableUniqueEventId()

uint8_t openjaus::core::services::Events::getAvailableUniqueEventId ( )
private

§ getConfirmedRate_Hz()

double openjaus::core::services::Events::getConfirmedRate_Hz ( uint32  subscriptionId)

§ getConfirmEventRequest() [1/3]

core::ConfirmEventRequest openjaus::core::services::Events::getConfirmEventRequest ( CreateEvent createEvent)
virtual

Send action for ConfirmEventRequest with input message CreateEvent.

Parameters
[in]createEvent- Input Trigger.
Returns
ConfirmEventRequest Output Message.

Implements openjaus::core::EventsInterface.

§ getConfirmEventRequest() [2/3]

core::ConfirmEventRequest openjaus::core::services::Events::getConfirmEventRequest ( UpdateEvent updateEvent)
virtual

Send action for ConfirmEventRequest with input message UpdateEvent.

Parameters
[in]updateEvent- Input Trigger.
Returns
ConfirmEventRequest Output Message.

Implements openjaus::core::EventsInterface.

§ getConfirmEventRequest() [3/3]

core::ConfirmEventRequest openjaus::core::services::Events::getConfirmEventRequest ( CancelEvent cancelEvent)
virtual

Send action for ConfirmEventRequest with input message CancelEvent.

Parameters
[in]cancelEvent- Input Trigger.
Returns
ConfirmEventRequest Output Message.

Implements openjaus::core::EventsInterface.

§ getEventId()

uint8 openjaus::core::services::Events::getEventId ( uint32  subscriptionId)

§ getRejectEventRequest() [1/3]

core::RejectEventRequest openjaus::core::services::Events::getRejectEventRequest ( CreateEvent createEvent)
virtual

Send action for RejectEventRequest with input message CreateEvent.

Parameters
[in]createEvent- Input Trigger.
Returns
RejectEventRequest Output Message.

Implements openjaus::core::EventsInterface.

§ getRejectEventRequest() [2/3]

core::RejectEventRequest openjaus::core::services::Events::getRejectEventRequest ( UpdateEvent updateEvent)
virtual

Send action for RejectEventRequest with input message UpdateEvent.

Parameters
[in]updateEvent- Input Trigger.
Returns
RejectEventRequest Output Message.

Implements openjaus::core::EventsInterface.

§ getRejectEventRequest() [3/3]

core::RejectEventRequest openjaus::core::services::Events::getRejectEventRequest ( CancelEvent cancelEvent)
virtual

Send action for RejectEventRequest with input message CancelEvent.

Parameters
[in]cancelEvent- Input Trigger.
Returns
RejectEventRequest Output Message.

Implements openjaus::core::EventsInterface.

§ getReportEvents()

core::ReportEvents openjaus::core::services::Events::getReportEvents ( QueryEvents queryEvents)
virtual

Send action for ReportEvents with input message QueryEvents.

Parameters
[in]queryEvents- Input Trigger.
Returns
ReportEvents Output Message.

Implements openjaus::core::EventsInterface.

§ getReportEventTimeout()

core::ReportEventTimeout openjaus::core::services::Events::getReportEventTimeout ( QueryEventTimeout queryEventTimeout)
virtual

Send action for ReportEventTimeout with input message QueryEventTimeout.

Parameters
[in]queryEventTimeout- Input Trigger.
Returns
ReportEventTimeout Output Message.

Implements openjaus::core::EventsInterface.

§ getRequestId()

int16 openjaus::core::services::Events::getRequestId ( const model::Connection connection)
private

§ getSubscriptionId()

int32_t openjaus::core::services::Events::getSubscriptionId ( int16  requestId)
private

§ handleIncomingEvent()

bool openjaus::core::services::Events::handleIncomingEvent ( Event event)
virtual

HandleIncomingEvent action with input Event.

Parameters
[in]event- Input Trigger.
Returns
Whether the message was properly processed by this action.

Implements openjaus::core::EventsInterface.

§ handleReportEvents()

bool openjaus::core::services::Events::handleReportEvents ( ReportEvents reportEvents)
virtual

HandleReportEvents action with input ReportEvents.

Parameters
[in]reportEvents- Input Trigger.
Returns
Whether the message was properly processed by this action.

Implements openjaus::core::EventsInterface.

§ isActive()

bool openjaus::core::services::Events::isActive ( uint32  subscriptionId)

§ isSupported() [1/3]

bool openjaus::core::services::Events::isSupported ( CreateEvent createEvent)
virtual

isSupported condition.

Parameters
[in]createEvent- Input Trigger.
Returns
Whether the condition is true.

Implements openjaus::core::EventsInterface.

§ isSupported() [2/3]

bool openjaus::core::services::Events::isSupported ( UpdateEvent updateEvent)
virtual

isSupported condition.

Parameters
[in]updateEvent- Input Trigger.
Returns
Whether the condition is true.

Implements openjaus::core::EventsInterface.

§ isSupported() [3/3]

bool openjaus::core::services::Events::isSupported ( EventTypeEnumeration::EventTypeEnum  type,
model::Message query,
double  requestedRate_Hz 
)
private

§ notifyChanged()

bool openjaus::core::services::Events::notifyChanged ( uint16  messageId)

§ processEvent()

bool openjaus::core::services::Events::processEvent ( ProcessEventRequest processEventRequest)
virtual

ProcessEvent action with input ProcessEventRequest.

Parameters
[in]processEventRequest- Input Trigger.
Returns
Whether the message was properly processed by this action.

Implements openjaus::core::EventsInterface.

§ publish() [1/3]

bool openjaus::core::services::Events::publish ( model::Message message)
Deprecated:
This function will be removed in a future revision. Use publish(uint16 messageId, model::ConnectionType type, double maximumRate_Hz) instead.
Deprecated:

§ publish() [2/3]

bool openjaus::core::services::Events::publish ( uint16  messageId)
Deprecated:
This function will be removed in a future revision. You should explicitly specific the maximum frequency and connection type for all published messages.
Deprecated:

§ publish() [3/3]

bool openjaus::core::services::Events::publish ( uint16  messageId,
double  maximumRate_Hz,
model::ConnectionType  type 
)

§ rejectEvent()

bool openjaus::core::services::Events::rejectEvent ( RejectEventRequest rejectEventRequest)
virtual

RejectEvent action with input RejectEventRequest.

Parameters
[in]rejectEventRequest- Input Trigger.
Returns
Whether the message was properly processed by this action.

Implements openjaus::core::EventsInterface.

§ rejectIncomingConnection()

void openjaus::core::services::Events::rejectIncomingConnection ( model::ConnectionRequestInfo requestInfo,
core::RejectEventRequest rejectEventRequest 
)
private

§ requestIncomingConnection()

int32_t openjaus::core::services::Events::requestIncomingConnection ( const model::Connection connection,
int16 requestId,
Events::Callback callback 
)
private

§ resetEventTimer() [1/2]

bool openjaus::core::services::Events::resetEventTimer ( CreateEvent createEvent)
virtual

ResetEventTimer action with input CreateEvent.

Parameters
[in]createEvent- Input Trigger.
Returns
Whether the message was properly processed by this action.

Implements openjaus::core::EventsInterface.

§ resetEventTimer() [2/2]

bool openjaus::core::services::Events::resetEventTimer ( UpdateEvent updateEvent)
virtual

ResetEventTimer action with input UpdateEvent.

Parameters
[in]updateEvent- Input Trigger.
Returns
Whether the message was properly processed by this action.

Implements openjaus::core::EventsInterface.

§ sendCancelEventMessage()

void openjaus::core::services::Events::sendCancelEventMessage ( model::Connection connection)
private

§ sendCreateEventMessage()

void openjaus::core::services::Events::sendCreateEventMessage ( int16  requestId,
const model::Connection connection 
)
private

§ startService()

void openjaus::core::services::Events::startService ( )
protected

§ stopEventTimer()

bool openjaus::core::services::Events::stopEventTimer ( CancelEvent cancelEvent)
virtual

StopEventTimer action with input CancelEvent.

Parameters
[in]cancelEvent- Input Trigger.
Returns
Whether the message was properly processed by this action.

Implements openjaus::core::EventsInterface.

§ stopService()

void openjaus::core::services::Events::stopService ( )
protected

§ subscribeIncoming()

uint32_t openjaus::core::services::Events::subscribeIncoming ( model::ConnectionType  type,
double  rate_Hz,
transport::Address address,
model::Message query,
Events::Callback callback 
)
private

§ subscribeOnChange() [1/3]

uint32_t openjaus::core::services::Events::subscribeOnChange ( transport::Address address,
model::Message query 
)

§ subscribeOnChange() [2/3]

uint32_t openjaus::core::services::Events::subscribeOnChange ( transport::Address address,
model::Message query,
void(*)(const model::EventRequestResponseArgs &args)  subscribeCallback 
)

§ subscribeOnChange() [3/3]

uint32_t openjaus::core::services::Events::subscribeOnChange ( transport::Address address,
model::Message query,
void(*)(void *object, const model::EventRequestResponseArgs &args)  subscribeCallback,
void *  object 
)

§ subscribePeriodic() [1/3]

uint32_t openjaus::core::services::Events::subscribePeriodic ( transport::Address address,
model::Message query,
double  rate_Hz 
)

§ subscribePeriodic() [2/3]

uint32_t openjaus::core::services::Events::subscribePeriodic ( transport::Address address,
model::Message query,
double  rate_Hz,
void(*)(const model::EventRequestResponseArgs &args)  subscribeCallback 
)

§ subscribePeriodic() [3/3]

uint32_t openjaus::core::services::Events::subscribePeriodic ( transport::Address address,
model::Message query,
double  rate_Hz,
void(*)(void *object, const model::EventRequestResponseArgs &args)  subscribeCallback,
void *  object 
)

§ timerEvent()

void openjaus::core::services::Events::timerEvent ( system::Timer timer)
private

§ tryGetConnection()

bool openjaus::core::services::Events::tryGetConnection ( uint32_t  eventId,
model::Connection *&  connection 
)
private

§ tryGetRequestInfo()

bool openjaus::core::services::Events::tryGetRequestInfo ( int16  requestId,
model::ConnectionRequestInfo requestInfo 
)
private

§ unpublish() [1/2]

bool openjaus::core::services::Events::unpublish ( model::Message message)
Deprecated:
This function will be removed in a future revision. Use unpublish(uint16 messageId) instead.
Deprecated:

§ unpublish() [2/2]

bool openjaus::core::services::Events::unpublish ( uint16  messageId)

§ unsubscribe() [1/3]

bool openjaus::core::services::Events::unsubscribe ( uint32_t  subscriptionId)

§ unsubscribe() [2/3]

bool openjaus::core::services::Events::unsubscribe ( uint32_t  subscriptionId,
void(*)(const model::EventRequestResponseArgs &args)  callback 
)

§ unsubscribe() [3/3]

bool openjaus::core::services::Events::unsubscribe ( uint32_t  subscriptionId,
void(*)(void *object, const model::EventRequestResponseArgs &args)  callback,
void *  object 
)

§ unsubscribeIncoming()

bool openjaus::core::services::Events::unsubscribeIncoming ( uint32_t  subscriptionId,
Events::Callback callback 
)
private

§ updateEvent() [1/2]

bool openjaus::core::services::Events::updateEvent ( CreateEvent createEvent)
virtual

UpdateEvent action with input CreateEvent.

Parameters
[in]createEvent- Input Trigger.
Returns
Whether the message was properly processed by this action.

Implements openjaus::core::EventsInterface.

§ updateEvent() [2/2]

bool openjaus::core::services::Events::updateEvent ( UpdateEvent updateEvent)
virtual

UpdateEvent action with input UpdateEvent.

Parameters
[in]updateEvent- Input Trigger.
Returns
Whether the message was properly processed by this action.

Implements openjaus::core::EventsInterface.

§ updateIncomingConnection()

bool openjaus::core::services::Events::updateIncomingConnection ( model::ConnectionRequestInfo requestInfo,
core::ConfirmEventRequest confirmEventRequest 
)
private

§ updatePeriodic()

bool openjaus::core::services::Events::updatePeriodic ( uint32  subscriptionId,
double  rate_Hz 
)

§ uri()

const char * openjaus::core::services::Events::uri ( )
static
Returns
const char* - The URI.

Member Data Documentation

§ errorString

std::string openjaus::core::services::Events::errorString
private

§ eventsLoop

EventsLoop openjaus::core::services::Events::eventsLoop
private

§ inConnections

std::map<uint32_t, model::Connection *> openjaus::core::services::Events::inConnections
private

§ localIdCount

uint32_t openjaus::core::services::Events::localIdCount
private

§ messageIdMap

std::map<uint16, uint16> openjaus::core::services::Events::messageIdMap
private

§ mutex

system::Mutex openjaus::core::services::Events::mutex
private

§ outConnections

std::map<uint8_t, model::Connection *> openjaus::core::services::Events::outConnections
private

§ periodicQueries

std::map<system::Timer *, model::Connection *> openjaus::core::services::Events::periodicQueries
private

§ publishedEvents

std::vector<PublishedEventMetadata> openjaus::core::services::Events::publishedEvents
private

§ requestMap

std::map<uint8_t, model::ConnectionRequestInfo> openjaus::core::services::Events::requestMap
private

§ responseCode

core::ResponseCodeEnumeration::ResponseCodeEnum openjaus::core::services::Events::responseCode
private

§ settings

EventsSettingsInterface* openjaus::core::services::Events::settings
private

§ subscribeCallbackMap

std::map<uint32_t, Events::Callback*> openjaus::core::services::Events::subscribeCallbackMap
private

§ unsubscribeCallbackMap

std::map<uint32_t, Events::Callback*> openjaus::core::services::Events::unsubscribeCallbackMap
private

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