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

Committer:
xinlei
Date:
Wed May 13 15:00:24 2015 +0000
Revision:
110:b7a403dbceb6
Parent:
101:dbcd3bc51758
Child:
113:3872569be2af
small fix for when there are no pending operations

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Cumulocity 41:804f6a0bda26 1 #ifndef DEVICEBOOTSTRAP_H
Cumulocity 41:804f6a0bda26 2 #define DEVICEBOOTSTRAP_H
Cumulocity 41:804f6a0bda26 3
Cumulocity 41:804f6a0bda26 4 #include <stddef.h>
vwochnik 55:a0f7295ed6b6 5 #include "AbstractSmartRest.h"
Cumulocity 41:804f6a0bda26 6 #include "DeviceInfo.h"
Cumulocity 41:804f6a0bda26 7
xinlei 101:dbcd3bc51758 8 #define CREDENTIAL_LENGTH 256
Cumulocity 41:804f6a0bda26 9
Cumulocity 41:804f6a0bda26 10 class DeviceBootstrap
Cumulocity 41:804f6a0bda26 11 {
Cumulocity 41:804f6a0bda26 12 public:
xinlei 98:9f2de96941c4 13 DeviceBootstrap(AbstractSmartRest&, DeviceInfo&);
xinlei 98:9f2de96941c4 14
Cumulocity 41:804f6a0bda26 15 bool setUpCredentials();
xinlei 110:b7a403dbceb6 16 const char* username() const { return _username; }
xinlei 110:b7a403dbceb6 17 const char* password() const { return _password; }
Cumulocity 41:804f6a0bda26 18
Cumulocity 41:804f6a0bda26 19 protected:
Cumulocity 41:804f6a0bda26 20 bool obtainFromPlatform();
Cumulocity 41:804f6a0bda26 21
Cumulocity 41:804f6a0bda26 22 private:
Cumulocity 41:804f6a0bda26 23 void setCredentials(const char *, const char*, const char*);
Cumulocity 41:804f6a0bda26 24
Cumulocity 41:804f6a0bda26 25 private:
vwochnik 55:a0f7295ed6b6 26 AbstractSmartRest& _client;
Cumulocity 41:804f6a0bda26 27 DeviceInfo& _deviceInfo;
xinlei 101:dbcd3bc51758 28 char _username[CREDENTIAL_LENGTH];
xinlei 101:dbcd3bc51758 29 char _password[CREDENTIAL_LENGTH];
Cumulocity 41:804f6a0bda26 30 };
Cumulocity 41:804f6a0bda26 31
Cumulocity 41:804f6a0bda26 32 #endif