Socket interface for C027Interface. Implements the NetworkSocketAPI
Dependencies: C027_Support
Dependents: HelloC027Interface U_Blox_DeviceConnector U_Blox_DeviceConnector U-Blox_Client
Fork of LWIPInterface by
Diff: C027Interface.h
- Revision:
- 16:eaf31bd133f0
- Parent:
- 15:21d4f56eb172
- Child:
- 17:3f1e33e638a4
--- a/C027Interface.h Tue Apr 26 20:34:29 2016 +0000 +++ b/C027Interface.h Thu Feb 02 16:17:35 2017 +0000 @@ -155,6 +155,15 @@ * @note Callback may be called in an interrupt context. */ virtual void socket_attach(void *handle, void (*callback)(void *), void *data); + + /** Provide access to the NetworkStack object + * + * @return The underlying NetworkStack object + */ + virtual NetworkStack *get_stack() + { + return this; + } private: // Modem object @@ -163,6 +172,9 @@ SocketAddress _ip_address; char _mac_address[NSAPI_MAC_SIZE]; char _pin[sizeof "1234"]; + Thread _thread; + void (*_callback)(void *); void *_data; + void _run(); }; #endif