Public Types | Public Member Functions | Protected Attributes

JAUS::ConfirmControl Class Reference

This message is used to notify a component that it accepts control from that component (or not). When control has been granted, response code of 0, the component under control will only execute messages from the controlling component until control is released or interrupted. Wehn the requesting component has lower authority than the current controlling entity, the response will be 2. For components not supporting interruptible control, or if the component is engaged in other operations that would prevent this service from performing its actions to grant control, the response code value of 1 can be used. More...

#include <confirmcontrol.h>

Inheritance diagram for JAUS::ConfirmControl:
JAUS::Message

List of all members.

Public Types

enum  Response { ControlAccepted = 0, NotAvailable, InsufficientAuthority }

Public Member Functions

 ConfirmControl (const Address &dest=Address(), const Address &src=Address())
 Constructor, initializes default values.
 ConfirmControl (const ConfirmControl &message)
 Copy constructor.
 ~ConfirmControl ()
 Destructor.
Byte GetResponseCode () const
Byte SetResponseCode (const Response code)
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.
ConfirmControloperator= (const ConfirmControl &message)
 Sets equal to.

Protected Attributes

Response mResponseCode
 Response code.

Detailed Description

This message is used to notify a component that it accepts control from that component (or not). When control has been granted, response code of 0, the component under control will only execute messages from the controlling component until control is released or interrupted. Wehn the requesting component has lower authority than the current controlling entity, the response will be 2. For components not supporting interruptible control, or if the component is engaged in other operations that would prevent this service from performing its actions to grant control, the response code value of 1 can be used.

Definition at line 63 of file confirmcontrol.h.


Member Enumeration Documentation

Enumerator:
ControlAccepted 
NotAvailable 
InsufficientAuthority 

Definition at line 67 of file confirmcontrol.h.


Constructor & Destructor Documentation

ConfirmControl::ConfirmControl ( 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 confirmcontrol.cpp.

ConfirmControl::ConfirmControl ( const ConfirmControl message )

Copy constructor.

Definition at line 64 of file confirmcontrol.cpp.

ConfirmControl::~ConfirmControl (  )

Destructor.

Definition at line 75 of file confirmcontrol.cpp.


Member Function Documentation

void ConfirmControl::ClearMessageBody (  ) [virtual]

Clears message payload data.

Implements JAUS::Message.

Definition at line 129 of file confirmcontrol.cpp.

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

Implements JAUS::Message.

Definition at line 81 of file confirmcontrol.h.

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

Implements JAUS::Message.

Definition at line 85 of file confirmcontrol.h.

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

Implements JAUS::Message.

Definition at line 86 of file confirmcontrol.h.

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

Implements JAUS::Message.

Definition at line 82 of file confirmcontrol.h.

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

Implements JAUS::Message.

Definition at line 84 of file confirmcontrol.h.

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

Implements JAUS::Message.

Definition at line 83 of file confirmcontrol.h.

Byte JAUS::ConfirmControl::GetResponseCode (  ) const [inline]

Definition at line 76 of file confirmcontrol.h.

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

Implements JAUS::Message.

Definition at line 78 of file confirmcontrol.h.

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

Implements JAUS::Message.

Definition at line 88 of file confirmcontrol.h.

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

Sets equal to.

Definition at line 167 of file confirmcontrol.cpp.

int ConfirmControl::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 confirmcontrol.cpp.

int ConfirmControl::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 confirmcontrol.cpp.

Byte JAUS::ConfirmControl::SetResponseCode ( const Response  code ) [inline]

Definition at line 77 of file confirmcontrol.h.

int ConfirmControl::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 confirmcontrol.cpp.


Member Data Documentation

Response code.

Definition at line 92 of file confirmcontrol.h.


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