Skip to content

Commit 6f15030

Browse files
micro-ROS RMW API reference auto-update 08-09-2021 06:25 (#338)
Co-authored-by: pablogs9 <[email protected]>
1 parent 64f6848 commit 6f15030

1 file changed

Lines changed: 65 additions & 2 deletions

File tree

_includes/rmw_doc/Modules/group__rmw.md

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
| | Name |
66
| -------------- | -------------- |
77
| void | **[rmw_uros_set_continous_serialization_callbacks](#function-rmw_uros_set_continous_serialization_callbacks)**(rmw_publisher_t * publisher, rmw_uros_continous_serialization_size size_cb, rmw_uros_continous_serialization serialization_cb)<br>Sets the callback functions for continous serialization for a publisher. |
8-
| rmw_ret_t | **[rmw_uros_set_custom_transport](#function-rmw_uros_set_custom_transport)**(bool framing, void * args, open_custom_func open_cb, close_custom_func close_cb, write_custom_func write_cb, read_custom_func read_cb)<br>Check if micro-ROS Agent answers to micro-ROS client. |
8+
| rmw_ret_t | **[rmw_uros_set_custom_transport](#function-rmw_uros_set_custom_transport)**(bool framing, void * args, open_custom_func open_cb, close_custom_func close_cb, write_custom_func write_cb, read_custom_func read_cb)<br>Sets micro-ROS default custom transport. |
9+
| rmw_ret_t | **[rmw_uros_options_set_custom_transport](#function-rmw_uros_options_set_custom_transport)**(bool framing, void * args, open_custom_func open_cb, close_custom_func close_cb, write_custom_func write_cb, read_custom_func read_cb, rmw_init_options_t * rmw_options)<br>Fills rmw implementation-specific options with the given custom transport. |
910
| rmw_ret_t | **[rmw_uros_discover_agent](#function-rmw_uros_discover_agent)**(rmw_init_options_t * rmw_options)<br>Fills rmw implementation-specific options with the autodicovered address of an micro-ROS Agent. |
1011
| rmw_ret_t | **[rmw_uros_init_options](#function-rmw_uros_init_options)**(int argc, const char *const argv[], rmw_init_options_t * rmw_options)<br>Parses command line args and fills rmw implementation-specific options. |
1112
| rmw_ret_t | **[rmw_uros_options_set_serial_device](#function-rmw_uros_options_set_serial_device)**(const char * dev, rmw_init_options_t * rmw_options)<br>Fills rmw implementation-specific options with the given parameters. |
1213
| rmw_ret_t | **[rmw_uros_options_set_udp_address](#function-rmw_uros_options_set_udp_address)**(const char * ip, const char * port, rmw_init_options_t * rmw_options)<br>Fills rmw implementation-specific options with the given parameters. |
1314
| rmw_ret_t | **[rmw_uros_options_set_client_key](#function-rmw_uros_options_set_client_key)**(uint32_t client_key, rmw_init_options_t * rmw_options)<br>Fills rmw implementation-specific options with the given parameters. |
1415
| rmw_ret_t | **[rmw_uros_ping_agent](#function-rmw_uros_ping_agent)**(const int timeout_ms, const uint8_t attempts)<br>Check if micro-ROS Agent is up and running. |
16+
| rmw_ret_t | **[rmw_uros_ping_agent_options](#function-rmw_uros_ping_agent_options)**(const int timeout_ms, const uint8_t attempts, rmw_init_options_t * rmw_options)<br>Check if micro-ROS Agent is up and running using the transport set on the given rmw options. |
1517
| bool | **[rmw_uros_epoch_synchronized](#function-rmw_uros_epoch_synchronized)**()<br>Returns the time synchronization state of the epoch time. |
1618
| int64_t | **[rmw_uros_epoch_millis](#function-rmw_uros_epoch_millis)**()<br>Returns the epoch time in milliseconds taking into account the offset computed during the time synchronization. |
1719
| int64_t | **[rmw_uros_epoch_nanos](#function-rmw_uros_epoch_nanos)**()<br>Returns the epoch time in nanoseconds taking into account the offset computed during the time synchronization. |
@@ -55,7 +57,7 @@ rmw_ret_t rmw_uros_set_custom_transport(
5557
)
5658
```
5759

58-
Check if micro-ROS Agent answers to micro-ROS client.
60+
Sets micro-ROS default custom transport.
5961

6062
**Parameters**:
6163

@@ -73,6 +75,39 @@ Check if micro-ROS Agent answers to micro-ROS client.
7375
* RMW_RET_ERROR If invalid.
7476

7577

78+
### function rmw_uros_options_set_custom_transport
79+
80+
```cpp
81+
rmw_ret_t rmw_uros_options_set_custom_transport(
82+
bool framing,
83+
void * args,
84+
open_custom_func open_cb,
85+
close_custom_func close_cb,
86+
write_custom_func write_cb,
87+
read_custom_func read_cb,
88+
rmw_init_options_t * rmw_options
89+
)
90+
```
91+
92+
Fills rmw implementation-specific options with the given custom transport.
93+
94+
**Parameters**:
95+
96+
* **framing** Enable XRCE framing.
97+
* **args** Arguments for open function.
98+
* **open_cb** Open transport callback.
99+
* **close_cb** Close transport callback.
100+
* **write_cb** Write transport callback.
101+
* **read_cb** Read transport callback.
102+
* **rmw_options** Updated options with updated transport.
103+
104+
105+
**Return**:
106+
107+
* RMW_RET_OK If arguments were valid and set in rmw_init_options.
108+
* RMW_RET_INVALID_ARGUMENT If rmw_init_options is not valid or unexpected arguments.
109+
110+
76111
### function rmw_uros_discover_agent
77112

78113
```cpp
@@ -220,6 +255,34 @@ Check if micro-ROS Agent is up and running.
220255
This function can be called even when the micro-ROS context has not yet been initialized by the application logics.
221256

222257

258+
### function rmw_uros_ping_agent_options
259+
260+
```cpp
261+
rmw_ret_t rmw_uros_ping_agent_options(
262+
const int timeout_ms,
263+
const uint8_t attempts,
264+
rmw_init_options_t * rmw_options
265+
)
266+
```
267+
268+
Check if micro-ROS Agent is up and running using the transport set on the given rmw options.
269+
270+
**Parameters**:
271+
272+
* **timeout_ms** Timeout in ms (per attempt).
273+
* **attempts** Number of tries before considering the ping as failed.
274+
* **rmw_options** rmw options with populated transport parameters.
275+
276+
277+
**Return**:
278+
279+
* RMW_RET_OK If micro-ROS Agent is available.
280+
* RMW_RET_ERROR If micro-ROS Agent is not available.
281+
282+
283+
This function can be called even when the micro-ROS context has not yet been initialized. The transport will be initialized and closed once during the ping process.
284+
285+
223286
### function rmw_uros_epoch_synchronized
224287

225288
```cpp

0 commit comments

Comments
 (0)