OpenJAUS Software Development Kit  4.3.1
Public Member Functions | Static Public Attributes | Private Attributes | Friends | List of all members
openjaus::mobility::SetVelocityCommand Class Reference

SetVelocityCommand Message Implementation. More...

#include <SetVelocityCommand.h>

Inherits openjaus::model::Message.

Public Member Functions

 SetVelocityCommand ()
 
 SetVelocityCommand (model::Message *message)
 
 ~SetVelocityCommand ()
 
virtual int to (system::Buffer *dst)
 Pack this message to the given openjaus::system::Buffer. More...
 
virtual int from (system::Buffer *src)
 Unpack this message from the given openjaus::system::Buffer. More...
 
virtual int length ()
 Get the number of bytes this message would occupy in a serialized buffer. More...
 
std::string toXml (unsigned char ojIndentLevel=0) const
 Used to serialize the runtime state of the message to an XML format. More...
 
std::string toString () const
 Returns a string populated with the Message name and ID More...
 
void setPresenceVector (uint8_t value)
 
uint8_t getPresenceVector (void) const
 
bool isVelocityXEnabled (void) const
 
void enableVelocityX (void)
 
void disableVelocityX (void)
 
bool isVelocityYEnabled (void) const
 
void enableVelocityY (void)
 
void disableVelocityY (void)
 
bool isVelocityZEnabled (void) const
 
void enableVelocityZ (void)
 
void disableVelocityZ (void)
 
bool isRollRateEnabled (void) const
 
void enableRollRate (void)
 
void disableRollRate (void)
 
bool isPitchRateEnabled (void) const
 
void enablePitchRate (void)
 
void disablePitchRate (void)
 
bool isYawRateEnabled (void) const
 
void enableYawRate (void)
 
void disableYawRate (void)
 
VelocityCommandTypeEnumeration::VelocityCommandTypeEnum getCommandType (void)
 
bool setCommandType (VelocityCommandTypeEnumeration::VelocityCommandTypeEnum value)
 
std::string getCommandTypeToString (void)
 
double getVelocityX_mps (void)
 
bool setVelocityX_mps (double value)
 
double getVelocityY_mps (void)
 
bool setVelocityY_mps (double value)
 
double getVelocityZ_mps (void)
 
bool setVelocityZ_mps (double value)
 
double getRollRate_rps (void)
 
bool setRollRate_rps (double value)
 
double getPitchRate_rps (void)
 
bool setPitchRate_rps (double value)
 
double getYawRate_rps (void)
 
bool setYawRate_rps (double value)
 
- Public Member Functions inherited from openjaus::model::Message
 Message ()
 
virtual ~Message ()
 
 Message (Message *message)
 
int to (system::Buffer *dst)
 Operation to. More...
 
int from (system::Buffer *src)
 Operation from. More...
 
- Public Member Functions inherited from openjaus::transport::Wrapper
 Wrapper ()
 
virtual ~Wrapper ()
 
AckNakType getAckNak () const
 Accessor to get the value of ackNak. More...
 
bool setAckNak (AckNakType ackNak)
 Accessor to set value of ackNak. More...
 
bool isCompressible () const
 Accessor to get the value of compressible. More...
 
bool setCompressible (bool compressible)
 Accessor to set value of compressible. More...
 
bool isMustArrive () const
 Accessor to get the value of mustArrive. More...
 
bool setMustArrive (bool mustArrive)
 Accessor to set value of mustArrive. More...
 
uint16_t getSequenceNumber () const
 Accessor to get the value of sequenceNumber. More...
 
bool setSequenceNumber (uint16_t sequenceNumber)
 Accessor to set value of sequenceNumber. More...
 
WrapperType getType () const
 Accessor to get the value of type. More...
 
bool setType (WrapperType type)
 Accessor to set value of type. More...
 
Priority getPriority () const
 Accessor to get the value of priority. More...
 
