mbed based IoT Gateway More details http://blog.thiseldo.co.uk/wp-filez/IoTGateway.pdf

Dependencies:   NetServices FatFileSystem csv_parser mbed MQTTClient RF12B DNSResolver SDFileSystem

Embed: (wiki syntax)

« Back to documentation index

OutputEmonCms Class Reference

OutputEmonCms Class Reference

Output definition class for sending readings to OpenEnergyMonitor emonCms. More...

#include <OutputEmonCms.h>

Public Member Functions

 OutputEmonCms ()
 Default Constructor.
 OutputEmonCms (char *internalBufferStart, char *url, char *key)
 Alternative Constructor.
virtual void init ()
 Set the API Key to use for sending readings to Pachube.
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 OpenEnergyMonitor emonCms.

Definition at line 42 of file OutputEmonCms.h.


Constructor & Destructor Documentation

Default Constructor.

Definition at line 40 of file OutputEmonCms.cpp.

OutputEmonCms ( 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 46 of file OutputEmonCms.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 65 of file OutputEmonCms.cpp.

int getSendCount ( void   ) [virtual]

Get the send count.

Returns:
mumber of API calls made

Definition at line 108 of file OutputEmonCms.cpp.

void init (  ) [virtual]

Set the API Key to use for sending readings to Pachube.

Parameters:
keyPointer to API key Initialise output definition object

Definition at line 56 of file OutputEmonCms.cpp.

int send ( void   ) [virtual]

Send any collected readings to the api.

Returns:
-1 for fail, 1 for success

Definition at line 73 of file OutputEmonCms.cpp.