@@ -53,8 +53,20 @@ typedef struct ws_stack_state {
53
53
uint8_t join_state;
54
54
/* * Network PAN ID */
55
55
uint16_t pan_id;
56
+ /* * Device RF minimum sensitivity configuration. lowest level of radio signal strength packet heard. Range of -174 (0) to +80 (254) dBm*/
57
+ uint8_t device_min_sens;
56
58
} ws_stack_state_t ;
57
59
60
+ /* *
61
+ * \brief Struct ws_cca_threshold_table Wi-SUN CCA threshold table information.
62
+ */
63
+ typedef struct ws_cca_threshold_table {
64
+ /* * Number of channels */
65
+ uint8_t number_of_channels;
66
+ /* * CCA threshold table */
67
+ const int8_t *cca_threshold_table;
68
+ } ws_cca_threshold_table_t ;
69
+
58
70
/* * Wi-SUN mesh network interface class
59
71
*
60
72
* Configure Nanostack to use Wi-SUN protocol.
@@ -364,6 +376,41 @@ class WisunInterface final : public MeshInterfaceNanostack {
364
376
* */
365
377
mesh_error_t validate_timing_parameters (uint16_t disc_trickle_imin, uint16_t disc_trickle_imax, uint8_t disc_trickle_k, uint16_t pan_timeout);
366
378
379
+ /* *
380
+ * \brief Set Wi-SUN device minimum sensitivity
381
+ *
382
+ * Function stores new parameters to mbed-mesh-api and uses them when connect() is called next time.
383
+ * If device is already connected to the Wi-SUN network then settings take effect right away.
384
+ *
385
+ * \param device_min_sens Device minimum sensitivity. Range 0(-174 dB) to 254(+80 dB).
386
+ * \return MESH_ERROR_NONE on success.
387
+ * \return MESH_ERROR_UNKNOWN in case of failure.
388
+ * */
389
+ mesh_error_t set_device_min_sens (uint8_t device_min_sens);
390
+
391
+ /* *
392
+ * \brief Get Wi-SUN device minimum sensitivity.
393
+ *
394
+ * Function reads device minimum sensitivity from mbed-mesh-api.
395
+ *
396
+ * \param device_min_sens Device minimum sensitivity. Range 0-254.
397
+ * \return MESH_ERROR_NONE on success.
398
+ * \return MESH_ERROR_UNKNOWN in case of failure.
399
+ * */
400
+ mesh_error_t get_device_min_sens (uint8_t *device_min_sens);
401
+
402
+ /* *
403
+ * \brief Validates Device minimum sensitivity.
404
+ *
405
+ * Function validates device minimum sensitivity. Function can be used to test that values that will be used on set
406
+ * function are valid.
407
+ *
408
+ * \param device_min_sens Device minimum sensitivity. Range 0-254.
409
+ * \return MESH_ERROR_NONE on success.
410
+ * \return MESH_ERROR_UNKNOWN in case of failure.
411
+ * */
412
+ mesh_error_t validate_device_min_sens (uint8_t device_min_sens);
413
+
367
414
/* *
368
415
* \brief Set own certificate and private key reference to the Wi-SUN network.
369
416
*
@@ -486,6 +533,18 @@ class WisunInterface final : public MeshInterfaceNanostack {
486
533
* */
487
534
mesh_error_t stack_info_get (ws_stack_state_t *stack_info_ptr);
488
535
536
+ /* *
537
+ * \brief Get Wi-SUN CCA threshold table information.
538
+ *
539
+ * Function reads CCA threshold table from nanostack.
540
+ *
541
+ ** \param ws_cca_threshold_table_t Structure given to stack where information will be stored
542
+ **
543
+ * \return MESH_ERROR_NONE on success.
544
+ * \return MESH_ERROR_UNKNOWN in case of failure.
545
+ * */
546
+ mesh_error_t cca_threshold_table_get (ws_cca_threshold_table_t *table);
547
+
489
548
protected:
490
549
Nanostack::WisunInterface *get_interface () const ;
491
550
nsapi_error_t do_initialize () override ;
0 commit comments