@@ -53,8 +53,20 @@ typedef struct ws_stack_state {
5353 uint8_t join_state;
5454 /* * Network PAN ID */
5555 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;
5658} ws_stack_state_t ;
5759
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+
5870/* * Wi-SUN mesh network interface class
5971 *
6072 * Configure Nanostack to use Wi-SUN protocol.
@@ -373,6 +385,41 @@ class WisunInterface : public MeshInterfaceNanostack {
373385 * */
374386 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);
375387
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+
376423 /* *
377424 * \brief Set own certificate and private key reference to the Wi-SUN network.
378425 *
@@ -495,6 +542,18 @@ class WisunInterface : public MeshInterfaceNanostack {
495542 * */
496543 mesh_error_t stack_info_get (ws_stack_state_t *stack_info_ptr);
497544
545+ /* *
546+ * \brief Get Wi-SUN CCA threshold table information.
547+ *
548+ * Function reads CCA threshold table from nanostack.
549+ *
550+ ** \param ws_cca_threshold_table_t Structure given to stack where information will be stored
551+ **
552+ * \return MESH_ERROR_NONE on success.
553+ * \return MESH_ERROR_UNKNOWN in case of failure.
554+ * */
555+ mesh_error_t cca_threshold_table_get (ws_cca_threshold_table_t *table);
556+
498557protected:
499558 Nanostack::WisunInterface *get_interface () const ;
500559 virtual nsapi_error_t do_initialize ();
0 commit comments