From 8ffecce848877f6d8d60293df719a2036262d9ab Mon Sep 17 00:00:00 2001 From: Pablo Garrido Date: Wed, 27 Sep 2023 10:45:37 +0200 Subject: [PATCH 1/2] Rename UXR_CONFIG_CAN_TRANSPORT_MTU (#372) Because CAN-FD MTU is fixed, it's not configurable. UXR_CONFIG_CAN_TRANSPORT_MTU is a bit misleading. Thus, this commit rename it to UXR_CAN_TRANSPORT_MTU. Signed-off-by: Yasushi SHOJI Co-authored-by: Yasushi SHOJI --- examples/PublishHelloWorldCAN/main.c | 2 +- include/uxr/client/profile/transport/can/can_transport.h | 5 +++-- src/c/profile/transport/can/can_transport.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/PublishHelloWorldCAN/main.c b/examples/PublishHelloWorldCAN/main.c index f6f45b47..ae98a17a 100644 --- a/examples/PublishHelloWorldCAN/main.c +++ b/examples/PublishHelloWorldCAN/main.c @@ -22,7 +22,7 @@ #include //atoi #define STREAM_HISTORY 8 -#define BUFFER_SIZE UXR_CONFIG_CAN_TRANSPORT_MTU* STREAM_HISTORY +#define BUFFER_SIZE UXR_CAN_TRANSPORT_MTU* STREAM_HISTORY int main( int args, diff --git a/include/uxr/client/profile/transport/can/can_transport.h b/include/uxr/client/profile/transport/can/can_transport.h index 3bc36af0..cb77dc30 100644 --- a/include/uxr/client/profile/transport/can/can_transport.h +++ b/include/uxr/client/profile/transport/can/can_transport.h @@ -29,11 +29,12 @@ extern "C" #include #include -#define UXR_CONFIG_CAN_TRANSPORT_MTU 63 +/* For CAN-FD, MTU is fixed value */ +#define UXR_CAN_TRANSPORT_MTU 63 typedef struct uxrCANTransport { - uint8_t buffer[UXR_CONFIG_CAN_TRANSPORT_MTU]; + uint8_t buffer[UXR_CAN_TRANSPORT_MTU]; uxrCommunication comm; struct uxrCANPlatform platform; } uxrCANTransport; diff --git a/src/c/profile/transport/can/can_transport.c b/src/c/profile/transport/can/can_transport.c index 97fe09b5..c781ef21 100644 --- a/src/c/profile/transport/can/can_transport.c +++ b/src/c/profile/transport/can/can_transport.c @@ -103,7 +103,7 @@ bool uxr_init_can_transport( transport->comm.send_msg = send_can_msg; transport->comm.recv_msg = recv_can_msg; transport->comm.comm_error = get_can_error; - transport->comm.mtu = UXR_CONFIG_CAN_TRANSPORT_MTU; + transport->comm.mtu = UXR_CAN_TRANSPORT_MTU; UXR_INIT_LOCK(&transport->comm.mutex); rv = true; } From 371718ca16c361f639c06a2761b9497f8706794a Mon Sep 17 00:00:00 2001 From: Pablo Garrido Date: Tue, 21 Nov 2023 11:22:39 +0100 Subject: [PATCH 2/2] Bump version --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d256bb7d..e7e0258e 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,7 +92,7 @@ list(APPEND _deps "microcdr\;${_microcdr_version}") ############################################################################### set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) if(NOT UCLIENT_SUPERBUILD) - project(microxrcedds_client VERSION "2.4.1" LANGUAGES C) + project(microxrcedds_client VERSION "2.4.2" LANGUAGES C) else() project(uclient_superbuild NONE) include(${PROJECT_SOURCE_DIR}/cmake/SuperBuild.cmake)