Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
CameraMovement.h
00001 #ifndef _ROS_view_controller_msgs_CameraMovement_h 00002 #define _ROS_view_controller_msgs_CameraMovement_h 00003 00004 #include <stdint.h> 00005 #include <string.h> 00006 #include <stdlib.h> 00007 #include "ros/msg.h" 00008 #include "geometry_msgs/PointStamped.h" 00009 #include "geometry_msgs/Vector3Stamped.h" 00010 #include "ros/duration.h" 00011 00012 namespace view_controller_msgs 00013 { 00014 00015 class CameraMovement : public ros::Msg 00016 { 00017 public: 00018 typedef geometry_msgs::PointStamped _eye_type; 00019 _eye_type eye; 00020 typedef geometry_msgs::PointStamped _focus_type; 00021 _focus_type focus; 00022 typedef geometry_msgs::Vector3Stamped _up_type; 00023 _up_type up; 00024 typedef ros::Duration _transition_duration_type; 00025 _transition_duration_type transition_duration; 00026 typedef uint8_t _interpolation_speed_type; 00027 _interpolation_speed_type interpolation_speed; 00028 enum { RISING = 0 }; 00029 enum { DECLINING = 1 }; 00030 enum { FULL = 2 }; 00031 enum { WAVE = 3 }; 00032 00033 CameraMovement(): 00034 eye(), 00035 focus(), 00036 up(), 00037 transition_duration(), 00038 interpolation_speed(0) 00039 { 00040 } 00041 00042 virtual int serialize(unsigned char *outbuffer) const 00043 { 00044 int offset = 0; 00045 offset += this->eye.serialize(outbuffer + offset); 00046 offset += this->focus.serialize(outbuffer + offset); 00047 offset += this->up.serialize(outbuffer + offset); 00048 *(outbuffer + offset + 0) = (this->transition_duration.sec >> (8 * 0)) & 0xFF; 00049 *(outbuffer + offset + 1) = (this->transition_duration.sec >> (8 * 1)) & 0xFF; 00050 *(outbuffer + offset + 2) = (this->transition_duration.sec >> (8 * 2)) & 0xFF; 00051 *(outbuffer + offset + 3) = (this->transition_duration.sec >> (8 * 3)) & 0xFF; 00052 offset += sizeof(this->transition_duration.sec); 00053 *(outbuffer + offset + 0) = (this->transition_duration.nsec >> (8 * 0)) & 0xFF; 00054 *(outbuffer + offset + 1) = (this->transition_duration.nsec >> (8 * 1)) & 0xFF; 00055 *(outbuffer + offset + 2) = (this->transition_duration.nsec >> (8 * 2)) & 0xFF; 00056 *(outbuffer + offset + 3) = (this->transition_duration.nsec >> (8 * 3)) & 0xFF; 00057 offset += sizeof(this->transition_duration.nsec); 00058 *(outbuffer + offset + 0) = (this->interpolation_speed >> (8 * 0)) & 0xFF; 00059 offset += sizeof(this->interpolation_speed); 00060 return offset; 00061 } 00062 00063 virtual int deserialize(unsigned char *inbuffer) 00064 { 00065 int offset = 0; 00066 offset += this->eye.deserialize(inbuffer + offset); 00067 offset += this->focus.deserialize(inbuffer + offset); 00068 offset += this->up.deserialize(inbuffer + offset); 00069 this->transition_duration.sec = ((uint32_t) (*(inbuffer + offset))); 00070 this->transition_duration.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00071 this->transition_duration.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00072 this->transition_duration.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00073 offset += sizeof(this->transition_duration.sec); 00074 this->transition_duration.nsec = ((uint32_t) (*(inbuffer + offset))); 00075 this->transition_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00076 this->transition_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00077 this->transition_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00078 offset += sizeof(this->transition_duration.nsec); 00079 this->interpolation_speed = ((uint8_t) (*(inbuffer + offset))); 00080 offset += sizeof(this->interpolation_speed); 00081 return offset; 00082 } 00083 00084 virtual const char * getType(){ return "view_controller_msgs/CameraMovement"; }; 00085 virtual const char * getMD5(){ return "fc7aac4a39426fb5e8b2dbb6e85bfc66"; }; 00086 00087 }; 00088 00089 } 00090 #endif
Generated on Mon Sep 26 2022 13:47:00 by
