SamplingPackage class abstract

A plug-in that adds a set of measure types, and the probes that collect them, to CAMS.

Each sampling package covers one type of device (the phone, a wearable, a service) and is registered in the SamplingPackageRegistry at app start. When a study runs, CAMS asks the package that supports a Measure type to create a Probe for it.

A sampling package provides:

// Register a sampling package before using its measures in a protocol.
SamplingPackageRegistry().register(ContextSamplingPackage());

See also SmartphoneSamplingPackage, the base for packages that collect data from the phone itself.

Implementers

Constructors

SamplingPackage()

Properties

dataTypes → List<DataTypeMetaData>
The data types this package supports.
no setter
deviceManager → DeviceManager<DeviceConfiguration<DeviceRegistration>, DeviceRegistration>
Get the DeviceManager for the device used by this package.
no setter
deviceType → String
The type of device this package collects data from.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
samplingSchemes → DataTypeSamplingSchemeMap
The default sampling schemes for all dataTypes in this package.
no setter

Methods

create(String type) → Probe?
Creates a new Probe of the specified type. Note that type should be one of the dataTypes that this package supports. Returns null if a probe cannot be created for the type.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onRegister() → void
Called when this package is registered in the SamplingPackageRegistry.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited