Meta Protocol¶
Package: drift.proto.meta
Additionally to data, Drift Package can contain a message with meta information, which describers the data in DataPayload . For example, if we send a DataPayload with time-series inside, we can send information about the full size of the signal, time period etc.
The meta information describes the following data types:
- Time Series
- Images
- Scalar Values (deprecated)
- Text
- Aligned Data
- Typed Data
MetaInfo¶
Top-level descriptor which has type of data in Drift Package and a type specific descriptor.
Name | Type | Description |
---|---|---|
type | DataType | Enumeration (TIME_SERIES=0, IMAGE=1, SCALAR_VALUES=2, TEXT=3, ALIGNED_PACKAGE=4, TYPED_DATA=5) |
One of filed below: | oneof | |
timeseries_info | TimeSeriesInfo | |
image_info | ImageInfo | |
scalar_info | ScalarValuesInfo | |
text_info | TextInfo | |
alignment_info | AlignmentInfo | |
typed_data_info | TypedDataInfo | |
wavelet_buffer_info | WaveletBufferInfo | Information about wavelet transformation and compression if used |
TimeSeriesInfo¶
TimeSeriesInfo describes time series data inside DriftPackage, which is sent as DataPayload with a serialized WaveletBuffer.
Name | Type | Description |
---|---|---|
start_timestamp | Timestamp | Timestamp of the first point in the series |
stop_timestamp | Timestamp | Timestamp of the last point in the series |
size | uint64 | Full size of the signal (all DataPayloads together) |
first | float | First value in series |
last | float | Last value in series |
min | float | Min value in series |
max | float | Max value in series |
mean | float | Mean value |
ImageInfo¶
TimeSeriesInfo describes a serialized image inside DriftPackage. It may content either WaveletBuffer (WB) or JPEG string.
Name | Type | Description |
---|---|---|
type | Type | Enumeration (WB=0, JPEG=1) |
width | uint64 | Width of the image |
height | uint64 | Height of the image |
channel_layout | string | “RGB”, “HSLGGG” - one HSL image and 3 gray images |
ScalarValuesInfo¶
ScalarValuesInfo describes scalar values inside DriftPackage which is sent as a WaveletBuffer without any decomposition. This type of data is used when we have some samples as intentioned parameters from a data source.
DEPRECATED: use TypedDataInfo instead.
Name | Type | Description |
---|---|---|
variables | ValueInfo[] | Description for each scalar value in WaveletBuffer |
ValueInfo | ||
name | string | Name of variable |
status | StatusCode | Status of variable |
TextInfo¶
ScalarValuesInfo describes a text data like JSON, XML etc.
Name | Type | Description |
---|---|---|
mime_type | string | Format of data, e.g. “text/plain”, “text/json;charset=UTF-8” |
AlignmentInfo¶
AlignmentInfo describes a special case, when we send a few Drift packages with the same ID but from different MQTT topics.
Name | Type | Description |
---|---|---|
packages | PackageInfo[] | Description for each aligned package value in DataPayload |
PackageInfo | ||
topic | string | Name of source topic |
meta | MetaInfo | Meta information for the package |
TypedDataInfo¶
TypedDataInfo describes how to parse a binary data inside DataPayload when the data has values of different types (not only float). It uses DriftBytes as a serialization format.
Name | Type | Description |
---|---|---|
items | Item[] | Description for each item in DataPayload |
Item | ||
name | string | Name of item |
status | Status | Status of item |
WaveletBufferInfo¶
WaveletBufferInfo describes a wavelet transformation and compression parameters if they were applied to the data.
Name | Type | Description |
---|---|---|
abi_version | uint32 | ABI version of the WaveletBuffer library |
wavelet_type | uint32 | Wavelet type 0-no wavelet transformation, 1-DB1, 2-DB2 etc. |
decomposition_steps | uint32 | Number of decomposition steps applied to the data |
float_compression | uint32 | Float compression level applied to the data, 0 - no compression, 1-float is 2bit, 2-float is 3bit etc. |
no_denoising | NoDenoising | If initialized, no denoising was applied to the data. |
threshold_denoising | ThresholdDenoising | If initialized, threshold denoising was applied to the data. |
partial_denoising | PartialDenoising | If initialized, partial denoising was applied to the data. |
NoDenoising¶
No denoising was applied to the data.
Name | Type | Description |
---|---|---|
ThresholdDenoising¶
A denoising method that uses a threshold to remove small coefficients. The threshold is calculated as a linear function a*x+b, where x is the step of decomposition.
Name | Type | Description |
---|---|---|
a | float | float |
b | float | float |
PartialDenoising¶
A denoising method that removes a part of coefficients
Name | Type | Description |
---|---|---|
partial | float | part of coefficients to remove 1.0 - all, 0.0 - none |