Skip to content

Commit

Permalink
update micro-CDR to latest
Browse files Browse the repository at this point in the history
    - micro-CDR in PX4/Firmware (f95824f): eProsima/Micro-CDR@50776f4
    - micro-CDR current upstream: eProsima/Micro-CDR@0061c9a
    - Changes: eProsima/Micro-CDR@50776f4...0061c9a

    0061c9a 2018-05-09 julianbermudez - Refs PX4#2870. Fixed shared libs bugs on Windows.
70ad72b 2018-05-09 julianbermudez - Refs PX4#2870. Fixed Windows warning.
12a1ea1 2018-05-08 julianbermudez - Refs PX4#2866. Fixed Windows bugs.
766474a 2018-05-08 julianbermudez - Refs PX4#2866. Moved gtest.cmake to project folder.
cedc95c 2018-05-07 julianbermudez - Refs PX4#2866. Added merger request advices.
4a795f7 2018-05-04 julianbermudez - Refs PX4#2866. Removed string templates.
6d4361c 2018-05-01 julianbermudez - Refs PX4#2854. Fixed Windows CMake bugs.
4a14375 2018-04-29 julianbermudez - Refs PX4#2838. Changed CMake tests architecture.
004cfbd 2018-04-27 julianbermudez - Refs PX4#2838. Checked installation on Linux.
4b40d88 2018-04-27 julianbermudez - Refs PX4#2838. Checked installation on Windows.
f339b30 2018-04-25 julianbermudez - Refs PX4#2838. Remodeled CMake.
69fa53b 2018-04-23 julianbermudez - Refs PX4#2832. Changed versioning in CMake.
78d34ed 2018-04-18 julianbermudez - Refs PX4#2801. Changed templates to avoid warning on Windows.
b0a2bfd 2018-04-17 julianbermudez - Refs PX4#2801. Compiling without warning on Windows.
4c02033 2018-04-13 julianbermudez - Refs PX4#2810. Changed autogenerated header.
cf29fa8 2018-04-12 julianbermudez - Refs PX4#2773. Changed header string template.
7b0bea6 2018-04-11 Luis Enrique Muñoz Martín - Fix endianness bug.
ae461d6 2018-04-11 Luis Enrique Muñoz Martín - Added init and reset function with offset.
e756e38 2018-04-11 Luis Enrique Muñoz Martín - Refs PX4#2785. Remove jump functionality.
b058623 2018-04-11 julianbermudez - Refs PX4#2773. Modified string templates for MicroRTPSGen.
54aded8 2018-04-11 julianbermudez - Refs PX4#2773. Added get_alignment functionality.
60d140f 2018-04-10 Luis Enrique Muñoz Martín - Minor change at reset buffer.
104096c 2018-04-09 Luis Enrique Muñoz Martín - Refs PX4#2785. Added sizeof functions. Removed old examples. Added new example.
d96bad7 2018-03-23 Luis Enrique Muñoz Martín - Added new init_micro_buffer function for endian
1c23671 2018-03-09 Luis Enrique Muñoz Martín - Refs PX4#2662. Changes for accept merge request
dca24be 2018-03-07 Luis Enrique Muñoz Martín - Refs PX4#2662. Fix bug with the itetator position in arrays. All tests for sequences
92d2eba 2018-03-07 Luis Enrique Muñoz Martín - 2662 Added sequence functions.
01bc8b7 2018-03-07 Luis Enrique Muñoz Martín - Refs PX4#2662. Change api
84f0685 2018-03-07 Luis Enrique Muñoz Martín - Refs PX4#2662. Added funcionality (without test)
1c4c101 2018-03-06 Luis Enrique Muñoz Martín - Refs PX4#2583. Change examples and README format to markdown
fdb15a2 2018-03-06 Luis Enrique Muñoz Martín - Refs PX4#2583. Change tests.
13c2574 2018-03-06 Luis Enrique Muñoz Martín - Refs PX4#2583. Removed resize funcionality
ad1b9e2 2018-03-06 Ricardo González Moreno - Merge branch 'feature/windows' into 'develop'
1e1f10a 2018-01-15 julianbermudez - Refs PX4#2287. Fixed CMake Linux error.
f91f259 2018-01-10 julianbermudez - Refs PX4#2287. Fixed Windows test linking error.
febd3ab 2018-01-04 julianbermudez - Refs PX4#2287. Fixed Windows compilation errors.
45e8c6a 2017-12-20 Borja Outerelo - Refs:PX4#2429, PX4#2430. Adds returns and error flag. Adds tests.
9efc81d 2017-12-15 julianbermudez - Merge branch 'develop' into feature/micrortpsgen
910c920 2017-12-15 julianbermudez - Refs PX4#2391. Added new deallocate function to header and modified deserialization function.
5d95295 2017-12-15 Borja Outerelo - Merge branch 'develop' of git.sambaserver.eprosima.com:fastcdr/nanocdr into develop
f3d78a1 2017-12-15 Borja Outerelo - Uses cmake old policy for version numbers
309c5ce 2017-12-13 Borja Outerelo - Refs PX4#2393. Adds missing line on deserialization
c3eef39 2017-12-07 julianbermudez - Refs PX4#2383. Added client.h to header file.
fbecfae 2017-12-05 Vicente Monge - Refs PX4#2381. .stg cleanning for c types
f401638 2017-12-05 Vicente Monge - Refs PX4#2381. Avoid double \nin auto generated lines
9767808 2017-12-05 Borja Outerelo - Refs PX4#2381. Adds simple IDL C types
6e65c09 2017-12-05 julianbermudez - Refs PX4#2381. Added C Bacics Types.
edcddfc 2017-12-05 Vicente Monge - Refs PX4#2381. Change stg file from FastCdrCommon.stg to MicroCdrCommon.stg
922ea32 2017-12-05 Borja Outerelo - Creates branch for micrortpsgen related code
cf0fd98 2017-12-01 Borja Outerelo - Refs PX4#2375. Adds licenses
afc70df 2017-11-30 Borja Outerelo - Removes extern warning
a4a754f 2017-11-29 Borja Outerelo - Refs 2362. Extern Endianness check result
e56a5cb 2017-11-20 Borja Outerelo - Fixes Nuttx compilation. Fixeds endianness detection
04cc754 2017-11-03 Luis Enrique Muñoz Martín - [fix bug]: serialization arrays with units with bytes 2,4,8 count their size bad
e41b726 2017-11-02 Luis Enrique Muñoz Martín - [fix bug]: alignment after arrays doesnt work
fda82f0 2017-10-30 Luis Enrique Muñoz Martín - MACHINNE_ENDIANNESS definition is public now
e65c0db 2017-10-26 Luis Enrique Muñoz Martín - fix deserialize limit buffer bug
69f059f 2017-10-26 Luis Enrique Muñoz Martín - fix bug at array with elements higher than a byte
014b4ca 2017-10-25 Luis Enrique Muñoz Martín - fix endianness bug
5fe50b9 2017-10-24 Luis Enrique Muñoz Martín - sequences removed
213736f 2017-10-23 Luis Enrique Muñoz Martín - fix endianness setup
bbe0322 2017-10-19 Luis Enrique Muñoz Martín - removed some code comments
d8a95f6 2017-10-19 Luis Enrique Muñoz Martín - added MicroState
1a34ba0 2017-10-13 Luis Enrique Muñoz Martín - minor changes
bdacfaf 2017-10-09 Luis Enrique Muñoz Martín - Remove examples/performance_cmp_versions
4a91c2a 2017-10-09 Luis Enrique Muñoz Martín - add to .gitignore
3986ff6 2017-10-09 Luis Enrique Muñoz Martín - Actualizacion de README.rst
06ba6bd 2017-10-09 Luis Enrique Muñoz Martín - Release version 2.0.0
3e57dab 2017-10-09 Luis Enrique Muñoz Martín - Release version 2.0.0
e92a78e 2017-10-06 Luis Enrique Muñoz Martín - add basics tests
b19d6a8 2017-10-06 Luis Enrique Muñoz Martín - performance test. dynamic buffers. doc
8005b76 2017-10-05 Luis Enrique Muñoz Martín - New API (definition and implementation) done (no tested).
334ad53 2017-10-04 Luis Enrique Muñoz Martín - initial structure for the new changes
2ea6a1c 2017-10-04 Luis Enrique Muñoz Martín - initial structure for the new changes
4872048 2017-08-28 VicenteEprosima - Merge pull request PX4#5 from dagar/pr-cmake_typo
54c5fec 2017-08-26 Daniel Agar - cmake fix message typo

