forked from blawson/PachubeArduino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cosm.h
23 lines (20 loc) · 662 Bytes
/
Cosm.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef Cosm_h
#define Cosm_h
#include <Ethernet.h>
#include "Arduino.h"
class CosmClient
{
public:
CosmClient(char apiKey[]);
bool connectWithMac(byte macAddress[]);
bool connectWithIP(byte macAddress[], IPAddress localIP);
bool connectViaGateway(byte macAddress[], IPAddress localIP, IPAddress dnsServerIP, IPAddress gatewayIP, IPAddress subnet);
void updateFeed(uint32_t feedId, char datastreamId[], double dataToSend);
char * getFeed(uint32_t);
void readFromFeed();
bool closeConnection();
int getLength(double data);
private:
void sendData(uint32_t feedId, char datastreamId[], double dataToSend);
};
#endif