Generic SmartRest library

Dependents:   SmartRestUnitTest MbedSmartRest MbedSmartRestStreaming

Embed: (wiki syntax)

« Back to documentation index

SmartRest Class Reference

SmartRest Arduino client implementation. More...

#include <SmartRest.h>

Public Member Functions

int8_t send (DataGenerator &)
 Sends a smart request.
int8_t receive (ParsedRecord &)
 Tries to receive a parsed response row.

Protected Member Functions

 SmartRest (AbstractClient &, const char *)
 Creates a new GenericSmartRest object.

Detailed Description

SmartRest Arduino client implementation.

This class provides methods to send a request and receive a response from the server.

Definition at line 72 of file SmartRest.h.


Constructor & Destructor Documentation

SmartRest ( AbstractClient &  client,
const char *  identifier 
) [protected]

Creates a new GenericSmartRest object.

Parameters:
clientthe abstract client to use
identifierthe device identifier

Definition at line 34 of file SmartRest.cpp.


Member Function Documentation

int8_t receive ( ParsedRecord record )

Tries to receive a parsed response row.

When the function succeeds, but the row pointer is NULL, there are no more rows to be read.

Parameters:
recordan instance to where the parsed row is written
Returns:
a non-zero value if and only if an error occured

Definition at line 52 of file SmartRest.cpp.

int8_t send ( DataGenerator &  generator )

Sends a smart request.

Parameters:
generatorthe generator which will generate the data to be sent.
Returns:
a non-zero value if and only if an error occured

Definition at line 40 of file SmartRest.cpp.