|
|
int | api_version |
| | Must equal SENSOR_PLUGIN_API_VERSION at build time.
|
| |
| const char * | name |
| | Human-readable sensor name, e.g.
|
| |
| const char * | plugin_version |
| | Plugin version string, e.g.
|
| |
|
const char * | description |
| | Short description shown in sensor info/listing screens.
|
| |
|
int | sensor_id |
| | Numeric identifier stored alongside readings in the database.
|
| |
| int(* | init )(void) |
| | Called once after loading.
|
| |
| int(* | read_sample )(AirQualityData *out) |
| | Reads one sample into *out.
|
| |
| int(* | shutdown )(void) |
| | Called once before unloading, for cleanup.
|
| |
Runtime contract every sensor plugin (.so/.dylib/.dll) must implement.
A plugin exports a single global symbol named sensor_plugin of this type. sensor_module_load() validates api_version and the three required function pointers before the plugin is considered usable.
Definition at line 35 of file sensor.h.