The EmpathicBuilding watch sensor data provider class.
More...
#include <EmpathicBuildingWatchSensorDataProvider.qc.dox.h>
|
| constructor (RestClient::RestClient rest, *Logger::LoggerInterface logger, hash< auto > org, hash< auto > loc, hash< auto > sensor) |
| Create the object from the REST connection.
|
|
| destructor () |
| Destroys the object.
|
|
*string | getDesc () |
| Returns the data provider description.
|
|
string | getName () |
| Returns the data provider name.
|
|
| observersReady () |
| Called when all observers have been added to the object.
|
|
| stopEvents () |
| Called to stop generating events.
|
|
| constructor () |
| Creates the object.
|
|
| constructor (RestClient::RestClient rest, *Logger::LoggerInterface logger) |
| Creates the object.
|
|
| setLogger (*LoggerInterface logger) |
| Accepts a LoggerInterface object for logging (or clears it)
|
|
| updateConnectionObjects (object conn, object connobj) |
| Update any connection used by the data provider.
|
|
|
const | PollInterval = 10000 |
| Default poll interval in milliseconds.
|
|
const | ProviderInfo = ... |
| Provider info.
|
|
const | ProviderSummaryInfo = ... |
| Provider summary info.
|
|
const | RequestType = AbstractDataProviderTypeMap."nothing" |
| Request type.
|
|
const | ResponseType = new EmpathicBuildingSensorType() |
| Response type.
|
|
const | MaxIoRetries = 5 |
| Max retries.
|
|
const | RetrySet = ... |
| IO errors for REST retries.
|
|
|
Counter | cnt () |
| I/O thread counter.
|
|
Condition | cond () |
| I/O thread condition.
|
|
hash< auto > | getEvent (*reference< hash< auto > > info) |
| Returns event data.
|
|
hash< string, hash< DataProviderMessageInfo > > | getEventTypesImpl () |
| Returns a hash of all supported event types.
|
|
auto | getExampleEventDataImpl (string event_id) |
| Returns example data for the given observable event.
|
|
hash< DataProvider::DataProviderInfo > | getStaticInfoImpl () |
| Returns data provider static info.
|
|
| ioThread () |
| I/O thread.
|
|
Mutex | m () |
| I/O thread lock.
|
|
| start () |
| Connects and starts receiving messages.
|
|
| stop () |
| Stops listening for new events.
|
|
hash< auto > | doRestCommand (string method, string path, auto body, reference< hash< auto > > info) |
| Makes a REST call and returns the response.
|
|
bool | retry (hash< ExceptionInfo > ex, reference< int > retries) |
| Returns True if the error indicates that the operation should be retried.
|
|
|
hash< auto > | loc |
| Loc data.
|
|
hash< auto > | org |
| Org data.
|
|
timeout | poll_interval_ms |
| Poll interval in milliseconds.
|
|
hash< auto > | sensor |
| Sensor data.
|
|
*code | start_thread |
| callable value to start a new thread; must take a callable object as a parameter and return an integer TID
|
|
bool | stop_flag |
| Stop flag.
|
|
int | tid |
| TID of the I/O thread.
|
|
RestClient::RestClient | rest |
| The REST client object for API calls.
|
|
|
static date | getTimestamp (int epoch_ms) |
| Converts a Haltian ms epoch offset to a date/time value.
|
|
The EmpathicBuilding watch sensor data provider class.
◆ getEventTypesImpl()
hash< string, hash< DataProviderMessageInfo > > EmpathicBuildingDataProvider::EmpathicBuildingWatchSensorDataProvider::getEventTypesImpl |
( |
| ) |
|
|
protected |
Returns a hash of all supported event types.
- Returns
- a hash of all supported event types
- Note
- only called if the provider supports the observer pattern / event API
◆ getExampleEventDataImpl()
auto EmpathicBuildingDataProvider::EmpathicBuildingWatchSensorDataProvider::getExampleEventDataImpl |
( |
string | event_id | ) |
|
|
protected |
Returns example data for the given observable event.
- Parameters
-
event_id | the event ID of the event |
- Returns
- example data for the given observable event
- Exceptions
-
INVALID-OPERATION | the data provider does not support the observer pattern / event API |
INVALID-EVENT | the event_id is not valid |
- Since
- DataProvider 3.0
◆ observersReady()
EmpathicBuildingDataProvider::EmpathicBuildingWatchSensorDataProvider::observersReady |
( |
| ) |
|
Called when all observers have been added to the object.
This method is meant to trigger event generation
◆ stopEvents()
EmpathicBuildingDataProvider::EmpathicBuildingWatchSensorDataProvider::stopEvents |
( |
| ) |
|
Called to stop generating events.
Stops polling for new events