You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: libraries/OpenThread/helper_functions.md
+10-9
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,9 @@
1
1
# OpenThread Helper Functions and Types
2
2
3
-
The following helper functions and types are designed to simplify writing Arduino sketches for OpenThread. They provide useful utilities for managing OpenThread stack behavior and interacting with the Thread network.
3
+
The following helper functions and types are designed to simplify writing Arduino sketches for OpenThread.\
4
+
They provide useful utilities for managing OpenThread stack behavior and interacting with the Thread network.
4
5
5
-
## Enumerated Type: `ot_device_role_t`
6
+
###Enumerated Type: `ot_device_role_t`
6
7
7
8
This enumeration defines the possible roles of a Thread device within the network:
8
9
@@ -12,46 +13,46 @@ This enumeration defines the possible roles of a Thread device within the networ
12
13
-`OT_ROLE_ROUTER`: The device operates as a Thread Router.
13
14
-`OT_ROLE_LEADER`: The device operates as a Thread Leader.
14
15
15
-
## Struct: `ot_cmd_return_t`
16
+
###Struct: `ot_cmd_return_t`
16
17
17
18
This structure represents the return status of an OpenThread CLI command:
18
19
19
20
-`errorCode`: An integer representing the error code (if any).
20
21
-`errorMessage`: A string containing an error message (if applicable).
21
22
22
-
## Function: `otGetDeviceRole()`
23
+
###Function: `otGetDeviceRole()`
23
24
24
25
- Returns the current role of the device as an `ot_device_role_t` value.
25
26
26
-
## Function: `otGetStringDeviceRole()`
27
+
###Function: `otGetStringDeviceRole()`
27
28
28
29
- Returns a human-readable string representation of the device role (e.g., "Child," "Router," etc.).
0 commit comments