|
IOT-ESP32
|
Manage specific capabilities/data types of devices. More...
Typedefs | |
| typedef uint8_t | sensor_idx_t |
| The device index of the installed sensor. More... | |
Enumerations | |
| enum | contact_t |
contact states More... | |
| enum | interface_t |
| Sensor physical interfaces. More... | |
| enum | motion_t |
motion states More... | |
| enum | presence_t |
presence states More... | |
| enum | sensor_type_t |
| Types of sensors. More... | |
| enum | update_scope_t |
| Services to provide update scope. More... | |
| enum | update_status_t |
| State of a requested update/event. More... | |
Functions | |
| const sensor_t * | sensor_get_by_type (sensor_type_t) |
| Return a sensor type refernce using the string name. More... | |
| const sensor_t * | sensor_get_by_type_name (attribute_t) |
| Get reference to definition of SENSOR_TYPE. More... | |
| void | sensor_payload_entry_attr (sensor_data_entry_t, char *, sensor_val_type_t, void *) |
| Update sensor entry of payload with the primary data. More... | |
| void | sensor_payload_entry_id (sensor_data_entry_t, uint8_t, sensor_type_t) |
| Update sensor entry of payload with device index and type. More... | |
| void | sensor_payload_entry_tag (sensor_data_entry_t, sensor_tag_t) |
| Update sensor entry of payload with 'tags'. More... | |
| uint8_t | sensor_process_payload (sensor_t *, sensor_multi_data_t *) |
| Prepare sensor layer of payload stack. More... | |
| void | sensor_type_get_name (sensor_type_t, attribute_t) |
| Return a usable type string provided a TYPE_ENUM. More... | |
Manage specific capabilities/data types of devices.
| typedef uint16_t sensor_idx_t |
The device index of the installed sensor.
| enum sensor_type_t |
Types of sensors.
Identifiers for the sensor types or capabilites we support
| enum presence_t |
presence states
State values to represent 'presence'
| enum motion_t |
motion states
State values to represent 'motion'
| enum contact_t |
contact states
State values to represent 'contact'
| enum update_scope_t |
Services to provide update scope.
Bitmask representing which service 'scopes' an update belongs to. This will dictate which handlers are called for delivery.
| enum interface_t |
Sensor physical interfaces.
Defines what type of interface the sensor type uses on the device. Interfaces must be implementd on the device, and can be reused between sensors. When a device receives its configuration, these are the physical interfaces that will be configured to provide data for the sensor types.
| enum update_status_t |
State of a requested update/event.
Track the state of the update for the various scopes provided on the request tracking the delivery lifecycle.
| uint8_t sensor_process_payload | ( | sensor_t * | , |
| sensor_multi_data_t * | |||
| ) |
Prepare sensor layer of payload stack.
The payload layer is modified in place for the calling higher order entity
| sensora | ptr to the appropriate sensor index of the originating device |
| data | one sensor slice from the device payload |
| void sensor_payload_entry_id | ( | sensor_data_entry_t | , |
| uint8_t | , | ||
| sensor_type_t | |||
| ) |
Update sensor entry of payload with device index and type.
| entry | ptr to a sensor entry of a device payload |
| sensor_index | the devices index number for this sensor |
| type | the sensors type |
| void sensor_payload_entry_tag | ( | sensor_data_entry_t | , |
| sensor_tag_t | |||
| ) |
Update sensor entry of payload with 'tags'.
The 'tags' allow us to tack on additional key/value info to the same entry attribute (data point), providing for any number of dimesions in the time series data.
| entry | ptr to a sensor entry of a device payload |
| tag | Tag (k/v) to add. sensor_tag_t =~ attribute_t / attribute_t |
| void sensor_payload_entry_attr | ( | sensor_data_entry_t | , |
| char * | , | ||
| sensor_val_type_t | , | ||
| void * | |||
| ) |
Update sensor entry of payload with the primary data.
Each sensor entry contains only one attribute / value pair which provides the measurement output. The sensor may provide several entries from a reading, each representing a unique measurement.
| entry | ptr to a sensor entry of a device payload |
| attr | the string which describe the unie of measurement receieved |
| val_type | how to interpret the value represented in binary |
| val | the value as a stdint type up to 32-bits |
| void sensor_type_get_name | ( | sensor_type_t | , |
| attribute_t | |||
| ) |
Return a usable type string provided a TYPE_ENUM.
Necessary evil for the ability to serialize between services without coupling.
| type |
| const sensor_t * sensor_get_by_type_name | ( | attribute_t | ) |
Get reference to definition of SENSOR_TYPE.
| type |
| const sensor_t * sensor_get_by_type | ( | sensor_type_t | ) |
Return a sensor type refernce using the string name.
Necessary evil for the ability to serialize between services without coupling.
| type | string representation of the type (sensor.type) |