Difference between revisions of "Extensions.Quantities.GetDisplayValue"

From emotive
Jump to navigation Jump to search
 
(7 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Category:Quantities]]
+
{{DISPLAYTITLE:'''GetDisplayValue '''}}[[Category:Quantities]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | GetDisplayValue | Floating point numeric value | [[Term]] | [[Quantities|OTX Quantities extension]] | [[Quantity and Unit related terms]] | - | - }}
+
{{ClassificationActivity | GetDisplayValue | Floating point numeric value | [[Term]] | [[Extensions.Quantities|OTX Quantities extension]] | [[Extensions.Quantities#Terms|Quantity and Unit related terms]] | - | - }}
  
 
== OTL Syntax ==
 
== OTL Syntax ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
FloatTerm = Quantities.GetDisplayValue(QuantityTerm);
+
FloatTerm Quantities.GetDisplayValue(QuantityTerm quantity);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== Description ==
 
== Description ==
The '''GetDisplayValue''' term which as a result of the non-dimensional value of a numeric variable ('''NumericQuantity''') as float returns (float).
+
The '''GetDisplayValue''' term will return the (dimensionless) '''Float''' value of a '''Quantity''' according to the '''Quantity''''s display unit.
  
{{TermReturnValue| [[Float]] | The (dimensionless) float value a NumericQuantity.}}
+
{{TermReturnValue| [[Core.DataTypes.SimpleDataType.Float|Float]] | The (dimensionless) float value of a '''Quantity'''.}}
  
 
== Properties ==
 
== Properties ==
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie1| Quantity | [[Quantity]] | [[Term]] | - | [1] | The NumericQuantity, from which the float value to be extracted}}
+
{{TableRowPropertie2| Quantity | [[Extensions.Quantities.Quantity|Quantity]] | [[Term]] | - | [1] | Represents the '''Quantity''' from which the numeral value will be extracted.}}
 
|}
 
|}
  
 
== OTL Examples ==
 
== OTL Examples ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
Quantities.Quantity Quantity1 = 0 [@Unit, "ODX_RS_UNIT_LIB.odx", "%/ms"];
+
/// Local Declarations
 +
 
 +
Quantities.Quantity Quantity = 12.44 [@Unit, "BL_DataLibraMIB.odx", "km/h"];
 
Float Float1;
 
Float Float1;
  
Float1 = Quantities.GetDisplayValue(Quantity1);
+
/// Flow
 +
 
 +
Float1 = Quantities.GetDisplayValue(Quantity);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== See also ==
 
== See also ==
[[CreateQuantity]] <br/>
+
 
[[GetDisplayUnit]] <br/>
+
[[Extensions.Quantities.CreateQuantity|CreateQuantity]] <br/>
[[GetBaseUnit]]
+
[[Extensions.Quantities.GetDisplayUnit|GetDisplayUnit]] <br/>
 +
[[Extensions.Quantities.GetBaseUnit|GetBaseUnit]]

Latest revision as of 03:11, 13 September 2019

Classification

Name GetDisplayValue
Short Description Floating point numeric value
Class Term
Extension OTX Quantities extension
Group Quantity and Unit related terms
Exceptions -
Checker Rules -
Standard Compliant Yes

OTL Syntax

FloatTerm Quantities.GetDisplayValue(QuantityTerm quantity);

Description

The GetDisplayValue term will return the (dimensionless) Float value of a Quantity according to the Quantity's display unit.

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
Float The (dimensionless) float value of a Quantity.

Properties

Name Data Type Class Default Cardinality Description
Quantity Quantity Term - [1] Represents the Quantity from which the numeral value will be extracted.

OTL Examples

/// Local Declarations

Quantities.Quantity Quantity = 12.44 [@Unit, "BL_DataLibraMIB.odx", "km/h"];
Float Float1;

/// Flow

Float1 = Quantities.GetDisplayValue(Quantity);

See also

CreateQuantity
GetDisplayUnit
GetBaseUnit