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.
Fork of rosserial_mbed_lib by
Diff: std_msgs/MultiArrayDimension.h
- Revision:
- 1:ff0ec969dad1
- Parent:
- 0:77afd7560544
- Child:
- 3:1cf99502f396
diff -r 77afd7560544 -r ff0ec969dad1 std_msgs/MultiArrayDimension.h
--- a/std_msgs/MultiArrayDimension.h Fri Aug 19 09:06:30 2011 +0000
+++ b/std_msgs/MultiArrayDimension.h Sun Oct 16 07:19:36 2011 +0000
@@ -13,8 +13,8 @@
{
public:
char * label;
- unsigned long size;
- unsigned long stride;
+ uint32_t size;
+ uint32_t stride;
virtual int serialize(unsigned char *outbuffer)
{
@@ -25,8 +25,8 @@
memcpy(outbuffer + offset, this->label, *length_label);
offset += *length_label;
union {
- unsigned long real;
- unsigned long base;
+ uint32_t real;
+ uint32_t base;
} u_size;
u_size.real = this->size;
*(outbuffer + offset + 0) = (u_size.base >> (8 * 0)) & 0xFF;
@@ -35,8 +35,8 @@
*(outbuffer + offset + 3) = (u_size.base >> (8 * 3)) & 0xFF;
offset += sizeof(this->size);
union {
- unsigned long real;
- unsigned long base;
+ uint32_t real;
+ uint32_t base;
} u_stride;
u_stride.real = this->stride;
*(outbuffer + offset + 0) = (u_stride.base >> (8 * 0)) & 0xFF;
@@ -59,8 +59,8 @@
this->label = (char *)(inbuffer + offset-1);
offset += length_label;
union {
- unsigned long real;
- unsigned long base;
+ uint32_t real;
+ uint32_t base;
} u_size;
u_size.base = 0;
u_size.base |= ((typeof(u_size.base)) (*(inbuffer + offset + 0))) << (8 * 0);
@@ -70,8 +70,8 @@
this->size = u_size.real;
offset += sizeof(this->size);
union {
- unsigned long real;
- unsigned long base;
+ uint32_t real;
+ uint32_t base;
} u_stride;
u_stride.base = 0;
u_stride.base |= ((typeof(u_stride.base)) (*(inbuffer + offset + 0))) << (8 * 0);
