Public Member Functions | Protected Attributes

JAUS::RequestControl Class Reference

This message is used to request interruptible control of the receiving component. Once control is established, the component shall only execute commands from the sending component. The authority code parameter is to be equal to that of the sending component. The receveiving component must always accept control of the highest authority component that is requesting uninterruptible control. Commands from all other components are ignored unless from a component higher authority. More...

#include <requestcontrol.h>

Inheritance diagram for JAUS::RequestControl:
JAUS::Message

List of all members.

Public Member Functions

 RequestControl (const Address &dest=Address(), const Address &src=Address())
 Constructor, initializes default values.
 RequestControl (const RequestControl &message)
 Copy constructor.
 ~RequestControl ()
 Destructor.
void SetAuthorityCode (const Byte code)
Byte GetAuthorityCode () 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=1437) const
virtual int RunTestCase () const
 Runs a test case to validate the message class.
RequestControloperator= (const RequestControl &message)
 Sets equal to.

Protected Attributes

Byte mAuthorityCode
 Authority value of sending component [0,255].

Detailed Description

This message is used to request interruptible control of the receiving component. Once control is established, the component shall only execute commands from the sending component. The authority code parameter is to be equal to that of the sending component. The receveiving component must always accept control of the highest authority component that is requesting uninterruptible control. Commands from all other components are ignored unless from a component higher authority.

Definition at line 61 of file requestcontrol.h.


Constructor & Destructor Documentation

RequestControl::RequestControl ( 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 53 of file requestcontrol.cpp.

RequestControl::RequestControl ( const RequestControl message )

Copy constructor.

Definition at line 64 of file requestcontrol.cpp.

RequestControl::~RequestControl (  )

Destructor.

Definition at line 75 of file requestcontrol.cpp.


Member Function Documentation

void RequestControl::ClearMessageBody (  ) [virtual]

Clears message payload data.

Implements JAUS::Message.

Definition at line 129 of file requestcontrol.cpp.

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

Implements JAUS::Message.

Definition at line 72 of file requestcontrol.h.

Byte JAUS::RequestControl::GetAuthorityCode (  ) const [inline]

Definition at line 68 of file requestcontrol.h.

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

Implements JAUS::Message.

Definition at line 76 of file requestcontrol.h.

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

Implements JAUS::Message.

Definition at line 77 of file requestcontrol.h.

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

Implements JAUS::Message.

Definition at line 73 of file requestcontrol.h.

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

Implements JAUS::Message.

Definition at line 75 of file requestcontrol.h.

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

Implements JAUS::Message.

Definition at line 74 of file requestcontrol.h.

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

Implements JAUS::Message.

Definition at line 69 of file requestcontrol.h.

virtual bool JAUS::RequestControl::IsLargeDataSet ( const unsigned int  maxPayloadSize = 1437 ) const [inline, virtual]

Implements JAUS::Message.

Definition at line 79 of file requestcontrol.h.

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

Sets equal to.

Definition at line 166 of file requestcontrol.cpp.

int RequestControl::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 113 of file requestcontrol.cpp.

int RequestControl::RunTestCase (  ) const [virtual]

Runs a test case to validate the message class.

Returns:
1 on success, otherwise 0.

Reimplemented from JAUS::Message.

Definition at line 142 of file requestcontrol.cpp.

void JAUS::RequestControl::SetAuthorityCode ( const Byte  code ) [inline]

Definition at line 67 of file requestcontrol.h.

int RequestControl::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 91 of file requestcontrol.cpp.


Member Data Documentation

Authority value of sending component [0,255].

Definition at line 83 of file requestcontrol.h.


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