File tree Expand file tree Collapse file tree 4 files changed +30
-0
lines changed Expand file tree Collapse file tree 4 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,9 @@ class InterfaceNanostack : public virtual NetworkInterface {
140
140
*/
141
141
virtual nsapi_error_t set_file_system_root_path (const char *root_path);
142
142
143
+ /* * @copydoc NetworkInterface::get_interface_property */
144
+ virtual nsapi_error_t get_interface_property (nsapi_size_t data_amount, nsapi_size_t *jitter);
145
+
143
146
/* * Get the interface ID
144
147
* @return Interface identifier
145
148
*/
Original file line number Diff line number Diff line change 19
19
#include " NanostackLockGuard.h"
20
20
#include " mesh_system.h"
21
21
#include " nanostack/net_interface.h"
22
+ #include " nanostack/ns_property.h"
22
23
#include " thread_management_if.h"
23
24
#include " ip6string.h"
24
25
#include " mbed_error.h"
@@ -232,6 +233,19 @@ nsapi_error_t InterfaceNanostack::set_file_system_root_path(const char *root_pat
232
233
return MESH_ERROR_UNKNOWN;
233
234
}
234
235
236
+ nsapi_error_t InterfaceNanostack::get_interface_property (nsapi_size_t data_amount, nsapi_size_t *jitter) {
237
+ ns_properties_t ns_properties;
238
+
239
+ ns_properties.data_amount = data_amount;
240
+
241
+ if (ns_property_get (get_interface_id (), &ns_properties) == 0 ) {
242
+ *jitter = ns_properties.tx_jitter ;
243
+ return NSAPI_ERROR_OK;
244
+ }
245
+
246
+ return NSAPI_ERROR_NO_CONNECTION;
247
+ }
248
+
235
249
#if !DEVICE_802_15_4_PHY
236
250
MBED_WEAK MeshInterface *MeshInterface::get_target_default_instance ()
237
251
{
Original file line number Diff line number Diff line change @@ -174,3 +174,7 @@ nsapi_error_t NetworkInterface::set_blocking(bool blocking)
174
174
return NSAPI_ERROR_UNSUPPORTED;
175
175
}
176
176
177
+ nsapi_error_t NetworkInterface::get_interface_property (unsigned int data_amount, unsigned int *jitter)
178
+ {
179
+ return NSAPI_ERROR_UNSUPPORTED;
180
+ }
Original file line number Diff line number Diff line change @@ -378,6 +378,15 @@ class NetworkInterface: public DNS {
378
378
*/
379
379
virtual nsapi_error_t set_blocking (bool blocking);
380
380
381
+ /* * Get suggested data transmission jitter from underlying network interface.
382
+ *
383
+ * @param data_amount Amount of data to be sent
384
+ * @param jitter Address to location where suggested jitter value is written
385
+ * @return NSAPI_ERROR_OK on success
386
+ * @return NSAPI_ERROR_UNSUPPORTED, NSAPI_ERROR_NO_CONNECTION
387
+ */
388
+ virtual nsapi_error_t get_interface_property (unsigned int data_amount, unsigned int *jitter);
389
+
381
390
/* * Return pointer to an EthInterface.
382
391
* @return Pointer to requested interface type or NULL if this class doesn't implement the interface.
383
392
*/
You can’t perform that action at this time.
0 commit comments