Andrew Lindsay / Mbed 2 deprecated IoTGateway_Basic

Dependencies:   NetServices FatFileSystem csv_parser mbed MQTTClient RF12B DNSResolver SDFileSystem

Embed: (wiki syntax)

« Back to documentation index

OutputPachube Class Reference

OutputPachube Class Reference

Output definition class for sending readings to Pachube. More...

#include <OutputPachube.h>

Public Member Functions

 OutputPachube ()
 Default Constructor.
 OutputPachube (char *internalBufferStart, char *url, char *key)
 Alternative Constructor.
virtual void init ()
 Initialise output definition object.
virtual void addReading (char *dataFeed, char *dataStream, char *reading)
 Add a character pointer reading to output.
virtual int send ()
 Send any collected readings to the api.
virtual int getSendCount ()
 Get the send count.

Detailed Description

Output definition class for sending readings to Pachube.

Definition at line 42 of file OutputPachube.h.


Constructor & Destructor Documentation

Default Constructor.

Definition at line 38 of file OutputPachube.cpp.

OutputPachube ( char *  internalBufferStart,
char *  url,
char *  key 
)

Alternative Constructor.

Parameters:
internalBufferStartAn internal buffer used to build up requests.
urlPointer to API Url
keyPointer to API key

Definition at line 44 of file OutputPachube.cpp.


Member Function Documentation

void addReading ( char *  dataFeed,
char *  dataStream,
char *  reading 
) [virtual]

Add a character pointer reading to output.

Parameters:
dataFeedThe feed to update
dataStreamThe data stream within the feed to update or null if no feed
readingThe new value

Definition at line 59 of file OutputPachube.cpp.

int getSendCount ( void   ) [virtual]

Get the send count.

Returns:
mumber of API calls made

Definition at line 113 of file OutputPachube.cpp.

void init (  ) [virtual]

Initialise output definition object.

Definition at line 54 of file OutputPachube.cpp.

int send ( void   ) [virtual]

Send any collected readings to the api.

Returns:
-1 for fail, 1 for success

Definition at line 72 of file OutputPachube.cpp.