Skip to content

Commit c553e8c

Browse files
Juha Heiskanenjuhhei01
authored andcommitted
WS ie library read update
WS Header IE read API: ws_wh_utt_read() & ws_wh_bt_read() WS Nested Payload read API: * ws_wp_nested_us_read() * ws_wp_nested_bs_read() * ws_wp_nested_pan_read() * ws_wp_nested_pan_version_read() * ws_wp_nested_gtkhash_read() Change-Id: Id9c5d9922cc6e7e6b2322eb413491d8e0c20857e
1 parent 7db0938 commit c553e8c

File tree

3 files changed

+383
-27
lines changed

3 files changed

+383
-27
lines changed

source/6LoWPAN/ws/ws_common_defines.h

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,97 @@ typedef struct ws_hopping_schedule_s {
8585
uint_fast24_t ch0_freq; // Default should be derived from regulatory domain
8686
} ws_hopping_schedule_t;
8787

88+
/**
89+
* @brief ws_utt_ie_t WS UTT-IE
90+
*/
91+
typedef struct ws_utt_ie {
92+
uint8_t message_type;
93+
uint_fast24_t ut;
94+
} ws_utt_ie_t;
95+
96+
/**
97+
* @brief ws_bt_ie_t WS BT-IE read
98+
*/
99+
typedef struct ws_bt_ie {
100+
uint16_t broadcast_slot_number;
101+
uint_fast24_t bsi;
102+
} ws_bt_ie_t;
103+
104+
105+
/**
106+
* @brief ws_channel_plan_zero_t WS channel plan 0 define domain and class
107+
*/
108+
typedef struct ws_channel_plan_zero {
109+
uint8_t regulator_domain;
110+
uint8_t operation_class;
111+
} ws_channel_plan_zero_t;
112+
113+
/**
114+
* @brief ws_channel_plan_one_t WS channel plan 1 define ch0, spasing and channel count
115+
*/
116+
typedef struct ws_channel_plan_one {
117+
uint_fast24_t ch0;
118+
unsigned channel_spacing:4;
119+
uint16_t number_of_channel;
120+
} ws_channel_plan_one_t;
121+
122+
/**
123+
* @brief ws_channel_function_zero_t WS function 0 fixed channel
124+
*/
125+
typedef struct ws_channel_function_zero {
126+
uint16_t fixed_channel;
127+
} ws_channel_function_zero_t;
128+
129+
/**
130+
* @brief ws_channel_function_three_t WS function 3 vendor spesific channel hop
131+
*/
132+
typedef struct ws_channel_function_three {
133+
uint8_t channel_hop_count;
134+
uint8_t *channel_list;
135+
} ws_channel_function_three_t;
136+
137+
/**
138+
* @brief ws_us_ie_t WS US-IE read
139+
*/
140+
typedef struct ws_us_ie {
141+
uint8_t dwell_interval;
142+
uint8_t clock_drift;
143+
uint8_t timing_accurancy;
144+
unsigned channle_plan:3;
145+
unsigned channle_function:3;
146+
unsigned excluded_channel_ctrl:2;
147+
union {
148+
ws_channel_plan_zero_t zero;
149+
ws_channel_plan_one_t one;
150+
} plan;
151+
union {
152+
ws_channel_function_zero_t zero;
153+
ws_channel_function_three_t three;
154+
} function;
155+
} ws_us_ie_t;
156+
157+
/**
158+
* @brief ws_bs_ie_t WS BS-IE read
159+
*/
160+
typedef struct ws_bs_ie {
161+
uint32_t broadcast_interval;
162+
uint16_t bsi;
163+
uint8_t dwell_interval;
164+
uint8_t clock_drift;
165+
uint8_t timing_accurancy;
166+
unsigned channle_plan:3;
167+
unsigned channle_function:3;
168+
unsigned excluded_channel_ctrl:2;
169+
union {
170+
ws_channel_plan_zero_t zero;
171+
ws_channel_plan_one_t one;
172+
} plan;
173+
union {
174+
ws_channel_function_zero_t zero;
175+
ws_channel_function_three_t three;
176+
} function;
177+
} ws_bs_ie_t;
178+
88179

89180
#define MPX_KEY_MANAGEMENT_ENC_USER_ID 0x0001 /**< MPX Key management user ID */
90181
#define MPX_LOWPAN_ENC_USER_ID 0xA0ED /**< MPX Lowpan User Id */

0 commit comments

Comments
 (0)