Returns the last occurrence of a time period in a defined time range for a selected period store.

Message "GetLastHdTimePeriodOccurrenceRequest"

Structure

To copy the code to the clipboard click on the icon ->

GetLastHdTimePeriodOccurrenceRequest{

   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

Name of the time period store whose data is queried.

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

-

Query mode to determine whether the start and end time are included in the query time range or not, see Message "QueryMode".

6

filter

-

Filter for requested info fields, see Message "ColumnFilter".

Message "GetLastHdTimePeriodOccurrenceResponse"

Returns the TimePeriodData message with start and end time stamp in Unix time stamp format in microseconds for the last time period of the requested time period store.

A "0" is returned for time periods without a valid end time.

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

To copy the code to the clipboard click on the icon ->

GetLastHdTimePeriodOccurrenceResponse{

   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 zero.