Classes | Public Member Functions | Protected Attributes

JAUS::CreateEvent Class Reference

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>

Inheritance diagram for JAUS::CreateEvent:
JAUS::Message

List of all members.

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 PacketGetQueryMessage () 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 MessageClone () 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
CreateEventoperator= (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.

Detailed Description

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 & Destructor Documentation

CreateEvent::CreateEvent ( const Address dest = Address(),
const Address src = Address() 
)

Constructor, initializes default values.

Parameters:
[in]srcSource ID of message sender.
[in]destDestination 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.


Member Function Documentation

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.

Parameters:
[in]requestingMessageOriginal query or command message that you want to see if this message is a response to.
Returns:
True if this message is a response, otherwise false.

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.

Parameters:
[in]packetPacket containing message payload data to read.
Returns:
-1 on error, otherwise number of bytes written.

Implements JAUS::Message.

Definition at line 246 of file createevent.cpp.

bool CreateEvent::SetQueryMessage ( const UShort  messageCode,
const Packet queryPayload 
)

Sets the query message which will determine the type of Report for the event.

Parameters:
[in]messageCodeQuery message code which will determine Report type.
[in]queryPayloadQuery payload data (serialized message body only, no 2 byte message code).
Returns:
True if set, false on failure.

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.

Parameters:
[in]queryMessagePointer to Message object to get Message Code and payload for query.
Returns:
True if set, false on failure.

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).

Parameters:
[in]rateRequested periodic rate [0,1092] Hz.
Returns:
True if set, false on failure.

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.

Parameters:
[out]packetPacket to write payload to.
Returns:
-1 on error, otherwise number of bytes written.

Implements JAUS::Message.

Definition at line 213 of file createevent.cpp.


Member Data Documentation

Contents of the query message.

Definition at line 106 of file createevent.h.

Messge code for the Query Message specifying type of Report.

Definition at line 105 of file createevent.h.

Requested periodic event rate [0-1092] Hz.

Definition at line 104 of file createevent.h.

Local request ID field.

Definition at line 103 of file createevent.h.

Event type.

Definition at line 102 of file createevent.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines