Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
ot_api_messages.h
Go to the documentation of this file.
1 /******************************************************************************/
2 /******************************************************************************/
3 /****** Cascoda Ltd. 2015, CA-821X OT Code ******/
4 /******************************************************************************/
5 /******************************************************************************/
6 /****** Wing Commander message formats for the OT API ******/
7 /******************************************************************************/
8 /******************************************************************************/
9 /****** Revision Notes ******/
10 /******************************************************************************/
11 /****** 0.1 06/09/15 PB Release Baseline ******/
12 /******************************************************************************/
13 /******************************************************************************/
14 
15 #include "string.h"
16 
17 #ifndef OT_API_MESSAGES_H
18 #define OT_API_MESSAGES_H
19 
21 #define OT_CMD_IFCONFIG (0x00)
22 #define OT_CMD_THREAD (0x01)
23 #define OT_CMD_SET (0x02)
24 #define OT_CMD_GET (0x03)
25 #define OT_CMD_STATE (0x04)
26 #define OT_CMD_FACTORY_RESET (0x05)
27 #define OT_CMD_APPLICATION_CMD (0x06)
28 
30 #define OT_CNF_IFCONFIG (0x80)
31 #define OT_CNF_THREAD (0x81)
32 #define OT_CNF_SET (0x82)
33 #define OT_CNF_GET (0x83)
34 #define OT_CNF_STATE (0x84)
35 #define OT_CNF_FACTORY_RESET (0x85)
36 #define OT_CNF_APPLICATION_CMD (0x86)
37 
38 typedef struct OT_IF_CONFIG
39 {
49 
50 typedef struct OT_THREAD
51 {
61 
62 typedef struct OT_SET
63 {
72  /* AttributeValue depends on AttributeId */
75 
76 typedef struct OT_GET
77 {
87 
88 typedef struct OT_STATE
89 {
99 
100 typedef struct OT_FACTORY_RESET
101 {
111 
112 typedef struct OT_APPLICATION_CMD
113 {
125 
126 typedef struct OT_GEN_CNF
127 {
137 
138 typedef struct OT_GET_CNF
139 {
153 
154 typedef struct OT_STATE_CNF
155 {
167 
168 typedef union OTApiMsg
169 {
179 
180 /* Attribute ids */
181 #define OT_ATTR_CHANNEL (0)
182 #define OT_ATTR_PANID (1)
183 #define OT_ATTR_MODE_RX_ON_WHEN_IDLE (2)
184 #define OT_ATTR_MODE_SECURE (3)
185 #define OT_ATTR_MODE_FFD (4)
186 #define OT_ATTR_MODE_NETDATA (5)
187 #define OT_ATTR_POLL_PERIOD (6)
188 #define OT_ATTR_MASTER_KEY (7)
189 #define OT_ATTR_NETWORK_NAME (8)
190 #define OT_ATTR_EXT_PANID (9)
191 #define OT_ATTR_KEY_SEQUENCE (10)
192 #define OT_ATTR_EXT_ADDR (11)
193 #define OT_ATTR_MESH_LOCAL_PREFIX (12)
194 
195 #define OT_ATTR_CHILD_TIMEOUT (13)
196 #define OT_ATTR_CONTEXT_REUSE_DELAY (14)
197 #define OT_ATTR_LEADER_DATA (15)
198 #define OT_ATTR_LEADER_WEIGHT (16)
199 #define OT_ATTR_NETWORK_ID_TIMEOUT (17)
200 #define OT_ATTR_RLOC16 (18)
201 #define OT_ATTR_ROUTER_UPGRADE_THRESHOLD (19)
202 
203 #define OT_ATTR_AUTO_START (20)
204 
205 #endif // OT_API_MESSAGES_H
unsigned char u8_t
Definition: cascoda_types.h:46
struct OT_GET OT_GET_t
struct OT_GEN_CNF OT_GEN_CNF_t
struct OT_STATE_CNF OT_STATE_CNF_t
struct OT_STATE OT_STATE_t
struct OT_SET OT_SET_t
struct OT_THREAD OT_THREAD_t
struct OT_IF_CONFIG OT_IF_CONFIG_t
struct OT_GET_CNF OT_GET_CNF_t
struct OT_FACTORY_RESET OT_FACTORY_RESET_t
struct OT_APPLICATION_CMD OT_APPLICATION_CMD_t
union OTApiMsg OTApiMsg_t
Definition: ot_api_messages.h:113
u8_t CommandLength
Command length - will be Length-1.
Definition: ot_api_messages.h:121
u8_t CommandId
CommandId always THREAD_DOWNLINK_ID.
Definition: ot_api_messages.h:115
u8_t DispatchId
DispatchId always OT_CMD_APPLICATION_CMD.
Definition: ot_api_messages.h:119
u8_t Command[]
Application command.
Definition: ot_api_messages.h:123
u8_t Length
Length always 1 + length of Command[] below.
Definition: ot_api_messages.h:117
Definition: ot_api_messages.h:101
u8_t Control
Not used yet.
Definition: ot_api_messages.h:109
u8_t Length
Length always 2.
Definition: ot_api_messages.h:105
u8_t DispatchId
DispatchId always OT_CMD_FACTORY_RESET.
Definition: ot_api_messages.h:107
u8_t CommandId
CommandId always THREAD_DOWNLINK_ID.
Definition: ot_api_messages.h:103
Definition: ot_api_messages.h:127
u8_t Length
Length always 2.
Definition: ot_api_messages.h:131
u8_t Status
otError Status
Definition: ot_api_messages.h:135
u8_t CommandId
CommandId always THREAD_UPLINK_ID.
Definition: ot_api_messages.h:129
u8_t DispatchId
DispatchId OT_CNF_SET, OT_CNF_THREAD, OT_CNF_IFCONFIG.
Definition: ot_api_messages.h:133
Definition: ot_api_messages.h:139
u8_t AttributeId
AttributeId.
Definition: ot_api_messages.h:149
u8_t Status
otError Status
Definition: ot_api_messages.h:147
u8_t Length
Length always 3 + length of AttributeValue.
Definition: ot_api_messages.h:143
u8_t DispatchId
DispatchId OT_CNF_GET.
Definition: ot_api_messages.h:145
u8_t CommandId
CommandId always THREAD_UPLINK_ID.
Definition: ot_api_messages.h:141
u8_t AttributeValue[]
AttributeValue depends on AttributeId.
Definition: ot_api_messages.h:151
Definition: ot_api_messages.h:77
u8_t DispatchId
DispatchId always OT_CMD_GET.
Definition: ot_api_messages.h:83
u8_t AttributeId
AttributeId
Definition: ot_api_messages.h:85
u8_t CommandId
CommandId always THREAD_DOWNLINK_ID.
Definition: ot_api_messages.h:79
u8_t Length
Length always 2.
Definition: ot_api_messages.h:81
Definition: ot_api_messages.h:39
u8_t CommandId
CommandId always THREAD_DOWNLINK_ID.
Definition: ot_api_messages.h:41
u8_t DispatchId
DispatchId always OT_CMD_IFCONFIG.
Definition: ot_api_messages.h:45
u8_t Length
Length always 2.
Definition: ot_api_messages.h:43
u8_t Control
DOWN (0), UP (1) or QUERY (2)
Definition: ot_api_messages.h:47
Definition: ot_api_messages.h:63
u8_t DispatchId
DispatchId always OT_CMD_SET.
Definition: ot_api_messages.h:69
u8_t CommandId
CommandId always THREAD_DOWNLINK_ID.
Definition: ot_api_messages.h:65
u8_t AttributeValue[]
Definition: ot_api_messages.h:73
u8_t AttributeId
AttributeId.
Definition: ot_api_messages.h:71
u8_t Length
Length always 2 more than AttributeValue length.
Definition: ot_api_messages.h:67
Definition: ot_api_messages.h:155
u8_t State
State of device; Detached(1), Child(2)
Definition: ot_api_messages.h:165
u8_t Status
otError Status
Definition: ot_api_messages.h:163
u8_t Length
Length always 3.
Definition: ot_api_messages.h:159
u8_t DispatchId
DispatchId OT_STATE_CNF.
Definition: ot_api_messages.h:161
u8_t CommandId
CommandId always THREAD_UPLINK_ID.
Definition: ot_api_messages.h:157
Definition: ot_api_messages.h:89
u8_t Length
Length always 2.
Definition: ot_api_messages.h:93
u8_t DispatchId
DispatchId always OT_CMD_STATE.
Definition: ot_api_messages.h:95
u8_t Control
QUERY (0), DETACHED (1) or CHILD (2) or ROUTER (3) or LEADER (4)
Definition: ot_api_messages.h:97
u8_t CommandId
CommandId always THREAD_DOWNLINK_ID.
Definition: ot_api_messages.h:91
Definition: ot_api_messages.h:51
u8_t Length
Length always 2.
Definition: ot_api_messages.h:55
u8_t Control
STOP (0), START (1)
Definition: ot_api_messages.h:59
u8_t CommandId
CommandId always THREAD_DOWNLINK_ID.
Definition: ot_api_messages.h:53
u8_t DispatchId
DispatchId always OT_CMD_ID_THREAD.
Definition: ot_api_messages.h:57
Definition: ot_api_messages.h:169
u8_t * Ptr
Definition: ot_api_messages.h:177
OT_THREAD_t * Thread
Definition: ot_api_messages.h:171
OT_IF_CONFIG_t * IfConfig
Definition: ot_api_messages.h:170
OT_APPLICATION_CMD_t * ApplicationCmd
Definition: ot_api_messages.h:176
OT_STATE_t * State
Definition: ot_api_messages.h:174
OT_GET_t * Get
Definition: ot_api_messages.h:173
OT_SET_t * Set
Definition: ot_api_messages.h:172
OT_FACTORY_RESET_t * FactoryReset
Definition: ot_api_messages.h:175