Apply patch to fix serialization on ARM.#8
Merged
dirk-thomas merged 1 commit intoros:groovy-develfrom Mar 5, 2013
ahendrix:groovy-devel
Merged
Apply patch to fix serialization on ARM.#8dirk-thomas merged 1 commit intoros:groovy-develfrom ahendrix:groovy-devel
dirk-thomas merged 1 commit intoros:groovy-develfrom
ahendrix:groovy-devel
Conversation
dirk-thomas
added a commit
that referenced
this pull request
Mar 5, 2013
Apply patch to fix serialization on ARM.
--- ./include/ros/serialization.h 2013-03-05 10:07:18.210946502 +0100
+++ ./patch/serialization.h 2013-03-05 10:03:51.195321502 +0100
@@ -170,6 +170,7 @@
return Serializer::serializedLength(t);
}
+#if (!(defined __ARMEL__ && defined __VFP_FP__))
#define ROS_CREATE_SIMPLE_SERIALIZER(Type) \
template<> struct Serializer \
{ \
@@ -188,6 +189,26 @@
return sizeof(Type); \
} \
};
+#else
+#define ROS_CREATE_SIMPLE_SERIALIZER(Type) \
+ template<> struct Serializer \
+ { \
+ template inline static void write(Stream& stream, const Type v) \
+ { \
+ memcpy((void*)stream.advance(sizeof(v)), (const void*) &v, sizeof(v)); \
+ } \
+ \
+ template inline static void read(Stream& stream, Type& v) \
+ { \
+ memcpy((void*)&v, (const void*) stream.advance(sizeof(v)), sizeof(v)); \
+ } \
+ \
+ inline static uint32_t serializedLength(const Type&) \
+ { \
+ return sizeof(Type); \
+ } \
+ };
+#endif
ROS_CREATE_SIMPLE_SERIALIZER(uint8_t);
ROS_CREATE_SIMPLE_SERIALIZER(int8_t);
|
Member
|
A patch was already committed to roscpp_core as references above. Please take a look to that patch and comment if you think it needs further tweaking. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Apply patch ask_arm_flag_serialization.h.diff from https://code.ros.org/trac/ros/ticket/2883
This fixes ros/ros_comm#184