bool setPriority (Priority priority)
 Accessor to set value of priority. More...
 
BroadcastType getBroadcastFlag () const
 Accessor to get the value of broadcastFlag. More...
 
bool setBroadcastFlag (BroadcastType broadcastFlag)
 Accessor to set value of broadcastFlag. More...
 
LargeMessageType getLargeMessageFlag () const
 Accessor to get the value of largeMessageFlag. More...
 
bool setLargeMessageFlag (LargeMessageType largeMessageFlag)
 Accessor to set value of largeMessageFlag. More...
 
const AddressgetDestination () const
 Accessor to get the value of destination. More...
 
bool setDestination (const Address &destination)
 Accessor to set value of destination. More...
 
system::TransportablegetPayload () const
 Accessor to get the value of payload. More...
 
bool setPayload (system::Transportable *payload)
 Accessor to set value of payload. More...
 
const AddressgetSource () const
 Accessor to get the value of source. More...
 
bool setSource (const Address &source)
 Accessor to set value of source. More...
 
TransportDatagetTransportData () const
 Accessor to get the value of transportData. More...
 
bool setTransportData (TransportData *transportData)
 Accessor to set value of transportData. More...
 
virtual int prioritizedValue ()
 Operation prioritizedValue. More...
 
virtual Wrapperclone ()
 
- Public Member Functions inherited from openjaus::system::Transportable
virtual ~Transportable ()
 
 Transportable ()
 
- Public Member Functions inherited from openjaus::system::Prioritized
virtual ~Prioritized ()
 
- Public Member Functions inherited from openjaus::model::Trigger
 Trigger ()
 
virtual ~Trigger ()
 
double getTriggerTimestamp_sec () const
 Accessor to get the value of triggerTimestamp_sec. More...
 
bool setTriggerTimestamp_sec (double triggerTimestamp_sec)
 Accessor to set value of triggerTimestamp_sec. More...
 
uint32_t getId () const
 Accessor to get the value of id. More...
 
bool setId (uint32_t id)
 Accessor to set value of id. More...
 
std::string idString ()
 Operation idString. More...
 

Static Public Attributes

static const uint16_t ID = 0x0415
 
static const uint8_t PV_ALL_FIELDS = 0xFF
 
static const uint8_t PV_NO_FIELDS = 0x0
 
static const uint8_t PV_VELOCITYX = 0x1
 
static const uint8_t PV_VELOCITYY = 0x2
 
static const uint8_t PV_VELOCITYZ = 0x4
 
static const uint8_t PV_ROLLRATE = 0x8
 
static const uint8_t PV_PITCHRATE = 0x10
 
static const uint8_t PV_YAWRATE = 0x20
 
static const double VELOCITYX_MIN_VALUE = -327.68
 
static const double VELOCITYX_MAX_VALUE = 327.67
 
static const double VELOCITYY_MIN_VALUE = -327.68
 
static const double VELOCITYY_MAX_VALUE = 327.67
 
static const double VELOCITYZ_MIN_VALUE = -327.68
 
static const double VELOCITYZ_MAX_VALUE = 327.67
 
static const double ROLLRATE_MIN_VALUE = -32.768
 
static const double ROLLRATE_MAX_VALUE = 32.767
 
static const double PITCHRATE_MIN_VALUE = -32.768
 
static const double PITCHRATE_MAX_VALUE = 32.767
 
static const double YAWRATE_MIN_VALUE = -32.768
 
static const double YAWRATE_MAX_VALUE = 32.767
 

Private Attributes

VelocityCommandTypeEnumeration commandType
 
LinearVelocityScaledInteger velocityX_mps
 
LinearVelocityScaledInteger velocityY_mps
 
LinearVelocityScaledInteger velocityZ_mps
 
AngularVelocityScaledInteger rollRate_rps
 
AngularVelocityScaledInteger pitchRate_rps
 
AngularVelocityScaledInteger yawRate_rps
 
