RSDSampleRecord

public protocol RSDSampleRecord : Codable

The RSDSampleRecord defines the properties that are included with all JSON logging samples. By defining a protocol, the logger can include markers for step transitions and the records are defined as Codable but the actual CodingKey implementation can be changed to match the requirements of the research study.

  • The clock uptime. On Apple OS platforms, this is the time interval since the computer clock was rolled or started.

    This is included to allow the results from different files to be cross-referenced (for a given run of a task) using a shared time stamp.

    Seealso

    ProcessInfo.processInfo.systemUptime.

    Declaration

    Swift

    var uptime: TimeInterval
  • An identifier marking the current step.

    This is a path marker where the path components are separated by a ‘/’ character. This path includes the task identifier and any sections or subtasks for the full path to the current step.

    Declaration

    Swift

    var stepPath: String
  • The date timestamp when the measurement was taken (if available). This should be included for the first entry to mark the start of the recording. Other than to mark step changes, the timestampDate is optional and should only be included if required by the research study.

    Declaration

    Swift

    var timestampDate: Date?
  • Relative time to when the recorder was started. This is included for compatibility to existing research studies that expect the timestamp to be a time interval since the start of the recording.

    Declaration

    Swift

    var timestamp: TimeInterval?