Classes | Public Types | Public Member Functions | Protected Attributes

JAUS::SetVelocityCommand Class Reference

This message is used to command the linear velocity and rotational rate of the platform. More...

#include <setvelocitycommand.h>

Inheritance diagram for JAUS::SetVelocityCommand:
JAUS::Message

List of all members.

Classes

class  Limits
 Contains constants for limit values of data members of class. More...
class  PresenceVector
 This class contains bit masks for bitwise operations on the presence vector for this message. More...

Public Types

enum  Command { SetCurrentCommand = 0, SetMaximumAllowedValues, SetMinimumAllowedValues, SetDefaultCommand }

Public Member Functions

 SetVelocityCommand (const Address &dest=Address(), const Address &src=Address())
 Constructor, initializes default values.
 SetVelocityCommand (const SetVelocityCommand &message)
 Copy constructor.
 ~SetVelocityCommand ()
 Destructor.
Byte SetCommandType (const Command type)
bool SetVelocityX (const double value)
 Sets the velocity x and update the presence vector for the message.
bool SetVelocityY (const double value)
 Sets the velocity y and update the presence vector for the message.
bool SetVelocityZ (const double value)
 Sets the velocity z and update the presence vector for the message.
bool SetRollRate (const double value)
 Sets the roll rate and update the presence vector for the message.
bool SetPitchRate (const double value)
 Sets the pitch rate and update the presence vector for the message.
bool SetYawRate (const double value)
 Sets the yaw rate and update the presence vector for the message.
Byte GetCommandType () const
double GetVelocityX () const
double GetVelocityY () const
double GetVelocityZ () const
double GetRollRate () const
double GetPitchRate () const
double GetYawRate () 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.
SetVelocityCommandoperator= (const SetVelocityCommand &message)
 Sets equal to.

Protected Attributes

Byte mPresenceVector
 Bit vector for fields present.
Command mCommandType
 CommandType.
double mVelocityX
 Velocity X in meters per second [-327.68, 327.67].
double mVelocityY
 Velocity Y in meters per second [-327.68, 327.67].
double mVelocityZ
 Velocity Z in meters per second [-327.68, 327.67].
double mRollRate
 Roll Rate in Radians per second [-32.768, 32.767].
double mPitchRate
 Pitch Rate in Radians per second [-32.768, 32.767].
double mYawRate
 Yaw Rate in Radians per second [-32.768, 32.767].

Detailed Description

This message is used to command the linear velocity and rotational rate of the platform.

Definition at line 55 of file setvelocitycommand.h.


Member Enumeration Documentation

Enumerator:
SetCurrentCommand 
SetMaximumAllowedValues 
SetMinimumAllowedValues 
SetDefaultCommand 

Definition at line 91 of file setvelocitycommand.h.


Constructor & Destructor Documentation

