Classes | Public Member Functions | Protected Attributes

JAUS::UpdateEvent Class Reference

This message allows the requestor to request a rate or change for an existing event. More...

#include <updateevent.h>

Inheritance diagram for JAUS::UpdateEvent:
JAUS::Message

List of all members.

Classes

class  Limits
 Contains limits of specific fields in message. More...

Public Member Functions

 UpdateEvent (const Address &dest=Address(), const Address &src=Address())
 Constructor, initializes default values.
 UpdateEvent (const UpdateEvent &message)
 Copy constructor.
 ~UpdateEvent ()
 Destructor.
void SetType (const Events::Type type)
void SetEventID (const Byte id)
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.
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 GetEventID () 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
UpdateEventoperator= (const UpdateEvent &message)
 Sets equal to.

Protected Attributes

Events::Type mType
 Event type.
Byte mRequestID
 Local request ID field.
Byte mEventID
 Event ID to be updated.
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 allows the requestor to request a rate or change for an existing event.

Definition at line 56 of file updateevent.h.


Constructor & Destructor Documentation

UpdateEvent::UpdateEvent ( 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 updateevent.cpp.

UpdateEvent::UpdateEvent ( const UpdateEvent message )

Copy constructor.

Definition at line 75 of file updateevent.cpp.

UpdateEvent::~UpdateEvent (  )

Destructor.

Definition at line 91 of file updateevent.cpp.


Member Function Documentation

void UpdateEvent::ClearMessageBody (  ) [virtual]

Clears message payload data.

Implements JAUS::Message.

Definition at line 278 of file updateevent.cpp.

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

Implements JAUS::Message.

Definition at line 90 of file updateevent.h.

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

Definition at line 81 of file updateevent.h.

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

Implements JAUS::Message.

Definition at line 94 of file updateevent.h.

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

Implements JAUS::Message.

Definition at line 95 of file updateevent.h.

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

Implements JAUS::Message.

Definition at line 91 of file updateevent.h.

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

Implements JAUS::Message.

Definition at line 93 of file updateevent.h.

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

Implements JAUS::Message.

Definition at line 92 of file updateevent.h.

const Packet* JAUS::UpdateEvent::GetQueryMessage (  ) const [inline]

Definition at line 85 of file updateevent.h.

UShort JAUS::UpdateEvent::GetQueryMessageCode (  ) const [inline]

Definition at line 84 of file updateevent.h.

double JAUS::UpdateEvent::GetRequestedPeriodicRate (  ) const [inline]

Definition at line 83 of file updateevent.h.

Byte JAUS::UpdateEvent::GetRequestID (  ) const [inline]

Definition at line 82 of file updateevent.h.

Events::Type JAUS::UpdateEvent::GetType (  ) const [inline]

Definition at line 80 of file updateevent.h.

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

Implements JAUS::Message.

Definition at line 86 of file updateevent.h.

virtual bool JAUS::UpdateEvent::IsLargeDataSet ( const unsigned int  maxPayloadSize ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 97 of file updateevent.h.

bool UpdateEvent::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 180 of file updateevent.cpp.

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

Sets equal to.

Definition at line 294 of file updateevent.cpp.

int UpdateEvent::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 249 of file updateevent.cpp.

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

Definition at line 75 of file updateevent.h.

bool UpdateEvent::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 129 of file updateevent.cpp.

bool UpdateEvent::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 153 of file updateevent.cpp.

bool UpdateEvent::SetRequestedPeriodicRate ( const double  rate )

Sets the requested periodic update rate. If the event type is EveryChange, this value should be 0.

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

Definition at line 107 of file updateevent.cpp.

void JAUS::UpdateEvent::SetRequestID ( const Byte  id ) [inline]

Definition at line 76 of file updateevent.h.

void JAUS::UpdateEvent::SetType ( const Events::Type  type ) [inline]

Definition at line 74 of file updateevent.h.

int UpdateEvent::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 215 of file updateevent.cpp.


Member Data Documentation

Event ID to be updated.

Definition at line 102 of file updateevent.h.

Contents of the query message.

Definition at line 105 of file updateevent.h.

Messge code for the Query Message specifying type of Report.

Definition at line 104 of file updateevent.h.

Requested periodic event rate [0-1092] Hz.

Definition at line 103 of file updateevent.h.

Local request ID field.

Definition at line 101 of file updateevent.h.

Event type.

Definition at line 100 of file updateevent.h.


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