Message_cmd.h
Go to the documentation of this file.
1 
38 #ifndef SAWYER_MESSAGE_CMD_H
39 #define SAWYER_MESSAGE_CMD_H
40 
41 #include "roch_base/core/Message.h"
42 
43 namespace sawyer
44 {
45 
46  class CmdMessage : public Message
47  {
48  private:
49  static long total_destroyed;
50  static long total_sent;
51 
52  public:
54  {
55  }
56 
57  CmdMessage(const CmdMessage &other) : Message(other)
58  {
59  }
60 
61  virtual ~CmdMessage();
62  };
63 
65  {
66  public:
68 
70  };
71 
73  {
74  public:
76  {
77  USER_SETTINGS = 0x1,
78  FACTORY_SETTINGS = 0x2
79  };
80  public:
81  CmdRestoreSettings(enum restoreFlags flags);
82 
84  };
85 
87  {
88  public:
90 
91  CmdStoreSettings(const CmdStoreSettings &other);
92  };
93 
95  {
96  public:
98  {
99  STEERING = 0,
100  THROTTLE = 2,
101  BRAKE = 4,
102  PAYLOAD_LEN = 6
103  };
104 
105  public:
106  SetAckermannOutput(double steering, double throt, double brake);
107 
109  };
110 
112  {
113  public:
115  {
116  LEFT_P = 0,
117  LEFT_I = 2,
118  LEFT_D = 4,
119  RIGHT_P = 6,
120  RIGHT_I = 8,
121  RIGHT_D = 10,
122  PAYLOAD_LEN = 12
123  };
124 
125  public:
126  SetDifferentialControl(double p,
127  double i,
128  double d);
129 
130  SetDifferentialControl(double left_p,
131  double left_i,
132  double left_d,
133  double right_p,
134  double right_i,
135  double right_d);
136 
138  };
139 
141  {
142  public:
144  {
145  LEFT = 0,
146  RIGHT = 2,
147  PAYLOAD_LEN = 4
148  };
149 
150  public:
151  SetDifferentialOutput(double left, double right);
152 
154  };
155 
157  {
158  public:
160  {
161  LEFT_SPEED = 0,
162  RIGHT_SPEED = 2,
163  LEFT_ACCEL = 4,
164  RIGHT_ACCEL = 6,
165  PAYLOAD_LEN = 8
166  };
167 
168  public:
169  SetDifferentialSpeed(double left_spd, double right_speed, double left_accel, double right_accel);
170 
172  };
173 
174  class SetGear : public CmdMessage
175  {
176  public:
177  SetGear(uint8_t gear);
178 
179  SetGear(const SetGear &other);
180  };
181 
182  class SetMaxAccel : public CmdMessage
183  {
184  public:
186  {
187  MAX_FWD = 0,
188  MAX_REV = 2,
189  PAYLOAD_LEN = 4
190  };
191 
192  public:
193  SetMaxAccel(double max_fwd, double max_rev);
194 
195  SetMaxAccel(const SetMaxAccel &other);
196  };
197 
198  class SetMaxSpeed : public CmdMessage
199  {
200  public:
202  {
203  MAX_FWD = 0,
204  MAX_REV = 2,
205  PAYLOAD_LEN = 4
206  };
207 
208  public:
209  SetMaxSpeed(double max_fwd, double max_rev);
210 
211  SetMaxSpeed(const SetMaxSpeed &other);
212  };
213 
215  {
216  public:
217  SetPlatformName(const char *name);
218 
219  SetPlatformName(const SetPlatformName &other);
220  };
221 
223  {
224  public:
225  SetPlatformTime(uint32_t time);
226 
227  SetPlatformTime(const SetPlatformTime &other);
228  };
229 
231  {
232  public:
233  SetSafetySystem(uint16_t flags);
234 
235  SetSafetySystem(const SetSafetySystem &other);
236  };
237 
238  class SetTurn : public CmdMessage
239  {
240  public:
242  {
243  TRANSLATIONAL = 0,
244  TURN_RADIUS = 2,
245  TRANS_ACCEL = 4,
246  PAYLOAD_LEN = 6
247  };
248 
249  public:
250  SetTurn(double trans, double rad, double accel);
251 
252  SetTurn(const SetTurn &other);
253  };
254 
255  class SetWheelInfo : public CmdMessage
256  {
257  public:
259  {
260  WHEEL_GAUGE = 0,
261  WHEEL_DIAMETER = 2,
262  PAYLOAD_LEN = 4
263  };
264 
265  public:
266  SetWheelInfo(double wheel_gauge, double Wheel_diameter);
267 
268  SetWheelInfo(const SetWheelInfo &other);
269 
270  };
271 
272  class SetVelocity : public CmdMessage
273  {
274  public:
276  {
277  TRANSLATIONAL = 0,
278  ROTATIONAL = 2,
279  TRANS_ACCEL = 4,
280  PAYLOAD_LEN = 6
281  };
282 
283  public:
284  SetVelocity(double trans, double rot, double accel);
285 
286  SetVelocity(const SetVelocity &other);
287  };
288 
289 }; // namespace sawyer
290 
291 #endif // sawyer_MESSAGE_CMD_H
292 
static long total_sent
Definition: Message_cmd.h:50
static long total_destroyed
Definition: Message_cmd.h:49
CmdMessage(const CmdMessage &other)
Definition: Message_cmd.h:57
virtual ~CmdMessage()
Definition: Message_cmd.cpp:69


roch_base
Author(s): Mike Purvis , Paul Bovbel , Chen
autogenerated on Mon Jun 10 2019 14:41:13