OTX Reference  
OpenTestSystem.Otx.Extensions.ComInterface.Terms.GetComChannelFromComInterface Class Reference

Gets a communication channel More...

Inheritance diagram for OpenTestSystem.Otx.Extensions.ComInterface.Terms.GetComChannelFromComInterface:
Inheritance graph

Public Attributes

ComInterfaceTerm comInterface
 Cardinality [1]
This element identifies the communication interface. More...
 
StringTerm ecuVariantName
 Cardinality [0..1]
This optional element allows an OTX sequence to explicitly specify a particular ECU variant that the ComChannel shall be associated with. More...
 
StringTerm identifier
 Cardinality [1]
This element represents a string identifying the communication channel, which shall be created. More...
 
BooleanTerm performVariantSelection
 Cardinality [0..1]
This optional element can be used by the OTX author to control whether an implicit variant selection shall be performed. If <performVariantSelection> yields true at runtime, the variant selection is done automatically after the ComChannel is created. More...
 
StringTerm resource
 Cardinality [0..1]
The MVCI communication channel. More...
 
- Public Attributes inherited from OpenTestSystem.Otx.Core.Terms.Term
MetaData metaData
 Cardinality [0..1]
The MetaData type allows tools to store additional, mainly tool-specific data. More...
 

Detailed Description

Gets a communication channel

The GetComChannelFromComInterface term returns a communication channel from the ComInterface. It depends on the implementation of the OTX runtime system when the channel is actually created by the communication layer.There are three possible scenarios: The channel is created at the time this term is executed.

The channel already exists; no additional action is carried out by the execution of this term. The channel is created when it is first needed for actual diagnostic communication. No matter which approach is chosen, the term GetComChannelFromComInterface shall always return a handle to the same ComChannel for a given ComInterface. It is possible to manually control the lifecycle of a ComChannel object by closing a ComChannel handle using the diag:CloseComChannel action. This is up to the author of a diagnostic sequence, an OTX runtime system is expected to clean up open ComChannel handles at the end of a diagnostic session. The OTX runtime shall perform an ECU variant selection after opening of the channel if the term given by the optional element <performVariantSelection> yields true. This implies that when the next action on a communication channel is performed, the runtime system has identified the variant of the ECU actually present at runtime and configured the ComChannel accordingly. In case both an <ecuVariantName> is provided and <performVariantSelection> yields true, the channel is created to point at the desired ECU variant and variant selection is performed on the link afterwards. The variant identification functionality also exists as a separate action.

Note
The detailed runtime behavior is described in DiagManager Runtime Behavior.
Exceptions
DiagCom.Exceptions.LossOfComExceptionIf communication to the ECU was interrupted during the variant identification process.
DiagCom.Exceptions.UnknownTargetExceptionIf the ComChannel identifier provided by the identifer element doesn't exist or is invalid.
Syntax
ComChannelTerm = ComInterface.GetComChannelFromComInterface(ComInterfaceTerm comInterface, StringTerm identifier, StringTerm ecuVariantName = NULL, BooleanTerm performVariantSelection = false, StringTerm resource = NULL);
StringTerm resource
Cardinality [0..1] The MVCI communication channel.
Definition: ComInterface.cs:1647
StringTerm ecuVariantName
Cardinality [0..1] This optional element allows an OTX sequence to explicitly specify a particular EC...
Definition: ComInterface.cs:1575
StringTerm identifier
Cardinality [1] This element represents a string identifying the communication channel,...
Definition: ComInterface.cs:1545
ComInterfaceTerm comInterface
Cardinality [1] This element identifies the communication interface.
Definition: ComInterface.cs:1533
BooleanTerm performVariantSelection
Cardinality [0..1] This optional element can be used by the OTX author to control whether an implicit...
Definition: ComInterface.cs:1629
Examples
// Local Declarations
ComInterface.ComInterface ComInterface1;
DiagCom.ComChannel ComChannel1;
String String1;
String String2;
String String3;
Boolean Boolean1;
// Flow
ComInterface.ConnectComInterface(ConInterface1);
ComChannel1 = ComInterface.GetComChannelFromComInterface(ComInterface1, String1, String2, Boolean1, String3);

Member Data Documentation

◆ comInterface

ComInterfaceTerm OpenTestSystem.Otx.Extensions.ComInterface.Terms.GetComChannelFromComInterface.comInterface

Cardinality [1]
This element identifies the communication interface.

◆ ecuVariantName

