18 #ifndef CELLULARNONIPSOCKET_H 19 #define CELLULARNONIPSOCKET_H 22 #include "rtos/Mutex.h" 23 #include "rtos/EventFlags.h" 25 #include "mbed_atomic.h" 26 #include "mbed_toolchain.h" 141 uint32_t _timeout = osWaitForever;
146 uint8_t _readers = 0;
147 uint8_t _writers = 0;
151 static const int READ_FLAG = 0x1u;
152 static const int WRITE_FLAG = 0x2u;
153 static const int FINISHED_FLAG = 0x3u;
156 bool _opened =
false;
162 #endif // CELLULARNONIPSOCKET_H void sigio(mbed::Callback< void()> func) override
Register a callback on state change of the socket.
Implements support for data transfer using Control Plane CIoT EPS optimization specified in 3GPP 23...
nsapi_error_t close() override
Closes socket.
nsapi_error_t bind(const SocketAddress &address) override
NOT APPLICABLE.
The EventFlags class is used to control event flags or wait for event flags other threads control...
nsapi_size_or_error_t recvfrom(SocketAddress *address, void *data, nsapi_size_t size) override
NOT APPLICABLE.
Socket * accept(nsapi_error_t *error=NULL) override
NOT APPLICABLE.
CellularNonIPSocket()
Creates a socket.
void set_timeout(int timeout) override
Set timeout on blocking socket operations.
nsapi_error_t getpeername(SocketAddress *address) override
NOT APPLICABLE.
CellularContext is CellularInterface/NetworkInterface with extensions for cellular connectivity...
Implements support for data transfer using Control Plane CIoT EPS optimization.
nsapi_error_t setsockopt(int level, int optname, const void *optval, unsigned optlen) override
NOT APPLICABLE.
signed int nsapi_error_t
Type used to represent error codes.
A lock-free, primitive atomic flag.
nsapi_error_t open(mbed::CellularContext *cellular_context)
Opens a socket on the given cellular context.
signed int nsapi_size_or_error_t
Type used to represent either a size or error passed through sockets.
nsapi_error_t getsockopt(int level, int optname, void *optval, unsigned *optlen) override
NOT APPLICABLE.
Abstract Socket interface.
Cellular PDP context class.
The Mutex class is used to synchronize the execution of threads.
~CellularNonIPSocket() override
Destroy the socket.
nsapi_size_or_error_t recv(void *data, nsapi_size_t size) override
Receive data from a socket.
nsapi_error_t listen(int backlog=1) override
NOT APPLICABLE.
void set_blocking(bool blocking) override
Set blocking or non-blocking mode of the socket.
nsapi_size_or_error_t send(const void *data, nsapi_size_t size) override
Send data over a control plane cellular context.
unsigned int nsapi_size_t
Type used to represent the size of data passed through sockets.
nsapi_size_or_error_t sendto(const SocketAddress &address, const void *data, nsapi_size_t size) override
NOT APPLICABLE.
Callback class based on template specialization.
nsapi_error_t connect(const SocketAddress &address) override
NOT APPLICABLE.
Socket implementation for cellular Non-IP data delivery(NIDD).