@@ -50,7 +50,7 @@ class WisunInterface : public MeshInterfaceNanostack {
50
50
* \return MESH_ERROR_NONE on success.
51
51
* \return MESH_ERROR_UNKNOWN in case of failure.
52
52
* */
53
- mesh_error_t network_name_set (char *network_name);
53
+ mesh_error_t set_network_name (char *network_name);
54
54
55
55
/* *
56
56
* \brief Set Wi-SUN network regulatory domain, operating class and operating mode.
@@ -61,13 +61,68 @@ class WisunInterface : public MeshInterfaceNanostack {
61
61
*
62
62
* Function overwrites parameters defined by Mbed OS configuration.
63
63
*
64
- * \param regulatory_domain Values defined in Wi-SUN PHY-specification
65
- * \param operating_class Values defined in Wi-SUN PHY-specification
66
- * \param operating_mode Values defined in Wi-SUN PHY-specification
64
+ * \param regulatory_domain Values defined in Wi-SUN PHY-specification. Use 0xff to use leave parameter unchanged.
65
+ * \param operating_class Values defined in Wi-SUN PHY-specification. Use 0xff to use leave parameter unchanged.
66
+ * \param operating_mode Values defined in Wi-SUN PHY-specification. Use 0xff to use leave parameter unchanged.
67
67
* \return MESH_ERROR_NONE on success.
68
68
* \return MESH_ERROR_UNKNOWN in case of failure.
69
69
* */
70
- mesh_error_t network_regulatory_domain_set (uint8_t regulatory_domain = 0xff , uint8_t operating_class = 0xff , uint8_t operating_mode = 0xff );
70
+ mesh_error_t set_network_regulatory_domain (uint8_t regulatory_domain = 0xff , uint8_t operating_class = 0xff , uint8_t operating_mode = 0xff );
71
+
72
+ /* *
73
+ * \brief Set own certificate and private key reference to the Wi-SUN network.
74
+ *
75
+ * Function can be called several times if intermediate certificates are used. Then each call to the function
76
+ * adds a certificate reference to own certificate chain. Certificates are in bottom up order i.e. the top certificate is given last.
77
+ *
78
+ * Function must be called before connecting the device i.e before first call to connect() method.
79
+ * Function will not copy certificate or key, therefore addresses must remain valid.
80
+ *
81
+ * \param cert Certificate address.
82
+ * \param cert_len Certificate length in bytes.
83
+ * \param cert_key Certificate key address.
84
+ * \param cert_key_len Certificate key length in bytes.
85
+ * \return MESH_ERROR_NONE on success.
86
+ * \return MESH_ERROR_STATE if method is called after calling connect().
87
+ * \return MESH_ERROR_MEMORY in case of memory allocation failure.
88
+ * */
89
+ mesh_error_t set_own_certificate (uint8_t *cert, uint16_t cert_len, uint8_t *cert_key = NULL , uint16_t cert_key_len = 0 );
90
+
91
+ /* *
92
+ * \brief Remove own certificates from the Wi-SUN network.
93
+ *
94
+ * Function must be called before connecting the device i.e before first call to connect() method.
95
+ *
96
+ * \return MESH_ERROR_NONE on success.
97
+ * \return MESH_ERROR_STATE if method is called after calling connect().
98
+ * */
99
+ mesh_error_t remove_own_certificates (void );
100
+
101
+ /* *
102
+ * \brief Set trusted certificate reference to the Wi-SUN network.
103
+ *
104
+ * Function can be called several times. Certificates are in bottom up order i.e. the top certificate is given last.
105
+ *
106
+ * Function must be called before connecting the device i.e before first call to connect() method.
107
+ * Function will not copy certificate, therefore addresses must remain valid.
108
+ *
109
+ * \param cert Certificate address.
110
+ * \param cert_len Certificate length in bytes.
111
+ * \return MESH_ERROR_NONE on success.
112
+ * \return MESH_ERROR_STATE if method is called after calling connect().
113
+ * \return MESH_ERROR_MEMORY in case of memory allocation failure.
114
+ * */
115
+ mesh_error_t set_trusted_certificate (uint8_t *cert, uint16_t cert_len);
116
+
117
+ /* *
118
+ * \brief Remove trusted certificates from the Wi-SUN network.
119
+ *
120
+ * Function must be called before connecting the device i.e before first call to connect() method.
121
+ *
122
+ * \return MESH_ERROR_NONE on success.
123
+ * \return MESH_ERROR_STATE if method is called after calling connect().
124
+ * */
125
+ mesh_error_t remove_trusted_certificates (void );
71
126
72
127
/* *
73
128
* \brief Get router IP address
0 commit comments