Difference between revisions of "Extensions.DiagCom.GetComChannel"

From emotive
Jump to navigation Jump to search
Line 1: Line 1:
[[Category:DiagCom]]
+
{{DISPLAYTITLE:OTX '''GetComChannel'''}}[[Category:DiagCom]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | GetComChannel | Represents a connection to the control unit at runtime | [[Term]] | [[DiagCom|OTX DiagCom extension]] | [[ComChanel related terms]] | [[UnknownTargetException]] <br/> [[LossOfComException]] | - }}
+
{{ClassificationActivity | GetComChannel | Represents a connection to the control unit at runtime | [[Term]] | [[Extensions.DiagCom|OTX DiagCom extension]] | [[ComChanel related terms]] | [[Extensions.DiagCom.UnknownTargetException|UnknownTargetException]] <br/> [[Extensions.DiagCom.LossOfComException|LossOfComException]] | - }}
  
 
== OTL Syntax ==
 
== OTL Syntax ==
Line 12: Line 12:
  
 
To create a connection to the ECU, the following rules are applied:
 
To create a connection to the ECU, the following rules are applied:
* The [[ComChannel]] is created when this term was called
+
* The [[Extensions.DiagCom.ComChannel|ComChannel]] is created when this term was called
* If the [[ComChannel]] has been already created, it is used and it is carried out, no further action.
+
* If the [[Extensions.DiagCom.ComChannel|ComChannel]] has been already created, it is used and it is carried out, no further action.
  
It is possible to manually control the lifecycle of a [[ComChannel]] by closing a ComChannel handle using the [[CloseComChannel]] action. The OTX runtime environment will clean up all opened ComChannel handles at releases all ressources related to this [[ComChannel]].
+
It is possible to manually control the lifecycle of a [[Extensions.DiagCom.ComChannel|ComChannel]] by closing a ComChannel handle using the [[Extensions.DiagCom.CloseComChannel|CloseComChannel]] action. The OTX runtime environment will clean up all opened ComChannel handles at releases all ressources related to this [[Extensions.DiagCom.ComChannel|ComChannel]].
 
{{ComChannelMemoryUsageNote}}
 
{{ComChannelMemoryUsageNote}}
  
An [[GetComChannel#ECU_variant_selection|ECU variant selection]] can be performed, see below.
+
An [[Extensions.DiagCom.GetComChannel|GetComChannel#ECU_variant_selection|ECU variant selection]] can be performed, see below.
  
{{TermReturnValue| [[ComChannel]] | Returns a handle to the [[ComChannel]] for a given ECU }}
+
{{TermReturnValue| [[Extensions.DiagCom.ComChannel|ComChannel]] | Returns a handle to the [[Extensions.DiagCom.ComChannel|ComChannel]] for a given ECU }}
  
 
== Properties ==
 
== Properties ==
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie1| Identifier | [[String]] | [[Term]] | - | [1] | String that the Communication Channel identified (Logical Link)}}
+
{{TableRowPropertie1| Identifier | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [1] | String that the Communication Channel identified (Logical Link)}}
{{TableRowPropertie2| EcuVariantName | [[String]] | [[Term]] | "" | [0..1] | Optionally you can select "manual" a special version here.}}
+
{{TableRowPropertie2| EcuVariantName | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | "" | [0..1] | Optionally you can select "manual" a special version here.}}
{{TableRowPropertie1| PerformVariantSelection | [[Boolean]] | [[Term]] | false | [0..1] | Select whether a [[Variant Identification]] is to be performed or not.}}
+
{{TableRowPropertie1| PerformVariantSelection | [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | [[Term]] | false | [0..1] | Select whether a [[Variant Identification]] is to be performed or not.}}
 
|}
 
|}
  
Line 51: Line 51:
  
 
== See also ==
 
== See also ==
[[GetComChannelIdentifierFromResponse]] <br/>
+
[[Extensions.DiagCom.GetComChannelIdentifierFromResponse|GetComChannelIdentifierFromResponse]] <br/>
[[GetComChannelEcuVariantName]] <br/>
+
[[Extensions.DiagCom.GetComChannelEcuVariantName|GetComChannelEcuVariantName]] <br/>
[[IsVariant]] <br/>
+
[[Extensions.DiagCom.IsVariant|IsVariant]] <br/>
[[ExecuteDiagService]]
+
[[Extensions.DiagCom.ExecuteDiagService|ExecuteDiagService]]

Revision as of 08:54, 5 February 2016

Classification

Name GetComChannel
Short Description Represents a connection to the control unit at runtime
Class Term
Extension OTX DiagCom extension
Group ComChanel related terms
Exceptions UnknownTargetException
LossOfComException
Checker Rules -
Standard Compliant Yes

OTL Syntax

DiagCom.GetComChannel(StringTerm, StringTerm, BooleanTerm);

Description

GetComChannel is a term to create a new communication channel via the runtime system diagnosis . The communication channel represents a connection to only one control unit (Logical Link).

To create a connection to the ECU, the following rules are applied:

  • The ComChannel is created when this term was called
  • If the ComChannel has been already created, it is used and it is carried out, no further action.

It is possible to manually control the lifecycle of a ComChannel by closing a ComChannel handle using the CloseComChannel action. The OTX runtime environment will clean up all opened ComChannel handles at releases all ressources related to this ComChannel.

Exclamation.png Important: Long-time running procedures should note that the OTX runtime will close open ComChannels (see GetComChannel) solely via the CloseComChannel activity! This has an impact on the long-time stability of the runtime environment. To avoid memory leaks, ComChannels should not be opened implicitly, like
ExecuteDiagService(CreateDiagServiceByName(GetComChannel("LL_AirbaUDS","",false), "DiagnServi_ReadDataByIdentECUIdent"), ...);

because the resources cannot be released until the completion of runtime execution. Better use:

ComChannel comChannel = GetComChannel("LL_AirbaUDS","",false);
DiagService diagService = CreateDiagServiceByName(comChannel, "DiagnServi_ReadDataByIdentECUIdent"));
ExecuteDiagService(diagService, ...);
...
CloseComChannel(comChannel);

For the short-dated execution of procedures, this is of minor importance!

An GetComChannel#ECU_variant_selection|ECU variant selection can be performed, see below.

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
ComChannel Returns a handle to the ComChannel for a given ECU

Properties

Name Data Type Class Default Cardinality Description
Identifier String Term - [1] String that the Communication Channel identified (Logical Link)
EcuVariantName String Term "" [0..1] Optionally you can select "manual" a special version here.
PerformVariantSelection Boolean Term false [0..1] Select whether a Variant Identification is to be performed or not.

ECU variant selection

An ECU variant selection can be performed after opening the channel and returns a handle to the selected ECU-Variant. The variant identification functionality also exists as a separate action called IdentifyAndSelectVariant.

EcuVariantName PerformVariantSelection
Empty False No ECU variant selection is performed
Empty True An ECU variant selection is performed for the BaseVariant descriped in Identifier
NotEmpty True An ECU variant selection is performed. The channel is created to point at the desired ECUVariant and variant selection is performed on the link afterwards.

OTL Examples

DiagCom.ComChannel myComCannel;
myComCannel = DiagCom.GetComChannel("LL_AllEmissRelatUDSSyste", null, false);

See also

GetComChannelIdentifierFromResponse
GetComChannelEcuVariantName
IsVariant
ExecuteDiagService