Difference between revisions of "Extensions.Measure.GetMeasurementTimestamp"
Jump to navigation
Jump to search
| (One intermediate revision by one other user not shown) | |||
| Line 5: | Line 5: | ||
== OTL Syntax == | == OTL Syntax == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
| − | + | IntegerTerm Measure.GetMeasurementTimestamp(MeasurementTerm measurement); | |
| − | |||
| − | |||
| − | |||
</syntaxhighlight> | </syntaxhighlight> | ||
== Description == | == 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 | + | 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. |
{{TermReturnValue| [[Core.DataTypes.SimpleDataType.Integer|Integer]] | The timestamp of a measurement. }} | {{TermReturnValue| [[Core.DataTypes.SimpleDataType.Integer|Integer]] | The timestamp of a measurement. }} | ||
| Line 19: | Line 16: | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
| − | {{TableRowPropertie2| Measurement | [[Extensions.Measure.Measurement|Measurement]] | [[Term]] | - | [1] | Represents the measurement whose timestamp | + | {{TableRowPropertie2| Measurement | [[Extensions.Measure.Measurement|Measurement]] | [[Term]] | - | [1] | Represents the measurement whose timestamp will be acquired.}} |
|} | |} | ||
Latest revision as of 02:51, 13 September 2019
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