Difference between revisions of "Extensions.Measure.GetMeasurementTimestamp"

From emotive
Jump to navigation Jump to search
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;">
/// Local Declarations
+
IntegerTerm Measure.GetMeasurementTimestamp(MeasurementTerm measurement);
Integer IntegerVariable;
 
/// Flow
 
IntegerVariable = Measure.GetMeasurementTimestamp(MeasurementTerm);
 
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Revision as of 09:16, 7 November 2018

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 shall be thrown.

Return Value

The Term returns the value, see table below.

Icons Note.png 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 shall 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