herald  2.0.0
Public Member Functions | Static Public Attributes | List of all members
herald::SensorArray< ContextT, PayloadDataSupplierT, SensorTs > Class Template Reference

Manages all Sensors and sensor delegates for Herald. More...

#include <sensor_array.h>

Public Member Functions

 SensorArray (ContextT &ctx, PayloadDataSupplierT &payloadDataSupplier, SensorTs &... sensors)
 Takes ownership of payloadDataSupplier (std::move)
 
PayloadData payloadData ()
 
void start ()
 Adds a new sensor to the array, and add its coordination provider to the engine.
 
void stop ()
 
std::optional< std::reference_wrapper< CoordinationProvider > > coordinationProvider ()
 
void iteration (const TimeInterval sinceLastCompleted)
 Scheduling activities from external OS thread wakes - Since v1.2-beta3.
 

Static Public Attributes

static constexpr std::size_t Size = sizeof...(SensorTs)
 

Detailed Description

template<typename ContextT, typename PayloadDataSupplierT, typename... SensorTs>
class herald::SensorArray< ContextT, PayloadDataSupplierT, SensorTs >

Manages all Sensors and sensor delegates for Herald.

This is the Core logic and runtime class for all of Herald. It is platform independent and Sensor technology independent. On C++ this class does NOT use threads. It is instead up to the platform developer to call the iteration(TimeInterval) function from whichever scheduling or threading tools are available on each platform. In Zephyr RTOS, for example, This is a simple 250ms delay within a special Herald-only Zephyr kernel thread.


The documentation for this class was generated from the following file: