@@ -95,6 +95,30 @@ extern "C" {
9595 */
9696#define WS_MANAGEMENT_API_VER_2 /**< Management API version */
9797
98+ /**
99+ * Deprecated!
100+ * Configure PHY mode ID of Wi-SUN stack as defined by Wi-SUN FAN 1.1.
101+ *
102+ * \param interface_id Network interface ID.
103+ * \param phy_mode_id PHY mode ID. Default 255 (not used).
104+ *
105+ * \return 0, Init OK.
106+ * \return <0 Init fail.
107+ */
108+ #define ws_management_phy_mode_id_set (interface_id , phy_mode_id ) ws_management_domain_configuration_set(interface_id, 0, phy_mode_id, 0)
109+
110+ /**
111+ * Deprecated!
112+ * Configure Channel plan ID of Wi-SUN stack as defined by Wi-SUN FAN 1.1.
113+ *
114+ * \param interface_id Network interface ID.
115+ * \param channel_plan_id Channel plan ID. Default 255 (not used).
116+ *
117+ * \return 0, Init OK.
118+ * \return <0 Init fail.
119+ */
120+ #define ws_management_channel_plan_id_set (interface_id , channel_plan_id ) ws_management_domain_configuration_set(interface_id, 0, 0, channel_plan_id)
121+
98122/**
99123 * \brief Struct ws_statistics defines the Wi-SUN statistics storage structure.
100124 */
@@ -187,80 +211,107 @@ int ws_management_network_name_validate(
187211 char * network_name_ptr );
188212
189213/**
190- * Configure PHY mode ID of Wi-SUN stack as defined by Wi-SUN FAN 1.1 .
214+ * Set domain configuration of Wi-SUN stack.
191215 *
192216 * Change the default configuration for Wi-SUN PHY operation.
193217 *
194218 * Supported values:
195- * FSK without FEC:
196- * PHY mode ID | Symbol Rate (kbps) | Modulation Index
197- * 1 50 0.5
198- * 2 50 1.0
199- * 3 100 0.5
200- * 4 100 1.0
201- * 5 150 0.5
202- * 6 200 0.5
203- * 7 200 1.0
204- * 8 300 0.5
205- *
206- * FSK with FEC:
207- * PHY mode ID | Symbol Rate (kbps) | Modulation Index
208- * 17 50 0.5
209- * 18 50 1.0
210- * 19 100 0.5
211- * 20 100 1.0
212- * 21 150 0.5
213- * 22 200 0.5
214- * 23 200 1.0
215- * 24 300 0.5
216- *
217- * OFDM:
218- * PHY mode ID | Option | MCS | Data rate (kbps)
219- * 34 1 2 400
220- * 35 1 3 800
221- * 36 1 4 1200
222- * 37 1 5 1600
223- * 38 1 6 2400
224- * 51 2 3 400
225- * 52 2 4 600
226- * 53 2 5 800
227- * 54 2 6 1200
228- * 68 3 4 300
229- * 69 3 5 400
230- * 70 3 6 600
231- * 84 4 4 150
232- * 85 4 5 200
233- * 86 4 6 300
234- *
235- * if value of 255 is given then previous value is used.
219+ * Regulatory domain: "NA"(0x01), "KR"(0x09), "EU"(0x03), "IN"(0x05), "BZ"(0x07), "JP"(0x09), "WW"(0x00)
220+ *
221+ * PHY mode ID:
222+ * FSK without FEC:
223+ * PHY mode ID | Symbol Rate (kbps) | Modulation Index
224+ * 1 50 0.5
225+ * 2 50 1.0
226+ * 3 100 0.5
227+ * 4 100 1.0
228+ * 5 150 0.5
229+ * 6 200 0.5
230+ * 7 200 1.0
231+ * 8 300 0.5
232+ *
233+ * FSK with FEC:
234+ * PHY mode ID | Symbol Rate (kbps) | Modulation Index
235+ * 17 50 0.5
236+ * 18 50 1.0
237+ * 19 100 0.5
238+ * 20 100 1.0
239+ * 21 150 0.5
240+ * 22 200 0.5
241+ * 23 200 1.0
242+ * 24 300 0.5
243+ *
244+ * OFDM:
245+ * PHY mode ID | Option | MCS | Data rate (kbps)
246+ * 34 1 2 400
247+ * 35 1 3 800
248+ * 36 1 4 1200
249+ * 37 1 5 1600
250+ * 38 1 6 2400
251+ * 51 2 3 400
252+ * 52 2 4 600
253+ * 53 2 5 800
254+ * 54 2 6 1200
255+ * 68 3 4 300
256+ * 69 3 5 400
257+ * 70 3 6 600
258+ * 84 4 4 150
259+ * 85 4 5 200
260+ * 86 4 6 300
261+ *
262+ * Channel plan ID:
263+ * North America (NA): (1), (2), (5)
264+ * Brazil (BZ): (1), (2), (5)
265+ *
266+ * If value of 0 is given then previous value is used.
267+ * If value of 255 is given then default value is used.
236268 *
237269 * \param interface_id Network interface ID.
238- * \param phy_mode_id PHY mode ID. Default 255 (not used).
270+ * \param regulatory_domain Regulatory domain.
271+ * \param phy_mode_id PHY mode ID.
272+ * \param channel_plan_id Channel plan ID.
239273 *
240- * \return 0, Init OK.
241- * \return <0 Init fail .
274+ * \return 0, OK.
275+ * \return <0 Fail .
242276 */
243- int ws_management_phy_mode_id_set (
277+ int ws_management_domain_configuration_set (
244278 int8_t interface_id ,
245- uint8_t phy_mode_id );
279+ uint8_t regulatory_domain ,
280+ uint8_t phy_mode_id ,
281+ uint8_t channel_plan_id );
246282
247283/**
248- * Configure Channel plan ID of Wi-SUN stack as defined by Wi-SUN FAN 1.1.
249- *
250- * Change the default channel configuration for Wi-SUN.
284+ * Get domain configuration of Wi-SUN stack.
251285 *
252- * Supported values: TBD
286+ * \param interface_id Network interface ID.
287+ * \param regulatory_domain Regulatory domain.
288+ * \param phy_mode_id PHY mode ID.
289+ * \param channel_plan_id Channel plan ID.
253290 *
254- * if value of 255 is given then previous value is used.
291+ * \return 0, OK.
292+ * \return <0 Fail.
293+ */
294+ int ws_management_domain_configuration_get (
295+ int8_t interface_id ,
296+ uint8_t * regulatory_domain ,
297+ uint8_t * phy_mode_id ,
298+ uint8_t * channel_plan_id );
299+
300+ /**
301+ * Validate domain configuration of Wi-SUN stack.
255302 *
256303 * \param interface_id Network interface ID.
257- * \param channel_plan_id Channel plan ID. Default 255 (not used).
304+ * \param regulatory_domain Regulatory domain.
305+ * \param phy_mode_id PHY mode ID.
306+ * \param channel_plan_id Channel plan ID.
258307 *
259- * \return 0, Init OK.
260- * \return <0 Init fail .
308+ * \return 0, OK.
309+ * \return <0 Fail .
261310 */
262- int ws_management_channel_plan_id_set (
311+ int ws_management_domain_configuration_validate (
263312 int8_t interface_id ,
313+ uint8_t regulatory_domain ,
314+ uint8_t phy_mode_id ,
264315 uint8_t channel_plan_id );
265316
266317/**
0 commit comments