Difference between revisions of "Extensions.DiagCom.GetComParameterValueAsBoolean"

From emotive
Jump to navigation Jump to search
Line 1: Line 1:
 
{{DISPLAYTITLE:OTX '''GetComParameterValueAsBoolean'''}}[[Category:DiagCom]]
 
{{DISPLAYTITLE:OTX '''GetComParameterValueAsBoolean'''}}[[Category:DiagCom]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | GetComParameterValueAsBoolean | The current value of a [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] communication parameter | [[Term]] | [[Extensions.DiagCom|OTX DiagCom extension]] | [[ComParam related terms]] | [[Core.Actions.Throw.Exception.UnknownTargetException|UnknownTargetException]] <br/> [[Core.Actions.Throw.Exception.TypeMismatchException|TypeMismatchException]] | - }}
+
{{ClassificationActivity | GetComParameterValueAsBoolean | Gets the current value of a [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] communication parameter | [[Term]] | [[Extensions.DiagCom|OTX DiagCom extension]] | [[Extensions.DiagCom#Terms|ComParam related terms]] | [[Extensions.DiagCom.UnknownTargetException|UnknownTargetException]] <br/> [[Core.DataTypes.ComplexDataType.TypeMismatchException|TypeMismatchException]] | - }}
  
 
== OTL Syntax ==
 
== OTL Syntax ==
Line 9: Line 9:
  
 
== Description ==
 
== Description ==
The '''GetComParameterValueAsBoolean''' term return the current value of a [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] communication parameter.
+
The '''GetComParameterValueAsBoolean''' term comprises the '''ChannelAndParameterName''' attribute group and shall return the current value of a [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] communication parameter. If the communication parameter has not been previously modified by the [[Extensions.DiagCom.SetComParameter|SetComParameter]] action, the default parameter value shall be returned.
  
 
{{TermReturnValue| [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | The current value of a [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] communication parameter.}}
 
{{TermReturnValue| [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | The current value of a [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] communication parameter.}}
Line 16: Line 16:
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie1| ComChannel | [[Extensions.DiagCom.ComChannel|ComChannel]] | [[Term]] | - | [1] | Communication channel.}}
+
{{TableRowPropertie1| ComChannel | [[Extensions.DiagCom.ComChannel|ComChannel]] | [[Term]] | - | [1] | The '''ComChannelTerm''' specifies the '''ComChannel''' which shall be queried.}}
{{TableRowPropertie2| ComParameterName | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [1] | Name of communication channel.}}
+
{{TableRowPropertie2| ComParameterName | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [1] | The '''otx:StringTerm''' specifies the name of a communication parameter.}}
 
|}
 
|}
  
 
== OTL Examples ==
 
== OTL Examples ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
DiagCom.ComChannel myComCannel;
+
DiagCom.ComChannel ComChannel1;
DiagCom.DiagService DiagService1;
+
Exception Handle1;
 
Boolean Boolean1 = false;
 
Boolean Boolean1 = false;
  
myComCannel = DiagCom.GetComChannel("LL_AirbaUDS", null, false);
+
/// Flow
DiagService1 = DiagCom.CreateDiagServiceByName(myComCannel, "DiagnServi_ReadDataByIdentBasicSettiStatu");
+
 
Boolean1 = DiagCom.GetComParameterValueAsBoolean(myComCannel, "CP_CanTransmissionTime");
+
try
 +
{
 +
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);
 +
Boolean1 = DiagCom.GetComParameterValueAsBoolean(ComChannel1, "CP_CanTransmissionTime");
 +
}
 +
catch (TypeMismatchException Handle1)
 +
{
 +
}
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== See also ==
 
== See also ==
[[Extensions.DiagCom.GetComParameterValueAsBoolean|GetComParameterValueAsBoolean]] <br/>
+
[[Extensions.DiagCom.GetComChannel|GetComChannel]] <br/>
 +
[[Extensions.DiagCom.CreateDiagServiceByName|CreateDiagServiceByName]] <br/>
 +
[[Extensions.DiagCom.ExecuteDiagService|ExecuteDiagService]] <br/>
 +
[[Extensions.DiagCom.GetComplexComParameter|GetComplexComParameter]] <br/>
 +
[[Extensions.DiagCom.SetComplexComParameter|SetComplexComParameter]] <br/>
 
[[Extensions.DiagCom.GetComParameterValueAsString|GetComParameterValueAsString]] <br/>
 
[[Extensions.DiagCom.GetComParameterValueAsString|GetComParameterValueAsString]] <br/>
 
[[Extensions.DiagCom.GetComParameterValueAsInteger|GetComParameterValueAsInteger]] <br/>
 
[[Extensions.DiagCom.GetComParameterValueAsInteger|GetComParameterValueAsInteger]] <br/>

Revision as of 10:42, 15 October 2018

Classification

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

OTL Syntax

BooleanTerm = DiagCom.GetComParameterValueAsBoolean(ComChannelTerm, StringTerm);

Description

The GetComParameterValueAsBoolean term comprises the ChannelAndParameterName attribute group and shall return the current value of a Boolean 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
Boolean The current value of a Boolean 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

DiagCom.ComChannel ComChannel1;
Exception Handle1;
Boolean Boolean1 = false;

/// Flow

try
{
	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);
	Boolean1 = DiagCom.GetComParameterValueAsBoolean(ComChannel1, "CP_CanTransmissionTime");
}
catch (TypeMismatchException Handle1)
{			
}

See also

GetComChannel
CreateDiagServiceByName
ExecuteDiagService
GetComplexComParameter
SetComplexComParameter
GetComParameterValueAsString
GetComParameterValueAsInteger
GetComParameterValueAsFloat
GetComParameterValueAsByteField
GetComParameterValueAsQuantity