@@ -49,15 +49,14 @@ class EmacTestNetworkStack : public OnboardNetworkStack, private mbed::NonCopyab
49
49
* @param netmask Net mask to be used for the interface as "W:X:Y:Z" or NULL
50
50
* @param gw Gateway address to be used for the interface as "W:X:Y:Z" or NULL
51
51
* @param stack Allow manual selection of IPv4 and/or IPv6.
52
+ * @param blocking Specify whether bringup blocks for connection completion.
52
53
* @return NSAPI_ERROR_OK on success, or error code
53
54
*/
54
55
virtual nsapi_error_t bringup (bool dhcp, const char *ip,
55
- const char *netmask, const char *gw,
56
- nsapi_ip_stack_t stack
57
- #ifdef __cplusplus
58
- = DEFAULT_STACK
59
- #endif
60
- );
56
+ const char *netmask, const char *gw,
57
+ nsapi_ip_stack_t stack = DEFAULT_STACK,
58
+ bool blocking = true
59
+ );
61
60
62
61
/* * Disconnect interface from the network
63
62
*
@@ -67,6 +66,22 @@ class EmacTestNetworkStack : public OnboardNetworkStack, private mbed::NonCopyab
67
66
*/
68
67
virtual nsapi_error_t bringdown ();
69
68
69
+ /* * Register callback for status reporting
70
+ *
71
+ * The specified status callback function will be called on status changes
72
+ * on the network. The parameters on the callback are the event type and
73
+ * event-type dependent reason parameter.
74
+ *
75
+ * @param status_cb The callback for status changes
76
+ */
77
+ virtual void attach (mbed::Callback<void (nsapi_event_t , intptr_t )> status_cb);
78
+
79
+ /* * Get the connection status
80
+ *
81
+ * @return The connection status according to ConnectionStatusType
82
+ */
83
+ virtual nsapi_connection_status_t get_connection_status () const ;
84
+
70
85
/* * Return MAC address of the network interface
71
86
*
72
87
* @return MAC address as "V:W:X:Y:Z"
0 commit comments