WIP
  • Loading branch information
dagar authored and TSC21 committed Jun 28, 2018
1 parent dee5635 commit a26fe0b
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion cmake/common/px4_base.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ function(px4_add_common_flags)

set(visibility_flags
-fvisibility=hidden
-include visibility.h
-include ${PX4_SOURCE_DIR}/src/include/visibility.h
)

set(added_c_flags
Expand Down
6 changes: 3 additions & 3 deletions msg/templates/uorb_microcdr/microRTPS_client.cpp.template
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ recv_topics = [s.short_name for idx, s in enumerate(spec) if scope[idx] == MsgSc
#include <ctime>
#include <pthread.h>

#include <microcdr/microCdr.h>
#include <microcdr/microcdr.h>
#include <px4_time.h>
#include <uORB/uORB.h>

Expand Down Expand Up @@ -95,7 +95,7 @@ void* send(void* /*unused*/)
header_length=transport_node->get_header_length();
initStaticAlignedBuffer(&data_buffer[header_length], BUFFER_SIZE-header_length, &microBufferWriter);
// microCDR structs for managing the microBuffer
struct microCDR microCDRWriter;
struct MicroBuffer microCDRWriter;
initMicroCDR(&microCDRWriter, &microBufferWriter);

struct timespec begin;
Expand Down Expand Up @@ -171,7 +171,7 @@ void micrortps_start_topics(struct timespec &begin, int &total_read, uint32_t &r
struct microBuffer microBufferReader;
initDeserializedAlignedBuffer(data_buffer, BUFFER_SIZE, &microBufferReader);
// microCDR structs for managing the microBuffer
struct microCDR microCDRReader;
struct MicroBuffer microCDRReader;
initMicroCDR(&microCDRReader, &microBufferReader);
@[end if]@

Expand Down
24 changes: 12 additions & 12 deletions msg/templates/uorb_microcdr/msg.cpp.template
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ topic_name = spec.short_name
}@

#include <px4_config.h>
#include <microcdr/microCdr.h>
#include <microcdr/microcdr.h>
#include <uORB/topics/@(topic_name).h>
#include <uORB_microcdr/topics/@(topic_name).h>

Expand Down Expand Up @@ -98,9 +98,9 @@ def add_serialize_functions(fields, scope_name):
if (not field.is_header):
if (field.is_builtin):
if (not field.is_array):
print(" serialize"+str(get_serialization_type_name(field.type))+"(input->"+scope_name+str(field.name)+", microCDRWriter);")
print(" serialize_"+str(get_serialization_type_name(field.type))+"(microCDRWriter, input->" + scope_name+str(field.name) + ");")
else:
print(" serialize"+str(get_serialization_type_name(field.base_type))+"Array(input->"+scope_name+str(field.name)+", "+str(field.array_len)+", microCDRWriter);")
print(" serialize_"+str(get_serialization_type_name(field.base_type))+"_array(microCDRWriter, input->" + scope_name+str(field.name) + ", " + str(field.array_len) + ", );")
else:
name = field.name
children_fields = get_children_fields(field.base_type, search_path)
Expand All @@ -116,10 +116,10 @@ def add_deserialize_functions(fields, scope_name):
if (not field.is_header):
if (field.is_builtin):
if (not field.is_array):
print(" deserialize"+str(get_serialization_type_name(field.type))+"(&output->"+scope_name+str(field.name)+", microCDRReader);")
print(" deserialize_" + str(get_serialization_type_name(field.type)) + "(&output->" + scope_name+str(field.name) + ", microCDRReader);")
else:
for i in range(field.array_len):
print(" deserialize"+str(get_serialization_type_name(field.base_type))+"(&output->"+scope_name+str(field.name)+ str('[%d]' %i) +", microCDRReader);")
print(" deserialize_" + str(get_serialization_type_name(field.base_type)) + "(&output->" + scope_name+str(field.name) + str('[%d]' %i) + ", microCDRReader);")
else:
name = field.name
children_fields = get_children_fields(field.base_type, search_path)
Expand All @@ -141,24 +141,24 @@ def add_code_to_deserialize():
add_deserialize_functions(sorted_fields, "")
}@

void serialize_@(topic_name)(const struct @(uorb_struct) *input, char *output, uint32_t *length, struct microCDR *microCDRWriter)
void serialize_@(topic_name)(const struct @(uorb_struct) *input, char *output, uint32_t *length, struct MicroBuffer *microCDRWriter)
{
if (nullptr == input || nullptr == output || nullptr == length || nullptr == microCDRWriter) return;

resetStaticMicroCDRForSerialize(microCDRWriter);
reset_micro_buffer(microCDRWriter);

serializeUnsignedLong(input->timestamp, microCDRWriter);
serialize_uint64_t(microCDRWriter, input->timestamp);
@add_code_to_serialize()

(*length) = microCDRWriter->m_microBuffer->m_serializedBuffer;
}

void deserialize_@(topic_name)(struct @(uorb_struct) *output, char *input, struct microCDR *microCDRReader)
void deserialize_@(topic_name)(struct @(uorb_struct) *output, char *input, struct MicroBuffer *microCDRReader)
{
if (nullptr == output || nullptr == input || nullptr == microCDRReader) return;

resetStaticMicroCDRForDeserialize(microCDRReader);
reset_micro_buffer(microCDRReader);

deserializeUnsignedLong(&output->timestamp, microCDRReader);
deserialize_uint64_t(microCDRReader, &output->timestamp);
@add_code_to_deserialize()
}
}
7 changes: 3 additions & 4 deletions msg/templates/uorb_microcdr/msg.h.template
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ topic_name = spec.short_name
#include <uORB/topics/@(topic_name).h>
#include <uORB_microcdr/topics/@(topic_name).h>

