Skip to content

DataPointHeader

The header (meta-data) attached to all DataPoints, like study, user, time span and data format.

Annotations
  • @JsonSerializable(fieldRename: FieldRename.snake, includeIfNull: false, explicitToJson: true)

Constructors

DataPointHeader.fromJson

DataPointHeader.fromJson(
  1. Map<String, dynamic> json
)

Create a DataPointHeader from a JSON map.

DataPointHeader

DataPointHeader({
  1. String? studyId,
  2. String? userId,
  3. DataType? dataFormat,
  4. String? deviceRoleName,
  5. String? triggerId,
  6. DateTime? startTime,
  7. DateTime? endTime,
})

Create a new DataPointHeader.

Properties

dataFormat

DataType? dataFormat
getter/setter pair

The data format. See DataType and NameSpace.

deviceRoleName

String? deviceRoleName
getter/setter pair

The role of the device that collected this data point.

endTime

DateTime? endTime
getter/setter pair

The UTC end timestamp for this data point. If this data point does not cover a period, endTime will be null.

startTime

DateTime? startTime
getter/setter pair

The UTC start timestamp for this data point.

studyId

String? studyId
getter/setter pair

An ID of this study.

CAWS expects the study deployment ID of the StudyDeployment from which this data point was generated.

triggerId

String? triggerId
getter/setter pair

The id of the trigger in the study deployment that generated this data point.

uploadTime

DateTime? uploadTime
getter/setter pair

The UTC time stamp of when this data point was uploaded to the server. Set by the server.

userId

String? userId
getter/setter pair

The ID of the user (if known).

Methods

toJson

Map<String, dynamic> toJson()

Return a JSON encoding of this object.