Public Member Functions | Protected Attributes

JAUS::Event Class Reference

This message is sent when an event is triggered. It includes the Event ID and a sequence number to allow the client to keep track of event processing. More...

#include <event.h>

Inheritance diagram for JAUS::Event:
JAUS::Message

List of all members.

Public Member Functions

 Event (const Address &dest=Address(), const Address &src=Address())
 Constructor.
 Event (const Event &message)
 Copy constructor.
 ~Event ()
 Destructor.
void SetEventID (const Byte id)
void SetSequenceNumber (const Byte number)
bool SetReportMessage (const Message *reportMessage)
 Sets the report message that the Event has been triggered by.
bool SetReportMessage (const UShort messageCode, const Packet &reportPayload)
 Sets the report message that the Event has been triggered by.
Byte GetEventID () const
Byte GetSequenceNumber () const
UShort GetReportMessageCode () const
const PacketGetReportMessage () const
virtual bool IsCommand () const
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
Eventoperator= (const Event &message)
 Sets equal to.

Protected Attributes

Byte mEventID
 Event ID number.
Byte mSequenceNumber
 Event sequence number.
UShort mReportCode
 Messge code for the Report Message specifying type of payload.
Packet mReportMessage
 Contents of the report message.

Detailed Description

This message is sent when an event is triggered. It includes the Event ID and a sequence number to allow the client to keep track of event processing.

Definition at line 56 of file event.h.


Constructor & Destructor Documentation

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

Constructor.

Parameters:
[in]srcSource ID of message sender.
[in]destDestination ID of message.

Definition at line 53 of file event.cpp.

Event::Event ( const Event message )

Copy constructor.

Definition at line 65 of file event.cpp.

Event::~Event (  )

Destructor.

Definition at line 78 of file event.cpp.


Member Function Documentation

void Event::ClearMessageBody (  ) [virtual]

Clears message payload data.

Implements JAUS::Message.

Definition at line 188 of file event.cpp.

virtual Message* JAUS::Event::Clone (  ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 73 of file event.h.

Byte JAUS::Event::GetEventID (  ) const [inline]

Definition at line 66 of file event.h.

virtual UShort JAUS::Event::GetMessageCodeOfResponse (  ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 77 of file event.h.

virtual std::string JAUS::Event::GetMessageName (  ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 78 of file event.h.

virtual UInt JAUS::Event::GetPresenceVector (  ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 74 of file event.h.

virtual UInt JAUS::Event::GetPresenceVectorMask (  ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 76 of file event.h.

virtual UInt JAUS::Event::GetPresenceVectorSize (  ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 75 of file event.h.

const Packet* JAUS::Event::GetReportMessage (  ) const [inline]

Definition at line 69 of file event.h.

UShort JAUS::Event::GetReportMessageCode (  ) const [inline]

Definition at line 68 of file event.h.

Byte JAUS::Event::GetSequenceNumber (  ) const [inline]

Definition at line 67 of file event.h.

virtual bool JAUS::Event::IsCommand (  ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 70 of file event.h.

bool Event::IsLargeDataSet ( const unsigned int  maxPayloadSize ) const [virtual]
Returns:
True if the contents of the message will be larger than maximum payload size, otherwise false.

Implements JAUS::Message.

Definition at line 202 of file event.cpp.

Event & Event::operator= ( const Event message )

Sets equal to.

Definition at line 214 of file event.cpp.

int Event::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 162 of file event.cpp.

void JAUS::Event::SetEventID ( const Byte  id ) [inline]

Definition at line 62 of file event.h.

bool Event::SetReportMessage ( const Message reportMessage )

Sets the report message that the Event has been triggered by.

Parameters:
[in]reportMessagePointer to a Report message to use for serialization of message data.
Returns:
True if set, false on failure.

Definition at line 93 of file event.cpp.

bool Event::SetReportMessage ( const UShort  messageCode,
const Packet reportPayload 
)

Sets the report message that the Event has been triggered by.

Parameters:
[in]messageCodeThe report message type.
[in]reportPayloadPayload data for the Report.
Returns:
True if set, false on failure.

Definition at line 114 of file event.cpp.

void JAUS::Event::SetSequenceNumber ( const Byte  number ) [inline]

Definition at line 63 of file event.h.

int Event::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 133 of file event.cpp.


Member Data Documentation

Event ID number.

Definition at line 83 of file event.h.

Messge code for the Report Message specifying type of payload.

Definition at line 85 of file event.h.

Contents of the report message.

Definition at line 86 of file event.h.

Event sequence number.

Definition at line 84 of file event.h.


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