MeasurementBufferDatabase¶
Description¶
The MeasurementBufferDatabase object is a helper class to buffer Measurement objects in a local database whenever a remote measurement storage client (such as a Cloud of Things client or MQTT measurement writer) is offline or not connected.
This object was introduced in InCore 2.5.
› Inherits: | DatabaseMeasurementWriter |
---|
Properties¶
bufferDrainChunkSize¶
This property holds how many buffered measurements are sent at once whenever the remote resource is online again. The lowest allowed value is 1
.
› Type: | SignedInteger |
---|---|
› Default: | 1 |
› Signal: | bufferDrainChunkSizeChanged() |
› Attributes: | Writable |
bufferDrainInterval¶
This property holds the send interval in which buffered measurements are sent whenever the remote resource is online again. The lowest allowed value is 100
.
› Type: | SignedInteger |
---|---|
› Default: | 2000 |
› Signal: | bufferDrainIntervalChanged() |
› Attributes: | Writable |
bufferSize¶
This property holds the number of Measurement objects which can be buffered at most. If this limit is reached, the oldest measurement will be removed. Setting to 0
disables buffering.
› Type: | SignedInteger |
---|---|
› Default: | 100000 |
› Signal: | bufferSizeChanged() |
› Attributes: | Writable |
buffering¶
This property holds whether measurements should be buffered in the local database whenever the remote resource is offline or not connected. Once the remote resource is online again, buffered measurements are sent at a writer-specific interval.
› Type: | Boolean |
---|---|
› Default: | true |
› Signal: | bufferingChanged() |
› Attributes: | Writable |
transmitOrder¶
This property holds the order in which the Measurement objects are sent whenever a connection is restored.
› Type: | MeasurementBufferDatabase.TransmitOrder |
---|---|
› Default: | MeasurementBufferDatabase.Descending |
› Signal: | transmitOrderChanged() |
› Attributes: | Writable |
Enumerations¶
TransmitOrder¶
This enumeration describes the order in which buffered Measurement objects are sent whenever a connection is restored.
Name | Value | Description |
---|---|---|
MeasurementBufferDatabase.Ascending |
0 |
Send measurements in ascending order - oldest first. |
MeasurementBufferDatabase.Descending |
1 |
Send measurements in descending order - latest first. |