Difference between revisions of "Extensions.DiagCom.GetComParameterValueAsInteger"

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;">
IntegerTerm = DiagCom.GetComParameterValueAsInteger(ComChannelTerm, StringTerm);
+
/// Local Declarations
 +
Integer IntegerVariable;
 +
/// Flow
 +
IntegerVariable = DiagCom.GetComParameterValueAsInteger(ComChannelTerm, StringTerm);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 22: Line 25:
 
== OTL Examples ==
 
== OTL Examples ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 +
/// Local Declarations
 +
 
DiagCom.ComChannel ComChannel1;
 
DiagCom.ComChannel ComChannel1;
 
Integer Integer1;
 
Integer Integer1;

Revision as of 11:00, 23 October 2018

Classification

Name GetComParameterValueAsInteger
Short Description Gets the current value of a Integer communication parameter
Class Term
Extension OTX DiagCom extension
Group ComParam related terms
Exceptions UnknownTargetException
TypeMismatchException
Checker Rules -
Standard Compliant Yes

OTL Syntax

/// Local Declarations
Integer IntegerVariable;
/// Flow
IntegerVariable = DiagCom.GetComParameterValueAsInteger(ComChannelTerm, StringTerm);

Description

The GetComParameterValueAsInteger term comprises the ChannelAndParameterName attribute group and shall return the current value of an integer type communication parameter. If the communication parameter has not been previously modified by the SetComParameter action, the default parameter value shall be returned.

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 current value of a Integer communication parameter.

Properties

Name Data Type Class Default Cardinality Description
ComChannel ComChannel Term - [1] The ComChannelTerm specifies the ComChannel which shall be queried.
ComParameterName String Term - [1] The otx:StringTerm specifies the name of a communication parameter.

OTL Examples

/// Local Declarations

DiagCom.ComChannel ComChannel1;
Integer Integer1;

/// Flow

ComChannel1 = DiagCom.GetComChannel("LL_CentrElectUDS", "EV_BCMCONTI_009", false);
[#MetaData(RequestPdu), <#Data>22 01 00</#Data>]
DiagCom.ExecuteDiagService(DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_ReadDataByIdentActuaTestStatu"), {}, {}, NULL, NULL, false, false);
Integer1 = DiagCom.GetComParameterValueAsInteger(ComChannel1, "CP_RC21CompletionTimeout");

See also

GetComChannel
CreateDiagServiceByName
ExecuteDiagService
GetComplexComParameter
SetComplexComParameter
GetComParameterValueAsBoolean
GetComParameterValueAsString
GetComParameterValueAsFloat
GetComParameterValueAsByteField
GetComParameterValueAsQuantity