#include <command.hpp>
Classes | |
struct | Data |
Data structure containing data for commands. More... | |
Public Types | |
typedef ecl::PushAndPop< unsigned char > | Buffer |
typedef ecl::Stencil< Buffer > | BufferStencil |
enum | Name { Power = 1, BaseControl = 2, YawPlatform =3, PitchPlatform = 4, Sound = 5, StateLed = 6, Lift = 7 } |
Public Member Functions | |
bool | deserialise (ecl::PushAndPop< unsigned char > &byteStream) |
void | resetBuffer (Buffer &buffer) |
bool | serialise (ecl::PushAndPop< unsigned char > &byteStream) |
virtual | ~Command () |
Public Member Functions inherited from packet_handler::payloadBase | |
payloadBase (const bool is_dynamic_=false, const unsigned char length_=0) | |
virtual | ~payloadBase () |
Static Public Member Functions | |
static Command | SetLedControl (const unsigned char &led) |
static Command | SetLiftControl (const unsigned char &lift_height) |
static Command | SetPitchPlatformControl (const int &pitch_platform_degree) |
static Command | SetPowerControl (const bool &power_state) |
static Command | SetSoundControl (const bool &sound_state) |
static Command | SetVelocityControl (DiffDrive &diff_drive) |
static Command | SetVelocityControl (const float &speed, const float &radius) |
static Command | SetYawPlatformControl (const int &yaw_platform_degree) |
Public Attributes | |
Data | data |
Public Attributes inherited from packet_handler::payloadBase | |
const bool | is_dynamic |
const unsigned char | length |
bool | yes |
Static Private Attributes | |
static const unsigned char | header0 = 0xaa |
static const unsigned char | header1 = 0x55 |
Additional Inherited Members | |
Protected Member Functions inherited from packet_handler::payloadBase | |
template<typename T > | |
void | buildBytes (const T &V, ecl::PushAndPop< unsigned char > &buffer) |
template<> | |
void | buildBytes (const float &V, ecl::PushAndPop< unsigned char > &buffer) |
template<typename T > | |
void | buildVariable (T &V, ecl::PushAndPop< unsigned char > &buffer) |
template<> | |
void | buildVariable (float &V, ecl::PushAndPop< unsigned char > &buffer) |
Definition at line 33 of file command.hpp.
typedef ecl::PushAndPop<unsigned char> xbot::Command::Buffer |
Definition at line 36 of file command.hpp.
typedef ecl::Stencil< Buffer > xbot::Command::BufferStencil |
Definition at line 37 of file command.hpp.
enum xbot::Command::Name |
These values are used to detect the type of sub-payload that is ensuing.
Enumerator | |
---|---|
Power | |
BaseControl | |
YawPlatform | |
PitchPlatform | |
Sound | |
StateLed | |
Lift |
Definition at line 42 of file command.hpp.
|
inlinevirtual |
Definition at line 98 of file command.hpp.
|
inlinevirtual |
void xbot::Command::resetBuffer | ( | Buffer & | buffer | ) |
Clears the command buffer and resets the header.
Definition at line 118 of file command.cpp.
|
virtual |
Implements packet_handler::payloadBase.
Definition at line 126 of file command.cpp.
|
static |
Definition at line 94 of file command.cpp.
|
static |
Definition at line 57 of file command.cpp.
|
static |
Definition at line 76 of file command.cpp.
|
static |
Definition at line 104 of file command.cpp.
|
static |
Definition at line 85 of file command.cpp.
Definition at line 38 of file command.cpp.
|
static |
Definition at line 48 of file command.cpp.
|
static |
Definition at line 67 of file command.cpp.
Data xbot::Command::data |
Definition at line 114 of file command.hpp.
|
staticprivate |
Definition at line 121 of file command.hpp.
|
staticprivate |
Definition at line 122 of file command.hpp.