DeviceRegistration
Identifies the physical device that fills a DeviceConfiguration role in a deployment.
A registration is sent to the DeploymentService with registerDevice when a device joins a study deployment. Treat this as an abstract base class. If a simple device registration is needed, use a DefaultDeviceRegistration.
- Inheritance
-
- Object
- Serializable
- DeviceRegistration
- Implementers
- Annotations
-
- @JsonSerializable(includeIfNull: false, explicitToJson: true)
Constructors
DeviceRegistration.fromJson
DeviceRegistration
Properties
deviceDisplayName
An optional concise textual representation for display purposes describing the key specifications of the device. E.g., device manufacturer, name, and operating system version.
deviceId
An ID for the device, used to disambiguate between devices of the same type, as provided by the device itself. It is up to specific types of devices to guarantee uniqueness across all devices of the same type. A random UUID (v4) if not specified.
fromJsonFunction
The function which can convert a JSON string to an object of this type.
jsonType
Return the __type to be used for JSON serialization of this class. Default is runtimeType. Only specify this if you need another type.
registrationCreatedOn
The registration time in UTC. Defaults to the time of creation.
Methods
toJson
Return a JSON encoding of this object.
toString
A string representation of this object.
Some classes have a default textual representation, often paired with a static parse function (like int.parse). These classes will provide the textual representation as their string representation.
Other classes have no meaningful textual representation that a program will care about. Such classes will typically override toString to provide useful information when inspecting the object, mainly for debugging or logging.