uint8_t presenceVector
 

Friends

OPENJAUS_EXPORT friend std::ostream & operator<< (std::ostream &output, const SetVelocityCommand &object)
 OStream operator for Message object More...
 
OPENJAUS_EXPORT friend std::ostream & operator<< (std::ostream &output, const SetVelocityCommand *object)
 OStream operator for Message pointer More...
 

Additional Inherited Members

- Protected Member Functions inherited from openjaus::transport::Wrapper
 Wrapper (const Wrapper &wrapper)
 
- Protected Attributes inherited from openjaus::transport::Wrapper
AckNakType ackNak
 
bool compressible
 
bool mustArrive
 
uint16_t sequenceNumber
 
WrapperType type
 
Priority priority
 
BroadcastType broadcastFlag
 
LargeMessageType largeMessageFlag
 
Address destination
 
system::Transportablepayload
 
Address source
 
TransportDatatransportData
 
- Protected Attributes inherited from openjaus::model::Trigger
double triggerTimestamp_sec
 
uint32_t id
 

Detailed Description

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

Constructor & Destructor Documentation

§ SetVelocityCommand() [1/2]

openjaus::mobility::SetVelocityCommand::SetVelocityCommand ( )

§ SetVelocityCommand() [2/2]

openjaus::mobility::SetVelocityCommand::SetVelocityCommand ( model::Message message)

§ ~SetVelocityCommand()

openjaus::mobility::SetVelocityCommand::~SetVelocityCommand ( )

Member Function Documentation

§ disablePitchRate()

void openjaus::mobility::SetVelocityCommand::disablePitchRate ( void  )

§ disableRollRate()

void openjaus::mobility::SetVelocityCommand::disableRollRate ( void  )

§ disableVelocityX()

void openjaus::mobility::SetVelocityCommand::disableVelocityX ( void  )

§ disableVelocityY()

void openjaus::mobility::SetVelocityCommand::disableVelocityY ( void  )

§ disableVelocityZ()

void openjaus::mobility::SetVelocityCommand::disableVelocityZ ( void  )

§ disableYawRate()

void openjaus::mobility::SetVelocityCommand::disableYawRate ( void  )

§ enablePitchRate()

void openjaus::mobility::SetVelocityCommand::enablePitchRate ( void  )

§ enableRollRate()

void openjaus::mobility::SetVelocityCommand::enableRollRate ( void  )

§ enableVelocityX()

void openjaus::mobility::SetVelocityCommand::enableVelocityX ( void  )

§ enableVelocityY()

void openjaus::mobility::SetVelocityCommand::enableVelocityY ( void  )

§ enableVelocityZ()

void openjaus::mobility::SetVelocityCommand::enableVelocityZ ( void  )

§ enableYawRate()

void openjaus::mobility::SetVelocityCommand::enableYawRate ( void  )

§ from()

int openjaus::mobility::SetVelocityCommand::from ( system::Buffer src)
virtual
Parameters
[in]src- The source openjaus::system::Buffer from which this message will be unpacked.
Returns
The number of bytes unpacked from the source buffer

Reimplemented from openjaus::transport::Wrapper.

§ getCommandType()

VelocityCommandTypeEnumeration::VelocityCommandTypeEnum openjaus::mobility::SetVelocityCommand::getCommandType ( void  )

§ getCommandTypeToString()

std::string openjaus::mobility::SetVelocityCommand::getCommandTypeToString ( void  )

§ getPitchRate_rps()

double openjaus::mobility::SetVelocityCommand::getPitchRate_rps ( void  )

§ getPresenceVector()

uint8_t openjaus::mobility::SetVelocityCommand::getPresenceVector ( void  ) const

§ getRollRate_rps()

double openjaus::mobility::SetVelocityCommand::getRollRate_rps ( void  )

§ getVelocityX_mps()

double openjaus::mobility::SetVelocityCommand::getVelocityX_mps ( void  )

