Official reference client implementation for Cumulocity SmartREST on u-blox C027.
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
Diff: util/SmartRestSocket.h
- Revision:
- 94:61d44636f020
- Child:
- 97:ea056f6be2e8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/util/SmartRestSocket.h Mon Apr 20 15:04:23 2015 +0000 @@ -0,0 +1,21 @@ +#ifndef SMARTRESTSOCKET_H +#define SMARTRESTSOCKET_H +#include "MDM.h" +#include "TCPSocketConnection.h" +#include "rtos.h" + +class SmartRestSocket : public TCPSocketConnection +{ +public: + SmartRestSocket(MDMSerial& m): TCPSocketConnection(), mdm(m) {} + virtual ~SmartRestSocket() {} + int connect(); + int sendOnly(char *buf, int size); + int sendAndReceive(char *buf, int size, int maxSize); +private: + static char cachedIP[16]; + MDMSerial& mdm; + Mutex ipLock; +}; + +#endif /* SMARTRESTSOCKET_H */ \ No newline at end of file