add custom ros messages

Dependents:   stm32_actuator_gobeur

Revision:
0:49ecb29f2afc
Child:
1:60f7c46cc24c
diff -r 000000000000 -r 49ecb29f2afc game_manager/GameStatus.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/game_manager/GameStatus.h	Thu Jul 08 17:14:33 2021 +0000
@@ -0,0 +1,55 @@
+#ifndef _ROS_stm32_game_manager_game_status_h
+#define _ROS_stm32_game_manager_game_status_h
+
+#include <stdint.h>
+#include <string.h>
+#include <stdlib.h>
+#include "ros/msg.h"
+
+
+namespace game_manager_node
+{
+
+  class game_status_msg : public ros::Msg
+  {
+    public:
+        typedef uint8_t _game_status_type;
+        _game_status_type game_status;
+        typedef uint8_t _init_status_type;
+        _init_status_type init_status;
+
+        game_status_msg():
+            game_status(0),
+            init_status(0)
+        {
+        }
+    
+        virtual int serialize(unsigned char *outbuffer) const
+        {
+            int offset = 0;
+            *(outbuffer + offset + 0) = (this->game_status >> (8 * 0)) & 0xFF;
+            offset += sizeof(this->game_status);
+            *(outbuffer + offset + 0) = (this->init_status >> (8 * 0)) & 0xFF;
+            offset += sizeof(this->init_status);
+            return offset;
+        }
+    
+        virtual int deserialize(unsigned char *inbuffer)
+        {
+            int offset = 0;
+            this->game_status =  ((uint8_t) (*(inbuffer + offset)));
+            offset += sizeof(this->game_status);
+            this->init_status =  ((uint8_t) (*(inbuffer + offset)));
+            offset += sizeof(this->init_status);
+            return offset;
+        }
+    
+        const char * getType(){ return "game_manager/GameStatus"; };
+        const char * getMD5(){ return "33a9b4e076016e58fe35593be08a2827"; };
+
+  };
+
+}
+ 
+
+#endif
\ No newline at end of file