Skip to content

DataStreamReference

A reference to the data streams of one study deployment in CAWS.

Obtained from CarpDataStreamService.dataStream. append uses this reference's study deployment ID. The read methods use the deployment ID in the DataStreamId you pass in, without checking that it matches.

Inheritance

Properties

rpcEndpointUri

String get rpcEndpointUri
override

The URL for the data stream service endpoint.

{{PROTOCOL}}://{{SERVER_HOST}}:{{SERVER_PORT}}/api/data-stream-service

service

CarpDataStreamService get service
override
set service (CarpBaseService value)
inherited

The service this reference sends its requests through.

studyDeploymentId

String studyDeploymentId
getter/setter pair

The CARP study deployment ID.

Methods

append

Future<void> append(
  1. List<DataStreamBatch> batch, {
  2. bool compress = true,
})

Appends a batch of measurements to the data streams of this deployment. If compress is true, the data is compressed before upload.

get

Future<List<DataStreamBatch>> get(
  1. DataStreamId dataStream,
  2. int fromSequenceId, [
  3. int? toSequenceIdInclusive
])

Gets all data in dataStream with sequence numbers between fromSequenceId and toSequenceIdInclusive. If toSequenceIdInclusive is null, all data from fromSequenceId is returned.

getDataStreamBatchesByTime

Future<List<DataStreamBatch>> getDataStreamBatchesByTime(
  1. DataStreamId dataStream,
  2. DateTime from,
  3. DateTime to
)

Gets all data in dataStream whose local update time falls within the inclusive from-to window, as one DataStreamBatch per contiguous run of measurements.