Difference between revisions of "Extensions.DiagCom.IsVariant"

From emotive
Jump to navigation Jump to search
Line 1: Line 1:
 
{{DISPLAYTITLE:OTX '''IsVariant'''}}[[Category:DiagCom]]
 
{{DISPLAYTITLE:OTX '''IsVariant'''}}[[Category:DiagCom]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | IsVariant | Tests the name of a control device variant for a communication channel | [[Term]] | [[Extensions.DiagCom|OTX DiagCom extension]] | [[ComChanel related terms]] | - | - }}
+
{{ClassificationActivity | IsVariant | Compares the name of the ECU variant associated with the communication channel | [[Term]] | [[Extensions.DiagCom|OTX DiagCom extension]] | [[Extensions.DiagCom#Terms|ComChanel related terms]] | - | - }}
  
 
== OTL Syntax ==
 
== OTL Syntax ==
Line 9: Line 9:
  
 
== Description ==
 
== Description ==
The '''IsVariant''' term tests whether the name of the specified control units version matches the version of the given communication channel, see [[Variant Identification]].
+
The '''IsVariant''' term is used to compare the name of the [[ECU]] variant associated with the communication channel with the given variant name. It accepts a communication channel handle as well as the name of the [[ECU]] variant in question. The result is '''true''' or '''false''' depending on whether the [[ECU]] variant name equals the [[Extensions.DiagCom.ComChannel|ComChannel]] identifier or not.
  
{{TermReturnValue| [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | Return true if the version matches, false otherwise.}}
+
{{TermReturnValue| [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | Return true if the [[ECU]] variant name equals the [[Extensions.DiagCom.ComChannel|ComChannel]] identifier, false otherwise.}}
  
 
== Properties ==
 
== Properties ==
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie1| ComChannel | [[Extensions.DiagCom.ComChannel|ComChannel]] | [[Term]] | - | [1] | Communication channel.}}
+
{{TableRowPropertie1| ComChannel | [[Extensions.DiagCom.ComChannel|ComChannel]] | [[Term]] | - | [1] | The '''ComChannelTerm''' represents the communication channel which shall be evaluated.}}
{{TableRowPropertie2| EcuVariant | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [1] | Name of the ECU variant.}}
+
{{TableRowPropertie2| EcuVariant | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [1] | The '''StringTerm''' specifies the ECU variant name to be compared with the ECU variant associated with the communication channel.}}
 
|}
 
|}
  
 
== 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;
String String1;
 
 
Boolean Boolean1 = false;
 
Boolean Boolean1 = false;
  
myComCannel = DiagCom.GetComChannel("LL_AllEmissRelatUDSSyste", null, false);
+
/// Flow
String1 = DiagCom.GetComChannelEcuVariantName(myComCannel);
+
 
Boolean1 = DiagCom.IsVariant(myComCannel, String1);
+
ComChannel1 = DiagCom.GetComChannel("LL_EnginContrModul1UDS", "", false);
 +
Boolean1 = DiagCom.IsVariant(ComChannel1, "EV_ECM30TFS021XSG1_001");
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Revision as of 10:28, 11 October 2018

Classification

Name IsVariant
Short Description Compares the name of the ECU variant associated with the communication channel
Class Term
Extension OTX DiagCom extension
Group ComChanel related terms
Exceptions -
Checker Rules -
Standard Compliant Yes

OTL Syntax

BooleanTerm = DiagCom.IsVariant(ComChannelTerm, StringTerm);

Description

The IsVariant term is used to compare the name of the ECU variant associated with the communication channel with the given variant name. It accepts a communication channel handle as well as the name of the ECU variant in question. The result is true or false depending on whether the ECU variant name equals the ComChannel identifier or not.

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 Return true if the ECU variant name equals the ComChannel identifier, false otherwise.

Properties

Name Data Type Class Default Cardinality Description
ComChannel ComChannel Term - [1] The ComChannelTerm represents the communication channel which shall be evaluated.
EcuVariant String Term - [1] The StringTerm specifies the ECU variant name to be compared with the ECU variant associated with the communication channel.

OTL Examples

DiagCom.ComChannel ComChannel1;
Boolean Boolean1 = false;

/// Flow

ComChannel1 = DiagCom.GetComChannel("LL_EnginContrModul1UDS", "", false);
Boolean1 = DiagCom.IsVariant(ComChannel1, "EV_ECM30TFS021XSG1_001");

See also

GetComChannelIdentifierFromResponse
GetComChannel
GetComChannelEcuVariantName