Fawkes API
Fawkes Development Version
|
00001 00002 /*************************************************************************** 00003 * KatanaInterface.h - Fawkes BlackBoard Interface - KatanaInterface 00004 * 00005 * Templated created: Thu Oct 12 10:49:19 2006 00006 * Copyright 2009 Tim Niemueller 00007 * 00008 ****************************************************************************/ 00009 00010 /* This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. A runtime exception applies to 00014 * this software (see LICENSE.GPL_WRE file mentioned below for details). 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Library General Public License for more details. 00020 * 00021 * Read the full text in the LICENSE.GPL_WRE file in the doc directory. 00022 */ 00023 00024 #ifndef __INTERFACES_KATANAINTERFACE_H_ 00025 #define __INTERFACES_KATANAINTERFACE_H_ 00026 00027 #include <interface/interface.h> 00028 #include <interface/message.h> 00029 #include <interface/field_iterator.h> 00030 00031 namespace fawkes { 00032 00033 class KatanaInterface : public Interface 00034 { 00035 /// @cond INTERNALS 00036 INTERFACE_MGMT_FRIENDS(KatanaInterface) 00037 /// @endcond 00038 public: 00039 /* constants */ 00040 static const uint32_t SENSOR_IR_RIGHT_INNER_MIDDLE; 00041 static const uint32_t SENSOR_IR_RIGHT_INNER_FRONT; 00042 static const uint32_t SENSOR_RESERVED_2; 00043 static const uint32_t SENSOR_COND_BOTH; 00044 static const uint32_t SENSOR_IR_RIGHT_OUTER_FRONT; 00045 static const uint32_t SENSOR_IR_RIGHT_BOTTOM_FRONT; 00046 static const uint32_t SENSOR_FORCE_RIGHT_REAR; 00047 static const uint32_t SENSOR_FORCE_RIGHT_FRONT; 00048 static const uint32_t SENSOR_IR_LEFT_INNER_MIDDLE; 00049 static const uint32_t SENSOR_IR_LEFT_INNER_FRONT; 00050 static const uint32_t SENSOR_RESERVED_10; 00051 static const uint32_t SENSOR_IR_CENTER_GRIPPER; 00052 static const uint32_t SENSOR_IR_LEFT_OUTER_FRONT; 00053 static const uint32_t SENSOR_IR_LEFT_BOTTOM_FRONT; 00054 static const uint32_t SENSOR_FORCE_LEFT_REAR; 00055 static const uint32_t SENSOR_FORCE_LEFT_FRONT; 00056 static const uint32_t ERROR_NONE; 00057 static const uint32_t ERROR_UNSPECIFIC; 00058 static const uint32_t ERROR_CMD_START_FAILED; 00059 static const uint32_t ERROR_NO_SOLUTION; 00060 static const uint32_t ERROR_COMMUNICATION; 00061 static const uint32_t ERROR_MOTOR_CRASHED; 00062 00063 private: 00064 #pragma pack(push,4) 00065 /** Internal data storage, do NOT modify! */ 00066 typedef struct { 00067 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */ 00068 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */ 00069 uint8_t sensor_value[16]; /**< Sensor 00070 values. Use SENSOR_* indexes for accessing the values. */ 00071 float x; /**< DEPRECATED! X-Coordinate for tool position 00072 compared to base coordinate system. */ 00073 float y; /**< DEPRECATED! Y-Coordinate for tool position 00074 compared to base coordinate system. */ 00075 float z; /**< DEPRECATED! Z-Coordinate for tool position 00076 compared to base coordinate system. */ 00077 float phi; /**< DEPRECATED! Euler angle Phi of tool orientation. */ 00078 float theta; /**< DEPRECATED! Euler angle Theta of tool orientation. */ 00079 float psi; /**< DEPRECATED! Euler angle Psi of tool orientation. */ 00080 int32_t encoders[6]; /**< Encoder values of motors */ 00081 float angles[6]; /**< Angle values of motors */ 00082 uint32_t msgid; /**< The ID of the message that is currently being 00083 processed, or 0 if no message is being processed. */ 00084 bool final; /**< True, if the last goto command has been finished, 00085 false if it is still running */ 00086 uint32_t error_code; /**< Failure code set if 00087 final is true. 0 if no error occured, an error code from ERROR_* 00088 constants otherwise (or a bit-wise combination). */ 00089 bool enabled; /**< Are motors enabled? */ 00090 bool calibrated; /**< Has arm been calibrated? */ 00091 uint8_t max_velocity; /**< Maximum velocity */ 00092 uint8_t num_motors; /**< Number of motors */ 00093 } KatanaInterface_data_t; 00094 #pragma pack(pop) 00095 00096 KatanaInterface_data_t *data; 00097 00098 public: 00099 /* messages */ 00100 class StopMessage : public Message 00101 { 00102 private: 00103 #pragma pack(push,4) 00104 /** Internal data storage, do NOT modify! */ 00105 typedef struct { 00106 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */ 00107 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */ 00108 } StopMessage_data_t; 00109 #pragma pack(pop) 00110 00111 StopMessage_data_t *data; 00112 00113 public: 00114 StopMessage(); 00115 ~StopMessage(); 00116 00117 StopMessage(const StopMessage *m); 00118 /* Methods */ 00119 virtual Message * clone() const; 00120 }; 00121 00122 class FlushMessage : public Message 00123 { 00124 private: 00125 #pragma pack(push,4) 00126 /** Internal data storage, do NOT modify! */ 00127 typedef struct { 00128 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */ 00129 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */ 00130 } FlushMessage_data_t; 00131 #pragma pack(pop) 00132 00133 FlushMessage_data_t *data; 00134 00135 public: 00136 FlushMessage(); 00137 ~FlushMessage(); 00138 00139 FlushMessage(const FlushMessage *m); 00140 /* Methods */ 00141 virtual Message * clone() const; 00142 }; 00143 00144 class ParkMessage : public Message 00145 { 00146 private: 00147 #pragma pack(push,4) 00148 /** Internal data storage, do NOT modify! */ 00149 typedef struct { 00150 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */ 00151 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */ 00152 } ParkMessage_data_t; 00153 #pragma pack(pop) 00154 00155 ParkMessage_data_t *data; 00156 00157 public: 00158 ParkMessage(); 00159 ~ParkMessage(); 00160 00161 ParkMessage(const ParkMessage *m); 00162 /* Methods */ 00163 virtual Message * clone() const; 00164 }; 00165 00166 class LinearGotoMessage : public Message 00167 { 00168 private: 00169 #pragma pack(push,4) 00170 /** Internal data storage, do NOT modify! */ 00171 typedef struct { 00172 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */ 00173 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */ 00174 float theta_error; /**< Error range of theta rotation, gives more flexibility 00175 for IK-solution searching. */ 00176 float offset_xy; /**< Offset to target. Distance in m (on the way to the target) */ 00177 bool straight; /**< Move in a straight line? */ 00178 char trans_frame[32]; /**< tf frame-id of origin's coordinate system, 00179 regarding the translation */ 00180 char rot_frame[32]; /**< tf frame-id of origin's coordinate system, 00181 regarding the rotation. In most cases, this is the robot's base coordinate system. */ 00182 float x; /**< DEPRECATED! X-Coordinate for tool position 00183 compared to base coordinate system. */ 00184 float y; /**< DEPRECATED! Y-Coordinate for tool position 00185 compared to base coordinate system. */ 00186 float z; /**< DEPRECATED! Z-Coordinate for tool position 00187 compared to base coordinate system. */ 00188 float phi; /**< DEPRECATED! Euler angle Phi of tool orientation. */ 00189 float theta; /**< DEPRECATED! Euler angle Theta of tool orientation. */ 00190 float psi; /**< DEPRECATED! Euler angle Psi of tool orientation. */ 00191 } LinearGotoMessage_data_t; 00192 #pragma pack(pop) 00193 00194 LinearGotoMessage_data_t *data; 00195 00196 public: 00197 LinearGotoMessage(const float ini_theta_error, const float ini_offset_xy, const bool ini_straight, const char * ini_trans_frame, const char * ini_rot_frame, const float ini_x, const float ini_y, const float ini_z, const float ini_phi, const float ini_theta, const float ini_psi); 00198 LinearGotoMessage(); 00199 ~LinearGotoMessage(); 00200 00201 LinearGotoMessage(const LinearGotoMessage *m); 00202 /* Methods */ 00203 float theta_error() const; 00204 void set_theta_error(const float new_theta_error); 00205 size_t maxlenof_theta_error() const; 00206 float offset_xy() const; 00207 void set_offset_xy(const float new_offset_xy); 00208 size_t maxlenof_offset_xy() const; 00209 bool is_straight() const; 00210 void set_straight(const bool new_straight); 00211 size_t maxlenof_straight() const; 00212 char * trans_frame() const; 00213 void set_trans_frame(const char * new_trans_frame); 00214 size_t maxlenof_trans_frame() const; 00215 char * rot_frame() const; 00216 void set_rot_frame(const char * new_rot_frame); 00217 size_t maxlenof_rot_frame() const; 00218 float x() const; 00219 void set_x(const float new_x); 00220 size_t maxlenof_x() const; 00221 float y() const; 00222 void set_y(const float new_y); 00223 size_t maxlenof_y() const; 00224 float z() const; 00225 void set_z(const float new_z); 00226 size_t maxlenof_z() const; 00227 float phi() const; 00228 void set_phi(const float new_phi); 00229 size_t maxlenof_phi() const; 00230 float theta() const; 00231 void set_theta(const float new_theta); 00232 size_t maxlenof_theta() const; 00233 float psi() const; 00234 void set_psi(const float new_psi); 00235 size_t maxlenof_psi() const; 00236 virtual Message * clone() const; 00237 }; 00238 00239 class LinearGotoKniMessage : public Message 00240 { 00241 private: 00242 #pragma pack(push,4) 00243 /** Internal data storage, do NOT modify! */ 00244 typedef struct { 00245 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */ 00246 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */ 00247 float x; /**< X-Coordinate for tool position 00248 compared to base libkni coordinate system. */ 00249 float y; /**< Y-Coordinate for tool position 00250 compared to base libkni coordinate system. */ 00251 float z; /**< Z-Coordinate for tool position 00252 compared to base libkni coordinate system. */ 00253 float phi; /**< Euler angle Phi of tool orientation. */ 00254 float theta; /**< Euler angle Theta of tool orientation. */ 00255 float psi; /**< Euler angle Psi of tool orientation. */ 00256 } LinearGotoKniMessage_data_t; 00257 #pragma pack(pop) 00258 00259 LinearGotoKniMessage_data_t *data; 00260 00261 public: 00262 LinearGotoKniMessage(const float ini_x, const float ini_y, const float ini_z, const float ini_phi, const float ini_theta, const float ini_psi); 00263 LinearGotoKniMessage(); 00264 ~LinearGotoKniMessage(); 00265 00266 LinearGotoKniMessage(const LinearGotoKniMessage *m); 00267 /* Methods */ 00268 float x() const; 00269 void set_x(const float new_x); 00270 size_t maxlenof_x() const; 00271 float y() const; 00272 void set_y(const float new_y); 00273 size_t maxlenof_y() const; 00274 float z() const; 00275 void set_z(const float new_z); 00276 size_t maxlenof_z() const; 00277 float phi() const; 00278 void set_phi(const float new_phi); 00279 size_t maxlenof_phi() const; 00280 float theta() const; 00281 void set_theta(const float new_theta); 00282 size_t maxlenof_theta() const; 00283 float psi() const; 00284 void set_psi(const float new_psi); 00285 size_t maxlenof_psi() const; 00286 virtual Message * clone() const; 00287 }; 00288 00289 class ObjectGotoMessage : public Message 00290 { 00291 private: 00292 #pragma pack(push,4) 00293 /** Internal data storage, do NOT modify! */ 00294 typedef struct { 00295 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */ 00296 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */ 00297 char object[32]; /**< Name of object */ 00298 float rot_x; /**< Rotation of object on its x-axis */ 00299 } ObjectGotoMessage_data_t; 00300 #pragma pack(pop) 00301 00302 ObjectGotoMessage_data_t *data; 00303 00304 public: 00305 ObjectGotoMessage(const char * ini_object, const float ini_rot_x); 00306 ObjectGotoMessage(); 00307 ~ObjectGotoMessage(); 00308 00309 ObjectGotoMessage(const ObjectGotoMessage *m); 00310 /* Methods */ 00311 char * object() const; 00312 void set_object(const char * new_object); 00313 size_t maxlenof_object() const; 00314 float rot_x() const; 00315 void set_rot_x(const float new_rot_x); 00316 size_t maxlenof_rot_x() const; 00317 virtual Message * clone() const; 00318 }; 00319 00320 class CalibrateMessage : public Message 00321 { 00322 private: 00323 #pragma pack(push,4) 00324 /** Internal data storage, do NOT modify! */ 00325 typedef struct { 00326 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */ 00327 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */ 00328 } CalibrateMessage_data_t; 00329 #pragma pack(pop) 00330 00331 CalibrateMessage_data_t *data; 00332 00333 public: 00334 CalibrateMessage(); 00335 ~CalibrateMessage(); 00336 00337 CalibrateMessage(const CalibrateMessage *m); 00338 /* Methods */ 00339 virtual Message * clone() const; 00340 }; 00341 00342 class OpenGripperMessage : public Message 00343 { 00344 private: 00345 #pragma pack(push,4) 00346 /** Internal data storage, do NOT modify! */ 00347 typedef struct { 00348 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */ 00349 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */ 00350 } OpenGripperMessage_data_t; 00351 #pragma pack(pop) 00352 00353 OpenGripperMessage_data_t *data; 00354 00355 public: 00356 OpenGripperMessage(); 00357 ~OpenGripperMessage(); 00358 00359 OpenGripperMessage(const OpenGripperMessage *m); 00360 /* Methods */ 00361 virtual Message * clone() const; 00362 }; 00363 00364 class CloseGripperMessage : public Message 00365 { 00366 private: 00367 #pragma pack(push,4) 00368 /** Internal data storage, do NOT modify! */ 00369 typedef struct { 00370 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */ 00371 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */ 00372 } CloseGripperMessage_data_t; 00373 #pragma pack(pop) 00374 00375 CloseGripperMessage_data_t *data; 00376 00377 public: 00378 CloseGripperMessage(); 00379 ~CloseGripperMessage(); 00380 00381 CloseGripperMessage(const CloseGripperMessage *m); 00382 /* Methods */ 00383 virtual Message * clone() const; 00384 }; 00385 00386 class SetEnabledMessage : public Message 00387 { 00388 private: 00389 #pragma pack(push,4) 00390 /** Internal data storage, do NOT modify! */ 00391 typedef struct { 00392 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */ 00393 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */ 00394 bool enabled; /**< Are motors enabled? */ 00395 } SetEnabledMessage_data_t; 00396 #pragma pack(pop) 00397 00398 SetEnabledMessage_data_t *data; 00399 00400 public: 00401 SetEnabledMessage(const bool ini_enabled); 00402 SetEnabledMessage(); 00403 ~SetEnabledMessage(); 00404 00405 SetEnabledMessage(const SetEnabledMessage *m); 00406 /* Methods */ 00407 bool is_enabled() const; 00408 void set_enabled(const bool new_enabled); 00409 size_t maxlenof_enabled() const; 00410 virtual Message * clone() const; 00411 }; 00412 00413 class SetMaxVelocityMessage : public Message 00414 { 00415 private: 00416 #pragma pack(push,4) 00417 /** Internal data storage, do NOT modify! */ 00418 typedef struct { 00419 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */ 00420 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */ 00421 uint8_t max_velocity; /**< Maximum velocity */ 00422 } SetMaxVelocityMessage_data_t; 00423 #pragma pack(pop) 00424 00425 SetMaxVelocityMessage_data_t *data; 00426 00427 public: 00428 SetMaxVelocityMessage(const uint8_t ini_max_velocity); 00429 SetMaxVelocityMessage(); 00430 ~SetMaxVelocityMessage(); 00431 00432 SetMaxVelocityMessage(const SetMaxVelocityMessage *m); 00433 /* Methods */ 00434 uint8_t max_velocity() const; 00435 void set_max_velocity(const uint8_t new_max_velocity); 00436 size_t maxlenof_max_velocity() const; 00437 virtual Message * clone() const; 00438 }; 00439 00440 class SetPlannerParamsMessage : public Message 00441 { 00442 private: 00443 #pragma pack(push,4) 00444 /** Internal data storage, do NOT modify! */ 00445 typedef struct { 00446 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */ 00447 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */ 00448 char plannerparams[1024]; /**< Planner parameters */ 00449 bool straight; /**< Parameters for straight movement? */ 00450 } SetPlannerParamsMessage_data_t; 00451 #pragma pack(pop) 00452 00453 SetPlannerParamsMessage_data_t *data; 00454 00455 public: 00456 SetPlannerParamsMessage(const char * ini_plannerparams, const bool ini_straight); 00457 SetPlannerParamsMessage(); 00458 ~SetPlannerParamsMessage(); 00459 00460 SetPlannerParamsMessage(const SetPlannerParamsMessage *m); 00461 /* Methods */ 00462 char * plannerparams() const; 00463 void set_plannerparams(const char * new_plannerparams); 00464 size_t maxlenof_plannerparams() const; 00465 bool is_straight() const; 00466 void set_straight(const bool new_straight); 00467 size_t maxlenof_straight() const; 00468 virtual Message * clone() const; 00469 }; 00470 00471 class SetMotorEncoderMessage : public Message 00472 { 00473 private: 00474 #pragma pack(push,4) 00475 /** Internal data storage, do NOT modify! */ 00476 typedef struct { 00477 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */ 00478 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */ 00479 uint32_t nr; /**< Motor number */ 00480 uint32_t enc; /**< Encoder value */ 00481 } SetMotorEncoderMessage_data_t; 00482 #pragma pack(pop) 00483 00484 SetMotorEncoderMessage_data_t *data; 00485 00486 public: 00487 SetMotorEncoderMessage(const uint32_t ini_nr, const uint32_t ini_enc); 00488 SetMotorEncoderMessage(); 00489 ~SetMotorEncoderMessage(); 00490 00491 SetMotorEncoderMessage(const SetMotorEncoderMessage *m); 00492 /* Methods */ 00493 uint32_t nr() const; 00494 void set_nr(const uint32_t new_nr); 00495 size_t maxlenof_nr() const; 00496 uint32_t enc() const; 00497 void set_enc(const uint32_t new_enc); 00498 size_t maxlenof_enc() const; 00499 virtual Message * clone() const; 00500 }; 00501 00502 class MoveMotorEncoderMessage : public Message 00503 { 00504 private: 00505 #pragma pack(push,4) 00506 /** Internal data storage, do NOT modify! */ 00507 typedef struct { 00508 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */ 00509 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */ 00510 uint32_t nr; /**< Motor number */ 00511 uint32_t enc; /**< Encoder value */ 00512 } MoveMotorEncoderMessage_data_t; 00513 #pragma pack(pop) 00514 00515 MoveMotorEncoderMessage_data_t *data; 00516 00517 public: 00518 MoveMotorEncoderMessage(const uint32_t ini_nr, const uint32_t ini_enc); 00519 MoveMotorEncoderMessage(); 00520 ~MoveMotorEncoderMessage(); 00521 00522 MoveMotorEncoderMessage(const MoveMotorEncoderMessage *m); 00523 /* Methods */ 00524 uint32_t nr() const; 00525 void set_nr(const uint32_t new_nr); 00526 size_t maxlenof_nr() const; 00527 uint32_t enc() const; 00528 void set_enc(const uint32_t new_enc); 00529 size_t maxlenof_enc() const; 00530 virtual Message * clone() const; 00531 }; 00532 00533 class SetMotorAngleMessage : public Message 00534 { 00535 private: 00536 #pragma pack(push,4) 00537 /** Internal data storage, do NOT modify! */ 00538 typedef struct { 00539 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */ 00540 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */ 00541 uint32_t nr; /**< Motor number */ 00542 float angle; /**< Angle value (positive: increase; negative: decrease) */ 00543 } SetMotorAngleMessage_data_t; 00544 #pragma pack(pop) 00545 00546 SetMotorAngleMessage_data_t *data; 00547 00548 public: 00549 SetMotorAngleMessage(const uint32_t ini_nr, const float ini_angle); 00550 SetMotorAngleMessage(); 00551 ~SetMotorAngleMessage(); 00552 00553 SetMotorAngleMessage(const SetMotorAngleMessage *m); 00554 /* Methods */ 00555 uint32_t nr() const; 00556 void set_nr(const uint32_t new_nr); 00557 size_t maxlenof_nr() const; 00558 float angle() const; 00559 void set_angle(const float new_angle); 00560 size_t maxlenof_angle() const; 00561 virtual Message * clone() const; 00562 }; 00563 00564 class MoveMotorAngleMessage : public Message 00565 { 00566 private: 00567 #pragma pack(push,4) 00568 /** Internal data storage, do NOT modify! */ 00569 typedef struct { 00570 int64_t timestamp_sec; /**< Interface Unix timestamp, seconds */ 00571 int64_t timestamp_usec; /**< Interface Unix timestamp, micro-seconds */ 00572 uint32_t nr; /**< Motor number */ 00573 float angle; /**< Angle value (positive: increase; negative: decrease) */ 00574 } MoveMotorAngleMessage_data_t; 00575 #pragma pack(pop) 00576 00577 MoveMotorAngleMessage_data_t *data; 00578 00579 public: 00580 MoveMotorAngleMessage(const uint32_t ini_nr, const float ini_angle); 00581 MoveMotorAngleMessage(); 00582 ~MoveMotorAngleMessage(); 00583 00584 MoveMotorAngleMessage(const MoveMotorAngleMessage *m); 00585 /* Methods */ 00586 uint32_t nr() const; 00587 void set_nr(const uint32_t new_nr); 00588 size_t maxlenof_nr() const; 00589 float angle() const; 00590 void set_angle(const float new_angle); 00591 size_t maxlenof_angle() const; 00592 virtual Message * clone() const; 00593 }; 00594 00595 virtual bool message_valid(const Message *message) const; 00596 private: 00597 KatanaInterface(); 00598 ~KatanaInterface(); 00599 00600 public: 00601 /* Methods */ 00602 uint8_t * sensor_value() const; 00603 uint8_t sensor_value(unsigned int index) const; 00604 void set_sensor_value(unsigned int index, const uint8_t new_sensor_value); 00605 void set_sensor_value(const uint8_t * new_sensor_value); 00606 size_t maxlenof_sensor_value() const; 00607 float x() const; 00608 void set_x(const float new_x); 00609 size_t maxlenof_x() const; 00610 float y() const; 00611 void set_y(const float new_y); 00612 size_t maxlenof_y() const; 00613 float z() const; 00614 void set_z(const float new_z); 00615 size_t maxlenof_z() const; 00616 float phi() const; 00617 void set_phi(const float new_phi); 00618 size_t maxlenof_phi() const; 00619 float theta() const; 00620 void set_theta(const float new_theta); 00621 size_t maxlenof_theta() const; 00622 float psi() const; 00623 void set_psi(const float new_psi); 00624 size_t maxlenof_psi() const; 00625 int32_t * encoders() const; 00626 int32_t encoders(unsigned int index) const; 00627 void set_encoders(unsigned int index, const int32_t new_encoders); 00628 void set_encoders(const int32_t * new_encoders); 00629 size_t maxlenof_encoders() const; 00630 float * angles() const; 00631 float angles(unsigned int index) const; 00632 void set_angles(unsigned int index, const float new_angles); 00633 void set_angles(const float * new_angles); 00634 size_t maxlenof_angles() const; 00635 uint32_t msgid() const; 00636 void set_msgid(const uint32_t new_msgid); 00637 size_t maxlenof_msgid() const; 00638 bool is_final() const; 00639 void set_final(const bool new_final); 00640 size_t maxlenof_final() const; 00641 uint32_t error_code() const; 00642 void set_error_code(const uint32_t new_error_code); 00643 size_t maxlenof_error_code() const; 00644 bool is_enabled() const; 00645 void set_enabled(const bool new_enabled); 00646 size_t maxlenof_enabled() const; 00647 bool is_calibrated() const; 00648 void set_calibrated(const bool new_calibrated); 00649 size_t maxlenof_calibrated() const; 00650 uint8_t max_velocity() const; 00651 void set_max_velocity(const uint8_t new_max_velocity); 00652 size_t maxlenof_max_velocity() const; 00653 uint8_t num_motors() const; 00654 void set_num_motors(const uint8_t new_num_motors); 00655 size_t maxlenof_num_motors() const; 00656 virtual Message * create_message(const char *type) const; 00657 00658 virtual void copy_values(const Interface *other); 00659 virtual const char * enum_tostring(const char *enumtype, int val) const; 00660 00661 }; 00662 00663 } // end namespace fawkes 00664 00665 #endif