Skip to content

Commit 3dade74

Browse files
micro-ROS galactic Library auto-update 16-07-2021 06:18 (#377)
Co-authored-by: pablogs9 <pablogs9@users.noreply.github.com>
1 parent 465b718 commit 3dade74

File tree

10 files changed

+46
-3
lines changed

10 files changed

+46
-3
lines changed

built_packages

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ https://github.com/micro-ROS/rosidl_typesupport.git 0e03d18809cb08215877ff856a91
1313
https://github.com/micro-ROS/rcutils 500ee3fcb16bf6260453c75b50c3d7785d724443
1414
https://github.com/micro-ROS/micro_ros_utilities c829971bd33ac1f14a94aa722476110b4b59eaf9
1515
https://gitlab.com/micro-ROS/ros_tracing/ros2_tracing.git/ 07ae5aa5c456f887f2aa82896e207a3209309a50
16-
https://github.com/ros2/rclc 2668550d040fe70906a37232c2a5f689970c2d8d
16+
https://github.com/ros2/rclc 86399a7eed78a583043c5b620a55655976240d05
1717
https://github.com/micro-ROS/micro_ros_msgs.git c8af6d4f246d1b324e6578ec967c8ddc1f4093d5
1818
https://github.com/ros-controls/control_msgs 11fdcdf76434d8ca9047787d17add4e18f56e9d6
1919
https://github.com/ros2/rcl_interfaces.git c5d0a20150533a6cb93d5dcbd6e27cea9300aa6e

src/cortex-m0plus/libmicroros.a

416 Bytes
Binary file not shown.

src/cortex-m3/libmicroros.a

480 Bytes
Binary file not shown.
400 Bytes
Binary file not shown.
380 Bytes
Binary file not shown.
380 Bytes
Binary file not shown.

src/mk20dx256/libmicroros.a

356 Bytes
Binary file not shown.
356 Bytes
Binary file not shown.

src/rclc/executor.h

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,39 @@ rclc_executor_add_subscription(
221221
rclc_callback_t callback,
222222
rclc_executor_handle_invocation_t invocation);
223223

224+
/**
225+
* Adds a subscription to an executor.
226+
* * An error is returned, if {@link rclc_executor_t.handles} array is full.
227+
* * The total number_of_subscriptions field of {@link rclc_executor_t.info}
228+
* is incremented by one.
229+
*
230+
* <hr>
231+
* Attribute | Adherence
232+
* ------------------ | -------------
233+
* Allocates Memory | No
234+
* Thread-Safe | No
235+
* Uses Atomics | No
236+
* Lock-Free | Yes
237+
*
238+
* \param [inout] executor pointer to initialized executor
239+
* \param [in] subscription pointer to an allocated subscription
240+
* \param [in] msg pointer to an allocated message
241+
* \param [in] callback function pointer to a callback
242+
* \param [in] context type-erased ptr to additional callback context
243+
* \param [in] invocation invocation type for the callback (ALWAYS or only ON_NEW_DATA)
244+
* \return `RCL_RET_OK` if add-operation was successful
245+
* \return `RCL_RET_INVALID_ARGUMENT` if any parameter is a null pointer (NULL context is ignored)
246+
* \return `RCL_RET_ERROR` if any other error occured
247+
*/
248+
rcl_ret_t
249+
rclc_executor_add_subscription_with_context(
250+
rclc_executor_t * executor,
251+
rcl_subscription_t * subscription,
252+
void * msg,
253+
rclc_subscription_callback_with_context_t callback,
254+
void * context,
255+
rclc_executor_handle_invocation_t invocation);
256+
224257
/**
225258
* Adds a timer to an executor.
226259
* * An error is returned, if {@link rclc_executor_t.handles} array is full.

src/rclc/executor_handle.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,15 @@ typedef enum
5858
/// Type definition for callback function.
5959
typedef void (* rclc_callback_t)(const void *);
6060

61+
/// Type definition for subscription callback function
62+
/// - incoming message
63+
// typedef void (* rclc_subscription_callback_t)(const void *);
64+
65+
/// Type definition for subscription callback function
66+
/// - incoming message
67+
/// - additional callback context
68+
typedef void (* rclc_subscription_callback_with_context_t)(const void *, void *);
69+
6170
/// Type definition for client callback function
6271
/// - request message
6372
/// - response message
@@ -114,8 +123,8 @@ typedef struct
114123
/// only for service - ptr to response message
115124
void * data_response_msg;
116125

117-
/// only for service - ptr to additional service context
118-
void * service_context;
126+
/// ptr to additional callback context
127+
void * callback_context;
119128

120129
// TODO(jst3si) new type to be stored as data for
121130
// service/client objects
@@ -129,6 +138,7 @@ typedef struct
129138
/// Storage for callbacks
130139
union {
131140
rclc_callback_t callback;
141+
rclc_subscription_callback_with_context_t subscription_callback_with_context;
132142
rclc_service_callback_t service_callback;
133143
rclc_service_callback_with_request_id_t service_callback_with_reqid;
134144
rclc_service_callback_with_context_t service_callback_with_context;

0 commit comments

Comments
 (0)