This message is used to set up an event. The Local Request ID is used by the event provider in the Confirm or Reject message. The Event Typ allows the requester to specifiy the type of event. Periodic events occur at a given rate, with EveryChange happening any time the data changes. Finally, a Query Message can be provided to specify any specific contents in a Report. More...
#include <createevent.h>
Classes | |
class | Limits |
Contains limits of specific fields in message. More... | |
Public Member Functions | |
CreateEvent (const Address &dest=Address(), const Address &src=Address()) | |
Constructor, initializes default values. | |
CreateEvent (const CreateEvent &message) | |
Copy constructor. | |
~CreateEvent () | |
Destructor. | |
void | SetType (const Events::Type type) |
void | SetRequestID (const Byte id) |
bool | SetRequestedPeriodicRate (const double rate) |
Sets the requested periodic update rate. If the event type is EveryChange, this value should be 0 (default). | |
bool | SetQueryMessage (const Message *queryMessage) |
Sets the query message which will determine the type of Report for the event. | |
bool | SetQueryMessage (const UShort messageCode, const Packet &queryPayload) |
Sets the query message which will determine the type of Report for the event. | |
Events::Type | GetType () const |
Byte | GetRequestID () const |
double | GetRequestedPeriodicRate () const |
UShort | GetQueryMessageCode () const |
const Packet * | GetQueryMessage () const |
virtual bool | IsCommand () const |
virtual bool | IsResponseToMessage (const Message *requestingMessage) const |
Method used to verify if this Message is a response to a requesting Query or Command message. | |
virtual int | WriteMessageBody (Packet &packet) const |
Writes message payload to the packet. | |
virtual int | ReadMessageBody (const Packet &packet) |
Reads message payload from the packet. | |
virtual Message * | Clone () const |
virtual UInt | GetPresenceVector () const |
virtual UInt | GetPresenceVectorSize () const |
virtual UInt | GetPresenceVectorMask () const |
virtual UShort | GetMessageCodeOfResponse () const |
virtual std::string | GetMessageName () const |
virtual void | ClearMessageBody () |
Clears message payload data. | |
virtual bool | IsLargeDataSet (const unsigned int maxPayloadSize) const |
CreateEvent & | operator= (const CreateEvent &message) |
Sets equal to. | |
Protected Attributes | |
Events::Type | mType |
Event type. | |
Byte | mRequestID |
Local request ID field. | |
double | mRequestedPeriodicRate |
Requested periodic event rate [0-1092] Hz. | |
UShort | mQueryMessageCode |
Messge code for the Query Message specifying type of Report. | |
Packet | mQueryMessage |
Contents of the query message. |
This message is used to set up an event. The Local Request ID is used by the event provider in the Confirm or Reject message. The Event Typ allows the requester to specifiy the type of event. Periodic events occur at a given rate, with EveryChange happening any time the data changes. Finally, a Query Message can be provided to specify any specific contents in a Report.
Definition at line 60 of file createevent.h.
Constructor, initializes default values.
[in] | src | Source ID of message sender. |
[in] | dest | Destination ID of message. |
Definition at line 59 of file createevent.cpp.
CreateEvent::CreateEvent | ( | const CreateEvent & | message ) |
Copy constructor.
Definition at line 74 of file createevent.cpp.
CreateEvent::~CreateEvent | ( | ) |
Destructor.
Definition at line 89 of file createevent.cpp.
void CreateEvent::ClearMessageBody | ( | ) | [virtual] |
Clears message payload data.
Implements JAUS::Message.
Definition at line 274 of file createevent.cpp.
virtual Message* JAUS::CreateEvent::Clone | ( | ) | const [inline, virtual] |
Implements JAUS::Message.
Definition at line 92 of file createevent.h.
virtual UShort JAUS::CreateEvent::GetMessageCodeOfResponse | ( | ) | const [inline, virtual] |
Implements JAUS::Message.
Definition at line 96 of file createevent.h.
virtual std::string JAUS::CreateEvent::GetMessageName | ( | ) | const [inline, virtual] |
Implements JAUS::Message.
Definition at line 97 of file createevent.h.
virtual UInt JAUS::CreateEvent::GetPresenceVector | ( | ) | const [inline, virtual] |
Implements JAUS::Message.
Definition at line 93 of file createevent.h.
virtual UInt JAUS::CreateEvent::GetPresenceVectorMask | ( | ) | const [inline, virtual] |
Implements JAUS::Message.
Definition at line 95 of file createevent.h.
virtual UInt JAUS::CreateEvent::GetPresenceVectorSize | ( | ) | const [inline, virtual] |
Implements JAUS::Message.
Definition at line 94 of file createevent.h.
const Packet* JAUS::CreateEvent::GetQueryMessage | ( | ) | const [inline] |
Definition at line 87 of file createevent.h.
UShort JAUS::CreateEvent::GetQueryMessageCode | ( | ) | const [inline] |
Definition at line 86 of file createevent.h.
double JAUS::CreateEvent::GetRequestedPeriodicRate | ( | ) | const [inline] |
Definition at line 85 of file createevent.h.
Byte JAUS::CreateEvent::GetRequestID | ( | ) | const [inline] |
Definition at line 84 of file createevent.h.
Events::Type JAUS::CreateEvent::GetType | ( | ) | const [inline] |
Definition at line 83 of file createevent.h.
virtual bool JAUS::CreateEvent::IsCommand | ( | ) | const [inline, virtual] |
Implements JAUS::Message.
Definition at line 88 of file createevent.h.
virtual bool JAUS::CreateEvent::IsLargeDataSet | ( | const unsigned int | maxPayloadSize ) | const [inline, virtual] |
Implements JAUS::Message.
Definition at line 99 of file createevent.h.
bool CreateEvent::IsResponseToMessage | ( | const Message * | requestingMessage ) | const [virtual] |
Method used to verify if this Message is a response to a requesting Query or Command message.
This method verifies that the destination ID of the requestingMessage matches the source ID of this message and that the result of GetMessageCodeOfResponse for the requestingMessage matchings the message code of this method. Overload this method to check other parameters.
[in] | requestingMessage | Original query or command message that you want to see if this message is a response to. |
Reimplemented from JAUS::Message.
Definition at line 178 of file createevent.cpp.
CreateEvent & CreateEvent::operator= | ( | const CreateEvent & | message ) |
Sets equal to.
Definition at line 289 of file createevent.cpp.
int CreateEvent::ReadMessageBody | ( | const Packet & | packet ) | [virtual] |
Reads message payload from the packet.
Message contents are read from the packet following the JAUS standard.
[in] | packet | Packet containing message payload data to read. |
Implements JAUS::Message.
Definition at line 246 of file createevent.cpp.
Sets the query message which will determine the type of Report for the event.
[in] | messageCode | Query message code which will determine Report type. |
[in] | queryPayload | Query payload data (serialized message body only, no 2 byte message code). |
Definition at line 151 of file createevent.cpp.
bool CreateEvent::SetQueryMessage | ( | const Message * | queryMessage ) |
Sets the query message which will determine the type of Report for the event.
Definition at line 127 of file createevent.cpp.
bool CreateEvent::SetRequestedPeriodicRate | ( | const double | rate ) |
Sets the requested periodic update rate. If the event type is EveryChange, this value should be 0 (default).
[in] | rate | Requested periodic rate [0,1092] Hz. |
Definition at line 105 of file createevent.cpp.
void JAUS::CreateEvent::SetRequestID | ( | const Byte | id ) | [inline] |
Definition at line 79 of file createevent.h.
void JAUS::CreateEvent::SetType | ( | const Events::Type | type ) | [inline] |
Definition at line 78 of file createevent.h.
int CreateEvent::WriteMessageBody | ( | Packet & | packet ) | const [virtual] |
Writes message payload to the packet.
Message contents are written to the packet following the JAUS standard.
[out] | packet | Packet to write payload to. |
Implements JAUS::Message.
Definition at line 213 of file createevent.cpp.
Packet JAUS::CreateEvent::mQueryMessage [protected] |
Contents of the query message.
Definition at line 106 of file createevent.h.
UShort JAUS::CreateEvent::mQueryMessageCode [protected] |
Messge code for the Query Message specifying type of Report.
Definition at line 105 of file createevent.h.
double JAUS::CreateEvent::mRequestedPeriodicRate [protected] |
Requested periodic event rate [0-1092] Hz.
Definition at line 104 of file createevent.h.
Byte JAUS::CreateEvent::mRequestID [protected] |
Local request ID field.
Definition at line 103 of file createevent.h.
Events::Type JAUS::CreateEvent::mType [protected] |
Event type.
Definition at line 102 of file createevent.h.