13#ifndef KOBUKI_CORE_COMMAND_DATA_HPP__
14#define KOBUKI_CORE_COMMAND_DATA_HPP__
20#include <ecl/containers.hpp>
22#include "modules/led_array.hpp"
37 typedef ecl::PushAndPop<unsigned char> Buffer;
38 typedef ecl::Stencil< Buffer > BufferStencil;
45 BaseControl = 1, Sound = 3, SoundSequence = 4, RequestExtra = 9, ChangeFrame = 10, RequestEeprom = 11,
46 SetDigitalOut = 12, SetController = 13, GetController = 14
51 HardwareVersion = 0x01, FirmwareVersion = 0x02,
UniqueDeviceID = 0x08
69 : command(BaseControl), speed(0), radius(0), request_flags(0), gp_out(0x00f0)
70 , type(0), p_gain(1000), i_gain(1000), d_gain(1000)
82 unsigned char duration;
87 unsigned char segment_name;
90 uint16_t request_flags;
93 unsigned char frame_id;
108 unsigned char reserved;
113 static Command SetLedArray(
const enum LedNumber &number,
const enum LedColour &colour,
Command::Data ¤t_data);
116 static Command PlaySoundSequence(
const enum SoundSequences &number);
117 static Command GetVersionInfo();
119 static Command SetVelocityControl(
const int16_t &speed,
const int16_t &radius);
120 static Command SetControllerGain(
const unsigned char &type,
121 const unsigned int &p_gain,
122 const unsigned int &i_gain,
123 const unsigned int &d_gain);
124 static Command GetControllerGain();
128 void resetBuffer(Buffer &buffer);
129 bool serialise(ecl::PushAndPop<unsigned char> & byteStream);
130 bool deserialise(ecl::PushAndPop<unsigned char> & ) {
return true; }
133 static const unsigned char header0;
134 static const unsigned char header1;
Definition command.hpp:35
bool deserialise(ecl::PushAndPop< unsigned char > &)
Definition command.hpp:130
Name
Definition command.hpp:44
Definition diff_drive.hpp:52
Definition unique_device_id.hpp:35
Provides base class for payloads.
Definition payload_base.hpp:39
Convenience header for modules.
Data structure containing data for commands.
Definition command.hpp:67
Definition digital_output.hpp:29