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 Vincent Wochnik

util/SmartRestSocket.h

Committer:
xinlei
Date:
2015-04-20
Revision:
94:61d44636f020
Child:
97:ea056f6be2e8

File content as of revision 94:61d44636f020:

#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 */