Generic SmartRest library
Dependents: SmartRestUnitTest MbedSmartRest MbedSmartRestStreaming
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:
-
client the abstract client to use identifier the 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:
-
record an 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:
-
generator the 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.
Generated on Wed Jul 13 2022 09:53:06 by 1.7.2