runtime library
The runtime layer is the main entry point to CAMS and holds the SmartPhoneClientManager, SmartphoneStudyControllers with a SmartphoneDeploymentExecutor for each running study, DeviceController with DeviceManagers for each connected device, and a SamplingPackageRegistry for registering sampling packages and their supported devices and probes.
Classes
-
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).
- AppLifecycleTriggerExecutor
- Executes an AppLifecycleTrigger.
- AppTaskControlExecutor
-
Responsible for handling the execution of a
TaskControlwhich contains an AppTask. - AppTaskController
- A controller of UserTasks which is accessible in the userTaskQueue.
-
AppTaskExecutor<
TConfig extends AppTask> - Executes an AppTask.
- BackgroundSensingUserTask
- A non-UI sensing task that collects sensor data in the background. For example noise.
- BackgroundTaskExecutor
-
Executes a
BackgroundTask. -
BLEDeviceManager<
TDeviceConfiguration extends BLEDevice< TRegistration> , TRegistration extends BLEDeviceRegistration> - A device manager for a connectable Bluetooth Low Energy (BLE) device.
- BufferingIntervalStreamProbe
- A type of probe which buffers data from an underlying stream and on a regular interval return a measurement based on this collected data.
- BufferingPeriodicProbe
- An type of probe which collects data for a period of time and then return a measurement from this collected data.
- BufferingPeriodicStreamProbe
- A type of probe which buffers data from an underlying stream for a period of time and then return a measurement from this collected data.
- ConditionalPeriodicTriggerExecutor
- Executes a ConditionalPeriodicTrigger.
- ConditionalSamplingEventTriggerExecutor
- Executes a ConditionalSamplingEventTrigger.
- Cron
- CronScheduledTriggerExecutor
- Executes a CronScheduledTrigger based on the specified cron job.
- DateTimeTriggerExecutor
- Executes a DateTimeTrigger on the specified date and time.
- DelayedTriggerExecutor
- Executes a DelayedTrigger, i.e. triggers after the specified delay.
- DeviceController
- A DeviceController handles runtime management of all devices and services available to this phone, including the phone itself.
-
DeviceManager<
TDeviceConfiguration extends DeviceConfiguration< TRegistration> , TRegistration extends DeviceRegistration> - A DeviceManager handles the runtime of any type of device or service used for data collection.
- ElapsedTimeTriggerExecutor
-
Executes a
ElapsedTimeTrigger, i.e. triggers 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. - ExecutorFactory
-
A factory that holds the set of trigger and task executors used in all
deployments. Accessed as a singleton using
ExecutorFactory(). - FunctionTaskExecutor
- Executes a FunctionTask.
-
HardwareDeviceManager<
TDeviceConfiguration extends DeviceConfiguration< TRegistration> , TRegistration extends DeviceRegistration> - A DeviceManager for a hardware device.
-
HasNext<
E> -
HasPrevious<
E> - ImmediateTriggerExecutor
- Executes an ImmediateTrigger, i.e. starts sampling immediately.
- IntervalProbe
- A probe which is triggered at regular intervals, specified by the interval property in an IntervalSamplingConfiguration. When triggered, the probe collect a measurement using the getMeasurement method.
- MeasurementProbe
-
This probe collects a single
Measurementwhen started, send its to the measurements stream, and then stops. - NoOpTriggerExecutor
- Executes an NoOpTrigger, i.e. does nothing.
- NoUserTaskTriggerExecutor
- Executes an NoUserTaskTrigger. Runs once pr minute.
- OneTimeTriggerExecutor
- Executes a OneTimeTrigger, i.e. a trigger that only runs once during a study deployment.
- 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
intervalfor a period ofduration. During this period, all data are forwarded to this probes measurements stream. - PeriodicTriggerExecutor
- Executes a PeriodicTrigger.
- 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.triggerCondition.
- SamplingPackageRegistry
- A registry of SamplingPackage packages.
- SamplingState
-
SchedulableTriggerExecutor<
TConfig extends TriggerConfiguration> -
Abstract class for executors of triggers which can be scheduled
(i.e., implementing the
Schedulableinterface). - SensingUserTaskFactory
- A UserTaskFactory that can create a non-UI sensing task.
-
ServiceManager<
TDeviceConfiguration extends ServiceConfiguration< TRegistration> , TRegistration extends ServiceRegistration> - A DeviceManager for an onboard service, like a location service.
- SmartPhoneClientManager
-
The singleton
SmartPhoneClientManager()is the main entry point for CARP Mobile Sensing. - SmartphoneClientRepository
-
A
ClientRepositorythat runs on a smartphone. Works as a singleton. Uses the PersistenceService infrastructure to store study information persistently across app restarts. - SmartphoneDeploymentExecutor
- A SmartphoneDeploymentExecutor is responsible for executing a SmartphoneDeployment. For each task control in this deployment, it starts a TaskControlExecutor.
- SmartphoneDeploymentExecutorSamplingState
- SmartphoneDeviceManager
- A device manager for a smartphone.
- SmartphoneStudyController
- Controls the runtime execution of a SmartphoneStudy.
- SmartphoneTriggerFactory
- A TriggerFactory for all triggers coming with CAMS.
- StreamProbe
-
An abstract class used to create a probe that listen continuously to events
from the stream of
Measurementobjects. - StubProbe
- A simple no-op probe that does nothing.
- TaskControlExecutor
-
Responsible for handling the execution of a
TaskControl. - TaskControlExecutorSamplingState
-
TaskExecutor<
TConfig extends TaskConfiguration> -
The TaskExecutor is responsible for executing a
TaskConfiguration. For each measure in the task, it looks up an appropriate Probe to collect data. - TriggerEvent
- An event streamed from a TriggerExecutor when it triggers.
-
TriggerExecutor<
TConfig extends TriggerConfiguration> - Responsible for handling the execution of a trigger.
- TriggerFactory
-
A factory which can create a TriggerExecutor based on the runtime type
of an
TriggerConfiguration. - UserTask
- A task that the user of the app needs to attend to.
- UserTaskBufferItem
- UserTaskFactory
-
A factory which can create a UserTask based on the
typeof an AppTask. - UserTaskSnapshot
- A snapshot of a UserTask at any given time. Used for saving user tasks persistently across app restart.
- UserTaskTriggerExecutor
- Executes a UserTaskTrigger.
Enums
- ClientManagerState
- The possible states of the SmartPhoneClientManager.
- DeviceStatus
- Runtime status for a DeviceManager.
- ExecutorState
- The state of an Executor.
- UserTaskState
- The states of a UserTask.
Mixins
-
CronIterator<
E>