Classification
OTL Syntax
ComChannelTerm ComInterface.CreateComChannelFromComInterface(ComInterfaceTerm comInterface, StringTerm identifier, StringTerm ecuVariantName, String ressource);
Description
This term will create a communication channel to an ECU on the specified communication interface. The term is needed, because the diagComPlus:GetComChannelFromInterface term does not guarantee, that the communication is not started. For exchangeability the usage of this term is recommended instead of diagComPlus:GetComChannelFromInterface, if the user wants to set communication parameters before starting communication.
|
|
|
Important: The channel is created at the time this term is executed.
|
|
|
|
Important: If the ComChannel already exists, the state of the diag:ComChannel will not be changed by this term.
|
|
|
|
Important: In case an ODX/MVCI system is used, a StartCommunication on the logical link is not executed. In this case the logical link state is ONLINE.
|
The term CreateComChannelFromInterface will always return a handle to the same ComChannel for a given ECU. 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 appropriate MVCI system operation is MCDProject::createLogicalLink.
|
Return Value
The Term returns the value, see table below.
|
|
In OTX, Terms are categorized according to its return data type!
|
Properties
OTL Examples
/// Local Declarations
ComInterface.ComInterface ComInterface1;
DiagCom.ComChannel ComChannel1;
String String1;
String String2;
String String3;
/// Flow
// ... activities another ...
ComInterface.ConnectComInterface(ConInterface1);
ComChannel1 = ComInterface.CreateComChannelFromComInterface(ComInterface1, String1, String2, String3);
See also