struct microCDR;
struct MicroBuffer;


void serialize_@(topic_name)(const struct @(uorb_struct) *input, char *output, uint32_t *length, struct microCDR *microCDRWriter);
void deserialize_@(topic_name)(struct @(uorb_struct) *output, char *input, struct microCDR *microCDRReader);
void serialize_@(topic_name)(const struct @(uorb_struct) *input, char *output, uint32_t *length, struct MicroBuffer *microCDRWriter);
void deserialize_@(topic_name)(struct @(uorb_struct) *output, char *input, struct MicroBuffer *microCDRReader);
24 changes: 12 additions & 12 deletions msg/tools/px_generate_uorb_topic_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@
}

type_serialize_map = {
'int8': 'SignedChar',
'int16': 'Short',
'int32': 'Int',
'int64': 'Long',
'uint8': 'UnsignedChar',
'uint16': 'UnsignedShort',
'uint32': 'UnsignedInt',
'uint64': 'UnsignedLong',
'float32': 'Float',
'float64': 'Double',
'bool': 'Bool',
'char': 'Char',
'int8': 'char',
'int16': 'int16_t',
'int32': 'int32_t',
'int64': 'int64_t',
'uint8': 'uint8_t',
'uint16': 'uint16_t',
'uint32': 'uint32_t',
'uint64': 'uint64_t',
'float32': 'float',
'float64': 'double',
'bool': 'bool',
'char': 'char',
}

