Extensions.Measure.GetMeasurementTimestamp
Jump to navigation
Jump to search
Contents
Classification
| Name | GetMeasurementTimestamp |
| Short Description | Gets the timestamp of a measurement |
| Class | Term |
| Extension | OTX Measure extension |
| Group | Measurement related terms |
| Exceptions | InvalidMeasurementException |
| Checker Rules | - |
| Standard Compliant | Yes |
OTL Syntax
IntegerTerm Measure.GetMeasurementTimestamp(MeasurementTerm measurement);Description
This term gets the timestamp of a measurement, expressed in milliseconds elapsed since 1970-01-01 00:00:00 UTC. If no timestamp exists, the measurement is not valid and an exception will be thrown.
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
| Data Type | Description |
| Integer | The timestamp of a measurement. |
Properties
| Name | Data Type | Class | Default | Cardinality | Description |
| Measurement | Measurement | Term | - | [1] | Represents the measurement whose timestamp will be acquired. |
OTL Examples
/// Signatures
package Measure.DeviceSignature DeviceSignature1
{
Measure.DeviceServiceSignature DeviceServiceSignature1(in Integer a, out Measure.Measurement Measurement);
}
/// Global Declarations
public procedure main()
{
/// Local Declarations
Integer timestamp;
Measure.Measurement Measurement1;
Integer a = 12;
/// Flow
Measure.ExecuteDeviceService(DeviceSignature1, DeviceServiceSignature1, {a = a, Measurement = Measurement1}, false, false);
timestamp = Measure.GetMeasurementTimestamp(Measurement1);
}See also
GetMeasurementStatus
GetMeasurementQuantity
GetMeasurementFloatValue
IsValidMeasurement