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:
- dataTypes - the data types (measure types) it supports.
- samplingSchemes - the default
SamplingConfigurationof each data type. - deviceType and deviceManager - the device it collects data from.
- create - a factory for Probes.
// 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
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 thattypeshould be one of the dataTypes that this package supports. Returns null if a probe cannot be created for thetype. -
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