Skip to content

CamsDeviceRegistration

Base class for CAMS device registrations.

A device registration holds the details of a concrete device once it is registered for a deployment, e.g. its id and name. It is created by DeviceManager.createRegistration and stored in the deployment.

Inheritance
Implementers

Constructors

CamsDeviceRegistration

CamsDeviceRegistration({
  1. String? deviceId,
  2. String? deviceDisplayName,
  3. DateTime? registrationCreatedOn,
  4. bool isConnected = false,
})

Properties

isConnected

bool isConnected
getter/setter pair

Indicates whether this device was connected when registered.

Note that a device may be registered when it is not yet connected, e.g., when the device is configured as part of a study deployment, but not yet connected. In this case, the device registration information can be used for connecting the device later on, e.g., when the device is re-connected or when the app is restarted.

jsonType

String get jsonType
override

Return the __type to be used for JSON serialization of this class. Default is runtimeType. Only specify this if you need another type.

Methods

toDefaultDeviceRegistration

DefaultDeviceRegistration toDefaultDeviceRegistration()

Convert this CamsDeviceRegistration to a DefaultDeviceRegistration with the same base properties.

This is needed for registering the device in the DeploymentService due to issue #561 - right now CAWS only can process a DefaultDeviceRegistration.