Returns a streaming response of the available time periods in a specific time range and a time period store. The info fields returned in the response can be filtered.
Message "GetHdTimePeriodDataRequest"
Structure
GetHdTimePeriodDataRequest{
QueryMode{…}
ColumnFilter{…}
}
Parameter
|
Pos. |
Parameter |
Data type |
Meaning |
|---|---|---|---|
|
1 |
hd_store_name |
string |
Unique name of the time-based HD store, which is the parent store for the time period store. |
|
2 |
time_period_store_name |
string |
Unique name of the time period of interest. |
|
3 |
time_range_from |
int64 |
Start time of the requested time range in Unix time stamp format in microseconds. |
|
4 |
time_range_to |
int64 |
End time of the requested time range in Unix time stamp format in microseconds. |
|
5 |
query_mode |
- |
The mode determines whether or not the start and end times are included in the query time range, see Message "QueryMode". By default, all values are incorrect and no sort order is applied. |
|
6 |
filter |
- |
Filter for requested info fields, see Message "ColumnFilter". No filter is applied by default. |
|
7 |
max_sample_count_per_message |
int64 |
Specifies how many time periods are to be sent in a single message before a new message is started (chunk streaming). |
|
8 |
limit |
int64 |
Specifies the maximum number of time periods that can be sent in total. You can use the order_by field to determine which time periods are skipped if more time periods are available. |
Message "GetHdTimePeriodDataResponse"
Returns the list of time period entries with start and end time in Unix time stamp format in microseconds. A TimePeriodData message with the following parameters is returned for each time period.
All default values of the info fields are added by default. The user-defined info fields filtered by Info_field_names are added and sorted by variable type.
Structure
GetHdTimePeriodDataResponse{
TimePeriodData{
NumericField{…}
Int32Field{…}
Int64Field{…}
TextField{…}
DigitalField{…}
}
}
Parameter
|
Pos. |
Parameter |
Data type |
Meaning |
|---|---|---|---|
|
1 |
id |
int64 |
Unique ID of the time period |
|
2 |
start_time |
int64 |
Unix time stamp for the start time of the time period in microseconds. |
|
3 |
end_time |
int64 |
Unix time stamp for the endtime of the time period in microseconds. A "0" is returned for time periods without a valid end time. |
|
4 |
name |
string |
Name of the time period entry |
|
5 |
start_trigger |
double |
Absolute time in seconds in relation to the start time |
|
6 |
stop_trigger |
double |
Absolute time in seconds at which the start time occurred in relation to the start time. The value is 0.0 if no stop trigger has occurred. |
|
7 |
comment |
string |
Comment |
|
8 |
metadata_id |
int32 |
ID of the metadata group used for this time period |
|
9 |
double_fields |
- |
Info fields of type "double", see Message "NumericField". |
|
10 |
int32_fields |
- |
Info fields of type "int32", see Message "Int32Field". |
|
11 |
int64_fields |
- |
Info fields of type "int64", see Message "Int64Field". |
|
12 |
text_fields |
- |
Text info fields, see Message "TextField". |
|
13 |
digital_fields |
- |
Info fields of type "bool", see Message "DigitalField". |
|
14 |
autoClosed |
bool |
True if the time period reaches the maximum time period duration before the stop trigger and was closed automatically |
|
15 |
dataMissing |
bool |
True if data is missing within the time period, e.g. if data recording was interrupted |
Message "QueryMode"
|
Pos. |
Parameter |
Data type |
Meaning |
|---|---|---|---|
|
1 |
is_start_time_in_time_range |
bool |
Determines whether the start time of the time periods should be included in the query or whether the start time is before the queried time range |
|
2 |
is_end_time_in_time_range |
bool |
Determines whether the end time of the time periods should be included in the query or whether the end time can be later than the end of the queried time range |
|
3 |
include_open |
bool |
Indication of whether non-completed time periods are included in the result or whether only completed time periods with start and end times are used |
|
4 |
column_filter_active |
bool |
Activate or deactivate column filter |
|
5 |
order_by |
enum (OrderByType) |
Sort results by start time in ascending or descending order |
Message "ColumnFilter"
|
Pos. |
Parameter |
Data type |
Meaning |
|---|---|---|---|
|
1 |
info_field_names |
string |
Only the info fields that are specified as filters are queried. You can request the complete list of available field names with GetHdTimePeriodStoreSchema(), see GetHdTimePeriodStoreSchema(). |
Message "NumericField"
|
Pos. |
Parameter |
Data type |
Meaning |
|---|---|---|---|
|
1 |
name |
string |
Name of the field |
|
2 |
value |
double |
Value of the field |
|
3 |
isData |
bool |
Is TRUE if the current value is either true or false, and is FALSE if the current value is null. |
Message "Int32Field"
|
Pos. |
Parameter |
Data type |
Meaning |
|---|---|---|---|
|
1 |
name |
string |
Name of the field |
|
2 |
value |
int32 |
Value of the field |
|
3 |
isData |
bool |
Is TRUE if the current value is either true or false, and is FALSE if the current value is null. |
Message "Int64Field"
|
Pos. |
Parameter |
Data type |
Meaning |
|---|---|---|---|
|
1 |
name |
string |
Name of the field |
|
2 |
value |
int64 |
Value of the field |
|
3 |
isData |
bool |
Is TRUE if the current value is either true or false, and is FALSE if the current value is null. |
Message "TextField"
|
Pos. |
Parameter |
Data type |
Meaning |
|---|---|---|---|
|
1 |
name |
string |
Name of the field |
|
2 |
value |
double |
Value of the field |
|
3 |
isData |
bool |
Is TRUE if the current value is either true or false, and is FALSE if the current value is null. |
Message "DigitalField"
|
Pos. |
Parameter |
Data type |
Meaning |
|---|---|---|---|
|
1 |
name |
string |
Name of the field |
|
2 |
value |
bool |
Value of the field |
|
3 |
isData |
bool |
Is TRUE if the current value is either true or false, and is FALSE if the current value is null. |
Enum "OrderByType"
The following values are available for OrderByType.
|
Value |
Meaning |
|
|---|---|---|
|
0 |
ORDER_BY_TYPE_UNSPECIFIED |
Not specified |
|
1 |
ORDER_BY_TYPE_DESCENDING |
Descending order |
|
2 |
ORDER_BY_TYPE_ASCENDING |
Ascending order |