runtime/runtime library
Contains classes for running the sensing framework incl. the StudyDeploymentExecutor, TaskExecutor and different types of Probes.
Classes
- AbstractDataManager
-
An abstract
DataManager
implementation useful for extension. -
AbstractExecutor<
TConfig> - An abstract implementation of a Executor to extend from.
-
AggregateExecutor<
TConfig> - An abstract class used to implement aggregated executors (i.e., executors with a set of underlying executors).
- AppTaskController
- A controller of UserTasks which is accessible in the userTaskQueue.
-
AppTaskExecutor<
TConfig extends AppTask> - Executes an AppTask.
- AwesomeNotificationController
- A NotificationController based on the awesome_notifications Flutter plugin.
- BackgroundSensingUserTask
-
A non-UI sensing task that collects sensor data in the background.
For example, a
noise
datum. - BackgroundTaskExecutor
-
Executes a
BackgroundTask
. -
BTLEDeviceManager<
TDeviceRegistration extends DeviceRegistration, TDeviceDescriptor extends DeviceDescriptor> - A device manager for a connectable bluetooth device.
- BufferingIntervalStreamProbe
-
An abstract probe which can be used to buffer data from a stream and collect data
every
interval
. All events from the bufferingStream are buffered, and collected from the getDatum method everyinterval
and send to the main data stream. - BufferingPeriodicProbe
-
An abstract probe which can be used to sample data into a buffer,
every
frequency
for a period ofduration
. These events are buffered, and once collected for theduration
, are collected from the getDatum method and send to the main data stream. - BufferingPeriodicStreamProbe
-
An abstract probe which can be used to sample data from a buffering stream,
every
interval
for a period ofduration
. These events are buffered for the specifiedduration
, and then collected from the getDatum method and send to the main data stream. - ConditionalPeriodicTriggerExecutor
- Executes a ConditionalPeriodicTrigger.
- ConditionalSamplingEventTriggerExecutor
- Executes a ConditionalSamplingEventTrigger based on the specified ConditionalSamplingEventTrigger.measureType and their ConditionalSamplingEventTrigger.resumeCondition and ConditionalSamplingEventTrigger.pauseCondition.
- Cron
- CronScheduledTriggerExecutor
- Executes a CronScheduledTrigger based on the specified cron job.
- DataManagerFactory
-
A factory which can create a
DataManager
based on thetype
of anDataEndPoint
. - DataManagerRegistry
- A registry of DataManagerFactorys.
- DateTimeTriggerExecutor
- Executes a DateTimeTrigger on the specified date and time.
- DatumProbe
- This probe collects one piece of Datum when resumed, send its to the data stream, and the automatically pauses.
- DelayedTriggerExecutor
- Executes a DelayedTrigger, i.e. resumes sampling after the specified delay. Once started, it can be paused / resumed as any other Executor.
- DeviceController
- A DeviceController handles runtime management of all devices and services connected to this phone, including the phone itself.
-
DeviceManager<
TDeviceRegistration extends DeviceRegistration, TDeviceDescriptor extends DeviceDescriptor> - A DeviceManager handles a hardware device or online service on runtime.
- ElapsedTimeTriggerExecutor
-
Executes a
ElapsedTimeTrigger
, i.e. resumes sampling after the specified delay after deployment start on this phone. -
Executor<
TConfig> -
A Executor is responsible for executing data collection based on a
configuration
TConfig
. - FlutterLocalNotificationController
- A NotificationController based on the flutter_local_notifications Flutter plugin.
- FunctionTaskExecutor
-
Executes a
BackgroundTask
. -
HardwareDeviceManager<
TDeviceRegistration extends DeviceRegistration, TDeviceDescriptor extends DeviceDescriptor> - A DeviceManager for a hardware device.
-
HasNext<
E> -
HasPrevious<
E> - ImmediateTriggerExecutor
- Executes a ImmediateTrigger, i.e. starts sampling immediately.
- IntervalDatumProbe
- A probe which is triggered at regular intervals, specified by the interval property in an IntervalSamplingConfiguration. When triggered, the probe collect a piece of data using the getDatum method.
- IntervalTriggerExecutor
- Executes a IntervalTrigger, i.e. resumes sampling on a regular basis.
- NotificationController
- A controller of user notifications based on UserTasks. Works closely with the AppTaskController.
- OneTimeBackgroundSensingUserTask
-
A non-UI sensing task that collects sensor data once.
For example collecting a
location
datum. - OneTimeTriggerExecutor
- Executes a OneTimeTrigger, i.e. a trigger that only runs once during a study deployment.
-
OnlineServiceManager<
TDeviceRegistration extends DeviceRegistration, TDeviceDescriptor extends OnlineService> - A DeviceManager for an online service, like a weather service.
- PassiveTriggerExecutor
- Executes a PassiveTrigger.
- PeriodicStreamProbe
-
A periodic probe listening on a stream. Listening is done periodically as
specified in a PeriodicSamplingConfiguration listening on intervals every
interval
for a period ofduration
. During this period, all data are forwarded to this probes data stream. - PeriodicTriggerExecutor
- Executes a PeriodicTrigger, i.e. resumes sampling on a regular basis for a given period of time.
- Probe
-
A Probe is a specialized Executor responsible for collecting data from
the device sensors as configured in a
Measure
. - RandomRecurrentTriggerExecutor
- Executes a RandomRecurrentTrigger triggering N times per day within a defined period of time.
- RecurrentScheduledTriggerExecutor
- Executes a RecurrentScheduledTrigger.
- SamplingEventTriggerExecutor
- Executes a SamplingEventTrigger based on the specified SamplingEventTrigger.measureType and SamplingEventTrigger.resumeCondition.
- SamplingPackage
- Interface for a sampling package.
- SamplingPackageRegistry
- A registry of SamplingPackage packages.
-
ScheduleableTriggerExecutor<
TConfig extends Trigger> -
Abstract class for executors of triggers which can be scheduled
(i.e., implementing the
Scheduleable
interface). - SensingUserTaskFactory
- A UserTaskFactory that can create the non-UI sensing tasks:
- Settings
- Misc. settings for CAMS.
- SmartPhoneClientManager
- SmartphoneDeploymentController
- A SmartphoneDeploymentController controls the execution of a SmartphoneDeployment.
- SmartphoneDeploymentService
-
A local (in-memory) implementation of a
DeploymentService
useful in CAMS studies to be deployed locally on this phone. - SmartphoneDeviceManager
- A device manager for a smartphone.
- SmartphoneSamplingPackage
- An abstract class for all sampling packages that run on the phone itself.
- StreamProbe
- An abstract class used to create a probe that listen continously to events from the stream of Datum objects.
- StudyDeploymentExecutor
- The StudyDeploymentExecutor is responsible for executing a SmartphoneDeployment. For each triggered task in this deployment, it starts a TriggeredTaskExecutor.
- StudyProtocolManager
- An interface defining a manger of SmartphoneStudyProtocols.
-
TaskExecutor<
TConfig extends TaskDescriptor> -
The TaskExecutor is responsible for executing a
TaskDescriptor
. For each measure in the task, it looks up appropriate Probes to collect data. - TriggeredAppTaskExecutor
-
Responsible for handling the execution of a
TriggeredTask
which contains an AppTask. - TriggeredTaskExecutor
-
Responsible for handling the execution of a
TriggeredTask
. -
TriggerExecutor<
TConfig extends Trigger> -
Responsible for handling the execution of a
Trigger
. - UserTask
- A task that the user of the app needs to attend to.
- UserTaskFactory
-
A factory which can create a UserTask based on the
type
of an AppTask. - UserTaskSnapshot
- A snapshot of a UserTask at any given time. Used for saving user tasks persistently across app restart.
- UserTaskSnapshotList
- UserTaskTriggerExecutor
- Executes a UserTaskTrigger.
Enums
- DebugLevel
- Debugging levels.
- DeviceStatus
- Runtime status for a DeviceManager.
- ExecutorState
- The state of an Executor.
- UserTaskState
- The states of a UserTask.
Mixins
-
CronIterator<
E>
Functions
-
debug(
String message) → void - A simple method for printing debug messages to the console.
-
getTaskExecutor(
TaskDescriptor task) → TaskExecutor< TaskDescriptor> -
Returns the relevant TaskExecutor based on the type of
task
. -
getTriggeredTaskExecutor(
TriggeredTask triggeredTask, Trigger trigger, TaskDescriptor task) → TriggeredTaskExecutor -
Returns the relevant TriggeredTaskExecutor based on the type of
trigger
andtask
. -
getTriggerExecutor(
Trigger trigger) → TriggerExecutor< Trigger> -
Returns the relevant TriggerExecutor based on the type of
trigger
. -
info(
String message) → void - A simple method for printing warning messages to the console.
-
onDidReceiveNotificationResponse(
NotificationResponse response) → void -
warning(
String message) → void - A simple method for printing warning messages to the console.
Exceptions / Errors
- SensingException
- Generic sensing exception.