§ getVelocityY_mps()

double openjaus::mobility::SetVelocityCommand::getVelocityY_mps ( void  )

§ getVelocityZ_mps()

double openjaus::mobility::SetVelocityCommand::getVelocityZ_mps ( void  )

§ getYawRate_rps()

double openjaus::mobility::SetVelocityCommand::getYawRate_rps ( void  )

§ isPitchRateEnabled()

bool openjaus::mobility::SetVelocityCommand::isPitchRateEnabled ( void  ) const

§ isRollRateEnabled()

bool openjaus::mobility::SetVelocityCommand::isRollRateEnabled ( void  ) const

§ isVelocityXEnabled()

bool openjaus::mobility::SetVelocityCommand::isVelocityXEnabled ( void  ) const

§ isVelocityYEnabled()

bool openjaus::mobility::SetVelocityCommand::isVelocityYEnabled ( void  ) const

§ isVelocityZEnabled()

bool openjaus::mobility::SetVelocityCommand::isVelocityZEnabled ( void  ) const

§ isYawRateEnabled()

bool openjaus::mobility::SetVelocityCommand::isYawRateEnabled ( void  ) const

§ length()

int openjaus::mobility::SetVelocityCommand::length ( void  )
virtual
Returns
The number of bytes this message would occupy in a buffer

Reimplemented from openjaus::model::Message.

§ setCommandType()

bool openjaus::mobility::SetVelocityCommand::setCommandType ( VelocityCommandTypeEnumeration::VelocityCommandTypeEnum  value)

§ setPitchRate_rps()

bool openjaus::mobility::SetVelocityCommand::setPitchRate_rps ( double  value)

§ setPresenceVector()

void openjaus::mobility::SetVelocityCommand::setPresenceVector ( uint8_t  value)

§ setRollRate_rps()

bool openjaus::mobility::SetVelocityCommand::setRollRate_rps ( double  value)

§ setVelocityX_mps()

bool openjaus::mobility::SetVelocityCommand::setVelocityX_mps ( double  value)

§ setVelocityY_mps()

bool openjaus::mobility::SetVelocityCommand::setVelocityY_mps ( double  value)

§ setVelocityZ_mps()

bool openjaus::mobility::SetVelocityCommand::setVelocityZ_mps ( double  value)

§ setYawRate_rps()

bool openjaus::mobility::SetVelocityCommand::setYawRate_rps ( double  value)

§ to()

int openjaus::mobility::SetVelocityCommand::to ( system::Buffer dst)
virtual
Parameters
[out]dst- The destination openjaus::system::Buffer to which this message will be packed.
Returns
The number of bytes packed into the destination buffer

Reimplemented from openjaus::transport::Wrapper.

§ toString()

std::string openjaus::mobility::SetVelocityCommand::toString ( ) const
virtual
Returns
The string

Reimplemented from openjaus::model::Message.

§ toXml()

std::string openjaus::mobility::SetVelocityCommand::toXml ( unsigned char  ojIndentLevel = 0) const
Parameters
[in]ojIndentLevel- Used to determine how many tabs are inserted per line for pretty formating.
Returns
The serialized XML string

Friends And Related Function Documentation

§ operator<< [1/2]

OPENJAUS_EXPORT friend std::ostream& operator<< ( std::ostream &  output,
const SetVelocityCommand object 
)
friend

§ operator<< [2/2]

OPENJAUS_EXPORT friend std::ostream& operator<< ( std::ostream &  output,
const SetVelocityCommand object 
)
friend

Member Data Documentation

§ commandType

VelocityCommandTypeEnumeration openjaus::mobility::SetVelocityCommand::commandType
private

§ ID

const uint16_t openjaus::mobility::SetVelocityCommand::ID = 0x0415
static

§ PITCHRATE_MAX_VALUE

const double openjaus::mobility::SetVelocityCommand::PITCHRATE_MAX_VALUE = 32.767
static

§ PITCHRATE_MIN_VALUE

const double openjaus::mobility::SetVelocityCommand::PITCHRATE_MIN_VALUE = -32.768
static

§ pitchRate_rps

AngularVelocityScaledInteger openjaus::mobility::SetVelocityCommand::pitchRate_rps
private

§ presenceVector

uint8_t openjaus::mobility::SetVelocityCommand::presenceVector
private

§ PV_ALL_FIELDS

const uint8_t openjaus::mobility::SetVelocityCommand::PV_ALL_FIELDS = 0xFF
static

§ PV_NO_FIELDS

const uint8_t openjaus::mobility::SetVelocityCommand::PV_NO_FIELDS = 0x0
static

§ PV_PITCHRATE

const uint8_t openjaus::mobility::SetVelocityCommand::PV_PITCHRATE = 0x10
static

§ PV_ROLLRATE

const uint8_t openjaus::mobility::SetVelocityCommand::PV_ROLLRATE = 0x8
static

§ PV_VELOCITYX

const uint8_t openjaus::mobility::SetVelocityCommand::PV_VELOCITYX = 0x1
static

§ PV_VELOCITYY

const uint8_t openjaus::mobility::SetVelocityCommand::PV_VELOCITYY = 0x2
static

§ PV_VELOCITYZ

const uint8_t openjaus::mobility::SetVelocityCommand::PV_VELOCITYZ = 0x4
static

§ PV_YAWRATE

const uint8_t openjaus::mobility::SetVelocityCommand::PV_YAWRATE = 0x20
static

§ ROLLRATE_MAX_VALUE

const double openjaus::mobility::SetVelocityCommand::ROLLRATE_MAX_VALUE = 32.767
static

§ ROLLRATE_MIN_VALUE

const double openjaus::mobility::SetVelocityCommand::ROLLRATE_MIN_VALUE = -32.768
static

§ rollRate_rps

AngularVelocityScaledInteger openjaus::mobility::SetVelocityCommand::rollRate_rps
private

§ VELOCITYX_MAX_VALUE

const double openjaus::mobility::SetVelocityCommand::VELOCITYX_MAX_VALUE = 327.67
static

§ VELOCITYX_MIN_VALUE

const double openjaus::mobility::SetVelocityCommand::VELOCITYX_MIN_VALUE = -327.68
static

§ velocityX_mps

LinearVelocityScaledInteger openjaus::mobility::SetVelocityCommand::velocityX_mps
private

§ VELOCITYY_MAX_VALUE

const double openjaus::mobility::SetVelocityCommand::VELOCITYY_MAX_VALUE = 327.67
static

§ VELOCITYY_MIN_VALUE

const double openjaus::mobility::SetVelocityCommand::VELOCITYY_MIN_VALUE = -327.68
static

§ velocityY_mps

LinearVelocityScaledInteger openjaus::mobility::SetVelocityCommand::velocityY_mps
private

§ VELOCITYZ_MAX_VALUE

const double openjaus::mobility::SetVelocityCommand::VELOCITYZ_MAX_VALUE = 327.67
static

§ VELOCITYZ_MIN_VALUE

const double openjaus::mobility::SetVelocityCommand::VELOCITYZ_MIN_VALUE = -327.68
static

§ velocityZ_mps

LinearVelocityScaledInteger openjaus::mobility::SetVelocityCommand::velocityZ_mps
private

§ YAWRATE_MAX_VALUE

const double openjaus::mobility::SetVelocityCommand::YAWRATE_MAX_VALUE = 32.767
static

§ YAWRATE_MIN_VALUE

const double openjaus::mobility::SetVelocityCommand::YAWRATE_MIN_VALUE = -32.768
static

§ yawRate_rps

AngularVelocityScaledInteger openjaus::mobility::SetVelocityCommand::yawRate_rps
private

The documentation for this class was generated from the following files: