Robsonema - Nucleo Master FM
Dependencies: mbed ros_lib_melodic
Roslib/robsonema_service/Service_Setpoint.h@0:a4a02499a5f3, 2020-10-26 (annotated)
- Committer:
- jazulienux
- Date:
- Mon Oct 26 22:25:16 2020 +0000
- Revision:
- 0:a4a02499a5f3
Robsonema - NucleoFM
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jazulienux | 0:a4a02499a5f3 | 1 | #ifndef _ROS_SERVICE_Service_Setpoint_h |
jazulienux | 0:a4a02499a5f3 | 2 | #define _ROS_SERVICE_Service_Setpoint_h |
jazulienux | 0:a4a02499a5f3 | 3 | #include <stdint.h> |
jazulienux | 0:a4a02499a5f3 | 4 | #include <string.h> |
jazulienux | 0:a4a02499a5f3 | 5 | #include <stdlib.h> |
jazulienux | 0:a4a02499a5f3 | 6 | #include "ros/msg.h" |
jazulienux | 0:a4a02499a5f3 | 7 | #include "geometry_msgs/Quaternion.h" |
jazulienux | 0:a4a02499a5f3 | 8 | |
jazulienux | 0:a4a02499a5f3 | 9 | namespace robsonema_service |
jazulienux | 0:a4a02499a5f3 | 10 | { |
jazulienux | 0:a4a02499a5f3 | 11 | |
jazulienux | 0:a4a02499a5f3 | 12 | static const char SERVICE_SETPOINT[] = "robsonema_service/Service_Setpoint"; |
jazulienux | 0:a4a02499a5f3 | 13 | |
jazulienux | 0:a4a02499a5f3 | 14 | class Service_SetpointRequest : public ros::Msg |
jazulienux | 0:a4a02499a5f3 | 15 | { |
jazulienux | 0:a4a02499a5f3 | 16 | public: |
jazulienux | 0:a4a02499a5f3 | 17 | typedef geometry_msgs::Quaternion _setpoint_type; |
jazulienux | 0:a4a02499a5f3 | 18 | _setpoint_type setpoint; |
jazulienux | 0:a4a02499a5f3 | 19 | |
jazulienux | 0:a4a02499a5f3 | 20 | Service_SetpointRequest(): |
jazulienux | 0:a4a02499a5f3 | 21 | setpoint() |
jazulienux | 0:a4a02499a5f3 | 22 | { |
jazulienux | 0:a4a02499a5f3 | 23 | } |
jazulienux | 0:a4a02499a5f3 | 24 | |
jazulienux | 0:a4a02499a5f3 | 25 | virtual int serialize(unsigned char *outbuffer) const |
jazulienux | 0:a4a02499a5f3 | 26 | { |
jazulienux | 0:a4a02499a5f3 | 27 | int offset = 0; |
jazulienux | 0:a4a02499a5f3 | 28 | offset += this->setpoint.serialize(outbuffer + offset); |
jazulienux | 0:a4a02499a5f3 | 29 | return offset; |
jazulienux | 0:a4a02499a5f3 | 30 | } |
jazulienux | 0:a4a02499a5f3 | 31 | |
jazulienux | 0:a4a02499a5f3 | 32 | virtual int deserialize(unsigned char *inbuffer) |
jazulienux | 0:a4a02499a5f3 | 33 | { |
jazulienux | 0:a4a02499a5f3 | 34 | int offset = 0; |
jazulienux | 0:a4a02499a5f3 | 35 | offset += this->setpoint.deserialize(inbuffer + offset); |
jazulienux | 0:a4a02499a5f3 | 36 | return offset; |
jazulienux | 0:a4a02499a5f3 | 37 | } |
jazulienux | 0:a4a02499a5f3 | 38 | |
jazulienux | 0:a4a02499a5f3 | 39 | const char * getType(){ return SERVICE_SETPOINT; }; |
jazulienux | 0:a4a02499a5f3 | 40 | const char * getMD5(){ return "f79aadd993d02e3313c7a2909b0f4702"; }; |
jazulienux | 0:a4a02499a5f3 | 41 | |
jazulienux | 0:a4a02499a5f3 | 42 | }; |
jazulienux | 0:a4a02499a5f3 | 43 | |
jazulienux | 0:a4a02499a5f3 | 44 | class Service_SetpointResponse : public ros::Msg |
jazulienux | 0:a4a02499a5f3 | 45 | { |
jazulienux | 0:a4a02499a5f3 | 46 | public: |
jazulienux | 0:a4a02499a5f3 | 47 | |
jazulienux | 0:a4a02499a5f3 | 48 | Service_SetpointResponse() |
jazulienux | 0:a4a02499a5f3 | 49 | { |
jazulienux | 0:a4a02499a5f3 | 50 | } |
jazulienux | 0:a4a02499a5f3 | 51 | |
jazulienux | 0:a4a02499a5f3 | 52 | virtual int serialize(unsigned char *outbuffer) const |
jazulienux | 0:a4a02499a5f3 | 53 | { |
jazulienux | 0:a4a02499a5f3 | 54 | int offset = 0; |
jazulienux | 0:a4a02499a5f3 | 55 | return offset; |
jazulienux | 0:a4a02499a5f3 | 56 | } |
jazulienux | 0:a4a02499a5f3 | 57 | |
jazulienux | 0:a4a02499a5f3 | 58 | virtual int deserialize(unsigned char *inbuffer) |
jazulienux | 0:a4a02499a5f3 | 59 | { |
jazulienux | 0:a4a02499a5f3 | 60 | int offset = 0; |
jazulienux | 0:a4a02499a5f3 | 61 | return offset; |
jazulienux | 0:a4a02499a5f3 | 62 | } |
jazulienux | 0:a4a02499a5f3 | 63 | |
jazulienux | 0:a4a02499a5f3 | 64 | const char * getType(){ return SERVICE_SETPOINT; }; |
jazulienux | 0:a4a02499a5f3 | 65 | const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; |
jazulienux | 0:a4a02499a5f3 | 66 | |
jazulienux | 0:a4a02499a5f3 | 67 | }; |
jazulienux | 0:a4a02499a5f3 | 68 | |
jazulienux | 0:a4a02499a5f3 | 69 | class Service_Setpoint { |
jazulienux | 0:a4a02499a5f3 | 70 | public: |
jazulienux | 0:a4a02499a5f3 | 71 | typedef Service_SetpointRequest Request; |
jazulienux | 0:a4a02499a5f3 | 72 | typedef Service_SetpointResponse Response; |
jazulienux | 0:a4a02499a5f3 | 73 | }; |
jazulienux | 0:a4a02499a5f3 | 74 | |
jazulienux | 0:a4a02499a5f3 | 75 | } |
jazulienux | 0:a4a02499a5f3 | 76 | #endif |