Skip to content

CamsDataTypeMetaData

CAMS metadata about a data type: how it is collected and which permissions it needs.

Extends the carp_core DataTypeMetaData (type, displayName, and timeType) with the dataEventType and the runtime permissions. Sampling packages use it in their DataTypeSamplingSchemes, and CAMS asks for the permissions before a Probe starts.

Inheritance

Constructors

CamsDataTypeMetaData.fromDataTypeMetaData

CamsDataTypeMetaData.fromDataTypeMetaData({
  1. required DataTypeMetaData dataTypeMetaData,
  2. DataEventType dataEventType = DataEventType.EVENT,
  3. List<Permission> permissions = const [],
})

Creates a new description of a data type based on dataTypeMetaData.

Default dataEventType is DataEventType.EVENT, and default permissions is empty (no permissions required).

CamsDataTypeMetaData

CamsDataTypeMetaData({
  1. required String type,
  2. String displayName = '',
  3. DataTimeType timeType = DataTimeType.POINT,
  4. DataEventType dataEventType = DataEventType.EVENT,
  5. List<Permission> permissions = const [],
})

Creates a new description of a data type with some displayName.

Default timeType is DataTimeType.POINT, default dataEventType is DataEventType.EVENT, and default permissions is empty (no permissions required).

Properties

dataEventType

DataEventType dataEventType
getter/setter pair

How a data type is collected (one-time or event-based).

permissions

List<Permission> get permissions
set permissions (List<Permission> permissions)

The list of permissions that are required for this data type.

Note that this is the list of permissions needed for the probe collecting this data type. It should not include permission to access a device itself, such as Bluetooth permissions. Such permissions should be handled on the app level.

See PermissionGroup for a list of possible permissions.

For Android permission in the Manifest.xml file, see Manifest.permission

Declare the Android group; on iOS the Android-only groups are returned as their iOS counterpart (Permission.activityRecognition -> Permission.sensors, Permission.bluetoothScan -> Permission.bluetooth).