Difference between revisions of "Extensions.Measure.GetMeasurementTimestamp"
Jump to navigation
Jump to search
| Line 1: | Line 1: | ||
{{DISPLAYTITLE:'''GetMeasurementTimestamp '''}}[[Category:Measure]] | {{DISPLAYTITLE:'''GetMeasurementTimestamp '''}}[[Category:Measure]] | ||
== Classification == | == Classification == | ||
| − | {{ClassificationActivity | GetMeasurementTimestamp | Gets the timestamp of a measurement | [[Term]] | [[Extensions.Measure|OTX Measure extension]] | [[Measurement related terms]] | [[ | + | {{ClassificationActivity | GetMeasurementTimestamp | Gets the timestamp of a measurement | [[Term]] | [[Extensions.Measure|OTX Measure extension]] | [[Extensions.Measure#Terms|Measurement related terms]] |[[Extensions.Measure.InvalidMeasurementException|InvalidMeasurementException]]| - }} |
== 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( | + | IntegerTerm = Measure.GetMeasurementTimestamp(MeasurementTerm); |
</syntaxhighlight> | </syntaxhighlight> | ||
== Description == | == Description == | ||
| − | This term gets the timestamp of a measurement in milliseconds elapsed since 1970-01-01 00:00:00 UTC. | + | 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. |
{{TermReturnValue| [[Core.DataTypes.SimpleDataType.Integer|Integer]] | The timestamp of a measurement. }} | {{TermReturnValue| [[Core.DataTypes.SimpleDataType.Integer|Integer]] | The timestamp of a measurement. }} | ||
| Line 16: | Line 16: | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
| − | {{TableRowPropertie1| Measurement | [[Extensions.Measure.Measurement|Measurement]] | [[Term]] | - | [1] | | + | {{TableRowPropertie1| Measurement | [[Extensions.Measure.Measurement|Measurement]] | [[Term]] | - | [1] | Represents the measurement whose timestamp shall be acquired.}} |
|} | |} | ||
== OTL Examples == | == OTL Examples == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
| − | package Measure.DeviceSignature | + | /// Signatures |
| + | |||
| + | package Measure.DeviceSignature DeviceSignature1 | ||
{ | { | ||
| − | + | Measure.DeviceServiceSignature DeviceServiceSignature1(in Integer a, out Measure.Measurement Measurement); | |
} | } | ||
| − | public procedure | + | /// 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); | |
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 06:33, 19 October 2018
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);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.
![]()
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