@@ -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.
@@ -373,6 +385,41 @@ class WisunInterface : public MeshInterfaceNanostack {
373
385
* */
374
386
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);
375
387
388
+ /* *
389
+ * \brief Set Wi-SUN device minimum sensitivity
390
+ *
391
+ * Function stores new parameters to mbed-mesh-api and uses them when connect() is called next time.
392
+ * If device is already connected to the Wi-SUN network then settings take effect right away.
393
+ *
394
+ * \param device_min_sens Device minimum sensitivity. Range 0(-174 dB) to 254(+80 dB).
395
+ * \return MESH_ERROR_NONE on success.
396
+ * \return MESH_ERROR_UNKNOWN in case of failure.
397
+ * */
398
+ mesh_error_t set_device_min_sens (uint8_t device_min_sens);
399
+
400
+ /* *
401
+ * \brief Get Wi-SUN device minimum sensitivity.
402
+ *
403
+ * Function reads device minimum sensitivity from mbed-mesh-api.
404
+ *
405
+ * \param device_min_sens Device minimum sensitivity. Range 0-254.
406
+ * \return MESH_ERROR_NONE on success.
407
+ * \return MESH_ERROR_UNKNOWN in case of failure.
408
+ * */
409
+ mesh_error_t get_device_min_sens (uint8_t *device_min_sens);
410
+
411
+ /* *
412
+ * \brief Validates Device minimum sensitivity.
413
+ *
414
+ * Function validates device minimum sensitivity. Function can be used to test that values that will be used on set
415
+ * function are valid.
416
+ *
417
+ * \param device_min_sens Device minimum sensitivity. Range 0-254.
418
+ * \return MESH_ERROR_NONE on success.
419
+ * \return MESH_ERROR_UNKNOWN in case of failure.
420
+ * */
421
+ mesh_error_t validate_device_min_sens (uint8_t device_min_sens);
422
+
376
423
/* *
377
424
* \brief Set own certificate and private key reference to the Wi-SUN network.
378
425
*
@@ -495,6 +542,16 @@ class WisunInterface : public MeshInterfaceNanostack {
495
542
* */
496
543
mesh_error_t stack_info_get (ws_stack_state_t *stack_info_ptr);
497
544
545
+ /* *
546
+ * \brief Get Wi-SUN CCA threshold table information.
547
+ *
548
+ * Function reads CCA threshold table from nanostack.
549
+ *
550
+ * \return pointer to ws_cca_threshold_table_t structure on success.
551
+ * \return NULL in case of failure.
552
+ * */
553
+ const ws_cca_threshold_table_t *cca_threshold_table_get (void );
554
+
498
555
protected:
499
556
Nanostack::WisunInterface *get_interface () const ;
500
557
virtual nsapi_error_t do_initialize ();
0 commit comments