Mbed OS Reference
Loading...
Searching...
No Matches
AT_ControlPlane_netif Class Reference
Inheritance diagram for AT_ControlPlane_netif:
ControlPlane_netif

Protected Member Functions

virtual nsapi_size_or_error_t send (const void *cpdata, nsapi_size_t cpdata_length)
 Send data over cellular control plane. More...
 
virtual nsapi_size_or_error_t recv (void *cpdata, nsapi_size_t cpdata_length)
 Receive data over cellular control plane. More...
 
virtual void data_received ()
 Receives data from the control plane PDP context. More...
 
virtual void attach (void(*callback)(void *), void *data)
 Register a callback on state change of the socket. More...
 

Detailed Description

Definition at line 32 of file AT_ControlPlane_netif.h.

Member Function Documentation

◆ send()

virtual nsapi_size_or_error_t send ( const void *  cpdata,
nsapi_size_t  cpdata_length 
)
protectedvirtual

Send data over cellular control plane.

Parameters
cpdataBuffer of data to be sent over control plane connection
cpdata_lengthLength of data in bytes
Returns
Number of sent bytes on success, negative error code on failure.

Implements ControlPlane_netif.

◆ recv()

virtual nsapi_size_or_error_t recv ( void *  cpdata,
nsapi_size_t  cpdata_length 
)
protectedvirtual

Receive data over cellular control plane.

Parameters
cpdataDestination buffer for data received from control plane connection
cpdata_lengthLength of data in bytes
Returns
Number of received bytes on success, negative error code on failure.

Implements ControlPlane_netif.

◆ data_received()

virtual void data_received ( )
protectedvirtual

Receives data from the control plane PDP context.

This function is called by cellular PDP context when data is received from network. It will invoke the callback set by the above attach.

Implements ControlPlane_netif.

◆ attach()

virtual void attach ( void(*)(void *)  callback,
void *  data 
)
protectedvirtual

Register a callback on state change of the socket.

The specified callback will be called on state changes such as when the socket can recv/send successfully and on when an error occurs. The callback may also be called spuriously without reason.

The callback may be called in an interrupt context and should not perform expensive operations such as recv/send calls.

Parameters
callbackFunction to call on state change
dataArgument to pass to callback

Implements ControlPlane_netif.