SetVelocityCommand::SetVelocityCommand ( 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 60 of file setvelocitycommand.cpp.

SetVelocityCommand::SetVelocityCommand ( const SetVelocityCommand message )

Copy constructor.

Definition at line 78 of file setvelocitycommand.cpp.

SetVelocityCommand::~SetVelocityCommand (  )

Destructor.

Definition at line 89 of file setvelocitycommand.cpp.


Member Function Documentation

void SetVelocityCommand::ClearMessageBody (  ) [virtual]

Clears message payload data.

Implements JAUS::Message.

Definition at line 337 of file setvelocitycommand.cpp.

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

Implements JAUS::Message.

Definition at line 118 of file setvelocitycommand.h.

Byte JAUS::SetVelocityCommand::GetCommandType (  ) const [inline]

Definition at line 108 of file setvelocitycommand.h.

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

Implements JAUS::Message.

Definition at line 122 of file setvelocitycommand.h.

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

Implements JAUS::Message.

Definition at line 123 of file setvelocitycommand.h.

double JAUS::SetVelocityCommand::GetPitchRate (  ) const [inline]

Definition at line 113 of file setvelocitycommand.h.

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

Implements JAUS::Message.

Definition at line 119 of file setvelocitycommand.h.

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

Implements JAUS::Message.

Definition at line 121 of file setvelocitycommand.h.

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

Implements JAUS::Message.

Definition at line 120 of file setvelocitycommand.h.

double JAUS::SetVelocityCommand::GetRollRate (  ) const [inline]

Definition at line 112 of file setvelocitycommand.h.

double JAUS::SetVelocityCommand::GetVelocityX (  ) const [inline]

Definition at line 109 of file setvelocitycommand.h.

double JAUS::SetVelocityCommand::GetVelocityY (  ) const [inline]

Definition at line 110 of file setvelocitycommand.h.

double JAUS::SetVelocityCommand::GetVelocityZ (  ) const [inline]

Definition at line 111 of file setvelocitycommand.h.

double JAUS::SetVelocityCommand::GetYawRate (  ) const [inline]

Definition at line 114 of file setvelocitycommand.h.

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

Implements JAUS::Message.

Definition at line 115 of file setvelocitycommand.h.

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

Implements JAUS::Message.

Definition at line 125 of file setvelocitycommand.h.

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

Sets equal to.

Definition at line 388 of file setvelocitycommand.cpp.

int SetVelocityCommand::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 287 of file setvelocitycommand.cpp.

int SetVelocityCommand::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 357 of file setvelocitycommand.cpp.

Byte JAUS::SetVelocityCommand::SetCommandType ( const Command  type ) [inline]

Definition at line 101 of file setvelocitycommand.h.

bool SetVelocityCommand::SetPitchRate ( const double  value )

Sets the pitch rate and update the presence vector for the message.

Parameters:
[in]valueDesired pitch rate in Radians per second [-32.768, 32.767].
Returns:
true on success, otherwise false.

Definition at line 187 of file setvelocitycommand.cpp.

bool SetVelocityCommand::SetRollRate ( const double  value )

Sets the roll rate and update the presence vector for the message.

Parameters:
[in]valueDesired roll rate in Radians per second [-32.768, 32.767].
Returns:
true on success, otherwise false.

Definition at line 166 of file setvelocitycommand.cpp.

bool SetVelocityCommand::SetVelocityX ( const double  value )

Sets the velocity x and update the presence vector for the message.

Parameters:
[in]valueDesired velocity x in meters per second [-327.68, 327.67].
Returns:
true on success, otherwise false.

Definition at line 103 of file setvelocitycommand.cpp.

bool SetVelocityCommand::SetVelocityY ( const double  value )

Sets the velocity y and update the presence vector for the message.

Parameters:
[in]valueDesired velocity y in meters per second [-327.68, 327.67].
Returns:
true on success, otherwise false.

Definition at line 124 of file setvelocitycommand.cpp.

bool SetVelocityCommand::SetVelocityZ ( const double  value )

Sets the velocity z and update the presence vector for the message.

Parameters:
[in]valueDesired velocity z in meters per second [-327.68, 327.67].
Returns:
true on success, otherwise false.

Definition at line 145 of file setvelocitycommand.cpp.

bool SetVelocityCommand::SetYawRate ( const double  value )

Sets the yaw rate and update the presence vector for the message.

Parameters:
[in]valueDesired yaw rate in Radians per second [-32.768, 32.767].
Returns:
true on success, otherwise false.

Definition at line 208 of file setvelocitycommand.cpp.

int SetVelocityCommand::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 231 of file setvelocitycommand.cpp.


Member Data Documentation

CommandType.

Definition at line 130 of file setvelocitycommand.h.

Pitch Rate in Radians per second [-32.768, 32.767].

Definition at line 135 of file setvelocitycommand.h.

Bit vector for fields present.

Definition at line 129 of file setvelocitycommand.h.

Roll Rate in Radians per second [-32.768, 32.767].

Definition at line 134 of file setvelocitycommand.h.

Velocity X in meters per second [-327.68, 327.67].

Definition at line 131 of file setvelocitycommand.h.

Velocity Y in meters per second [-327.68, 327.67].

Definition at line 132 of file setvelocitycommand.h.

Velocity Z in meters per second [-327.68, 327.67].

Definition at line 133 of file setvelocitycommand.h.

Yaw Rate in Radians per second [-32.768, 32.767].

Definition at line 136 of file setvelocitycommand.h.


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