type_idl_map = {
Expand Down
5 changes: 3 additions & 2 deletions src/modules/micrortps_bridge/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ endif()

if (GENERATE_RTPS_BRIDGE)

#option(CHECK_ENDIANNESS OFF)
add_subdirectory(micrortps_client)

###############################################################################
Expand Down Expand Up @@ -132,10 +133,10 @@ if (GENERATE_RTPS_BRIDGE)
add_dependencies(uorb_msgs_microcdr
uorb_headers_microcdr_gen
git_micro_cdr
lib__micro-CDR
microcdr
)

target_link_libraries(uorb_msgs_microcdr PRIVATE lib__micro-CDR)
target_link_libraries(uorb_msgs_microcdr PRIVATE microcdr)

# microCDR
target_include_directories(uorb_msgs_microcdr
Expand Down
2 changes: 1 addition & 1 deletion src/modules/micrortps_bridge/micro-CDR
Submodule micro-CDR updated 42 files
+3 −0 .gitignore
+0 −147 .ycm_extra_conf.py
+101 −133 CMakeLists.txt
+201 −201 LICENSE
+1 −1 Makefile.am.in
+95 −0 README.md
+0 −265 README.rst
+6 −1 cmake/dev/check_configuration.cmake
+123 −4 cmake/dev/gtest.cmake
+77 −8 cmake/dev/set_sources.cmake
+1 −1 cmake/packaging/Config.cmake.in
+1 −1 cmake/packaging/eProsimaPackaging.cmake
+1 −1 cmake/packaging/linux/AutotoolsPackaging.cmake.in
+1 −1 cmake/packaging/linux/LinuxPackaging.cmake.in
+1 −1 cmake/packaging/linux/autotools_generator.cmake
+1 −1 cmake/packaging/linux/autotools_generator.cmake.in
+1 −1 cmake/packaging/windows/EnvVarPage.nsh.in
+1 −1 cmake/packaging/windows/EnvVarPage_one_arch.nsh.in
+1 −1 cmake/packaging/windows/InstallRedistributables.nsh
+1 −1 cmake/packaging/windows/NSIS.template.in
+1 −1 cmake/packaging/windows/NSISPackaging.cmake.in
+1 −1 cmake/packaging/windows/WindowsPackaging.cmake.in
+1 −1 cmake/packaging/windows/microCdrConfig.cmake
+3 −3 configure.ac
+45 −0 examples/basic.c
+1 −1 include/Makefile.am.in
+5 −5 include/microcdr/config.h.in
+0 −66 include/microcdr/eProsima_auto_link.h
+0 −39 include/microcdr/microBuffer.h
+0 −1,898 include/microcdr/microCdr.h
+244 −0 include/microcdr/microcdr.h
+7 −40 include/microcdr/microcdr_dll.h
+30 −15 src/c/CMakeLists.txt
+0 −5,043 src/c/microCdr.c
+1,345 −0 src/c/microcdr.c
+547 −0 test/Alignment.cpp
+0 −15,345 test/AllTest.cpp
+441 −0 test/BufferError.cpp
+38 −31 test/CMakeLists.txt
+0 −7,701 test/DynamicTest.cpp
+828 −0 test/SerializationDeserialization.cpp
+0 −7,729 test/StaticTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include <pthread.h>
#include <termios.h>

#include <microcdr/microCdr.h>
#include <microcdr/microcdr.h>
#include <px4_config.h>
#include <px4_getopt.h>
#include <px4_posix.h>
Expand Down

0 comments on commit a26fe0b

Please sign in to comment.