StringTerm OpenTestSystem.Otx.Extensions.ComInterface.Terms.GetComChannelFromComInterface.ecuVariantName

Cardinality [0..1]
This optional element allows an OTX sequence to explicitly specify a particular ECU variant that the ComChannel shall be associated with.

It is provided in addition to the identifier attribute based on the assumption that the ComChannel identifier specifies a connection to a base variant of an ECU, the precise variant of which then can be implicitly or explicitly identified by the diagnostic application (compare the <performVariantSelection> element in this clause and the diag:IdentifyAndSelectVariant action). The <ecuVariantName> element can be used to directly create a ComChannel to a specific ECU variant without needing to perform the ECU variant identification step.

Note
In case a MVCI/ODX system is used, the <ecuVariantName> element specifies the SHORT-NAME of the MCDDbEcuVariant to be associated with the logical link.

If the <ecuVariantName> element is defined, the <performVariantSelection> element shall be omitted or set to false.

Note
The related MVCI system methods MCDProject::createLogicalLinkByVariantAndInterface() has to be called if only the <ecuVariantName> parameter is defined.

MCDProject::createLogicalLinkByVariantAndInterfaceResource() has to be called if the <ecuVariantName> parameter and the Resource parameter are defined.

Default: If this parameter is not transmitted, no variant selection takes place.

◆ identifier

StringTerm OpenTestSystem.Otx.Extensions.ComInterface.Terms.GetComChannelFromComInterface.identifier

Cardinality [1]
This element represents a string identifying the communication channel, which shall be created.

Note
In case a MVCI/ODX system is used the identifier specifies the SHORT-NAME of the MCDLogicalLink to be used for communication. The appropriate MVCI system operation MCDProject::createLogicalLinkByNameAndInterface() has to be called if all optional parameters of this term are not set.

◆ performVariantSelection

BooleanTerm OpenTestSystem.Otx.Extensions.ComInterface.Terms.GetComChannelFromComInterface.performVariantSelection

Cardinality [0..1]
This optional element can be used by the OTX author to control whether an implicit variant selection shall be performed. If <performVariantSelection> yields true at runtime, the variant selection is done automatically after the ComChannel is created.

This document cannot make assumptions about whether the vehicle communication component used by an OTX runtime supports the concept of ECU variant identification or about the behaviour of the communication component in case it does. The relevant parts of the OTX DiagCom standard are based on the following assumptions:

  • A communication channel to an ComInterface is associated with a data set describing diagnostic behaviour of a specific variant of that ECU.
  • The vehicle communication component is able to explicitly perform an ECU variant identification operation on a communication channel to an ECU.
  • The required logic and data for performing the variant identification is intrinsic to the vehicle communication component, i.e. there is no additional external information required for the communication component to perform the ECU variant identification.
  • After an ECU variant has been identified, the vehicle communication component is able to explicitly associate the communication channel to that ECU with the specific data set for that ECU variant, effectively switching the communication channel from the old variant data set to a new one.
  • The diag:IdentifyAndSelectVariant action tells the runtime system to perform the variant identification operation on the provided communication channel and then switch the data set associated with that channel to the one fitting the newly identified variant (if any).
  • The diag: GetComChannel term tells the runtime system to create a new communication channel, immediately perform the variant identification operation on the new communication channel and then switch the data set associated with that channel to the one fitting the newly identified variant (if any).
Note
In case an ODX/MVCI system is used, the exact semantics of Variant Identification and Selection are specified by the ISO ODX and MVCI standards.

Default: false If the <performVariantSelection> element is set to true, the <ecuVariantName> element shall be omitted.

Note
The related MVCI system methods
MCDProject::createLogicalLinkByNameAndInterface() has to be called if all optional parameters of this term are not set.
MCDProject::createLogicalLinkByNameAndInterfaceResource() has to be called if only the Resource parameter is defined.
MCDLogicalLink::gotoOnline()
MCDLogicalLink::open()
Control Primitive MCDStartCommunication
Control Primitive MCDVariantIdentificationAndSelection

◆ resource

StringTerm OpenTestSystem.Otx.Extensions.ComInterface.Terms.GetComChannelFromComInterface.resource

Cardinality [0..1]
The MVCI communication channel.

Note
The related MVCI system methods MCDProject::createLogicalLinkByNameAndInterfaceResource() has to be called if only the Resource parameter is defined. MCDProject::createLogicalLinkByVariantAndInterfaceResource() has to be called if the <ecuVariantName> parameter and the Resource parameter are defined.

Default: the standard resource selected by runtime system.