Robsonema - Nucleo Master FM
Dependencies: mbed ros_lib_melodic
Roslib/robsonema_service/Service_Kicker.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_Kicker_h |
jazulienux | 0:a4a02499a5f3 | 2 | #define _ROS_SERVICE_Service_Kicker_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 "std_msgs/Float32.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_KICKER[] = "robsonema_service/Service_Kicker"; |
jazulienux | 0:a4a02499a5f3 | 13 | |
jazulienux | 0:a4a02499a5f3 | 14 | class Service_KickerRequest : public ros::Msg |
jazulienux | 0:a4a02499a5f3 | 15 | { |
jazulienux | 0:a4a02499a5f3 | 16 | public: |
jazulienux | 0:a4a02499a5f3 | 17 | typedef std_msgs::Float32 _kick_speed_type; |
jazulienux | 0:a4a02499a5f3 | 18 | _kick_speed_type kick_speed; |
jazulienux | 0:a4a02499a5f3 | 19 | |
jazulienux | 0:a4a02499a5f3 | 20 | Service_KickerRequest(): |
jazulienux | 0:a4a02499a5f3 | 21 | kick_speed() |
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->kick_speed.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->kick_speed.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_KICKER; }; |
jazulienux | 0:a4a02499a5f3 | 40 | const char * getMD5(){ return "867966d58be95fe06d929f8b7df2e39f"; }; |
jazulienux | 0:a4a02499a5f3 | 41 | |
jazulienux | 0:a4a02499a5f3 | 42 | }; |
jazulienux | 0:a4a02499a5f3 | 43 | |
jazulienux | 0:a4a02499a5f3 | 44 | class Service_KickerResponse : public ros::Msg |
jazulienux | 0:a4a02499a5f3 | 45 | { |
jazulienux | 0:a4a02499a5f3 | 46 | public: |
jazulienux | 0:a4a02499a5f3 | 47 | |
jazulienux | 0:a4a02499a5f3 | 48 | Service_KickerResponse() |
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_KICKER; }; |
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_Kicker { |
jazulienux | 0:a4a02499a5f3 | 70 | public: |
jazulienux | 0:a4a02499a5f3 | 71 | typedef Service_KickerRequest Request; |
jazulienux | 0:a4a02499a5f3 | 72 | typedef Service_KickerResponse Response; |
jazulienux | 0:a4a02499a5f3 | 73 | }; |
jazulienux | 0:a4a02499a5f3 | 74 | |
jazulienux | 0:a4a02499a5f3 | 75 | } |
jazulienux | 0:a4a02499a5f3 | 76 | #endif |