Difference between revisions of "Extensions.DiagCom.CloseComChannel"
Jump to navigation
Jump to search
(13 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{DISPLAYTITLE:OTX '''CloseComChannel'''}}[[Category:DiagCom]] | ||
== Classification == | == Classification == | ||
− | {{ClassificationActivity | CloseComChannel | Closes a communication channel | [[Action]] | [[DiagCom|OTX DiagCom extension]] | [[ComChanel related actions]] | [[InvalidReferenceException]] | - }} | + | {{ClassificationActivity | CloseComChannel | Closes a communication channel | [[Action]] | [[Extensions.DiagCom|OTX DiagCom extension]] | [[Extensions.DiagCom#Terms|ComChanel related actions]] | [[Core.DataTypes.ComplexDataType.InvalidReferenceException|InvalidReferenceException]] | - }} |
− | == | + | == OTL Syntax == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | + | DiagCom.CloseComChannel(ComChannelVariable comChannel); | |
</syntaxhighlight> | </syntaxhighlight> | ||
== Description == | == Description == | ||
− | OTX CloseComChannel activity is used for the [[Diagnosis Runtime System]] to announce that an open communication channel all relevant resources can be released and closed. | + | OTX CloseComChannel activity is used for the [[Diagnosis Runtime System]] to announce that an open communication channel that all relevant resources can be released and closed. |
− | {{ | + | {{ComChannelMemoryUsageNote}} |
+ | {{Important|Please note that the use of a shared '''ComChannel''' can bring the OTX runtime system in an undefined state and that is this case is not validated at design time!}} | ||
== Properties == | == Properties == | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
− | {{ | + | {{TableRowPropertie2| ComChannel | [[Extensions.DiagCom.ComChannel|ComChannel]] | [[Variable]] | - | [1] | This element comprises communication channel which will be closed.}} |
|} | |} | ||
− | == Examples == | + | == OTL Examples == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | ComChannel | + | /// Local Declarations |
− | + | ||
− | + | DiagCom.ComChannel ComChannel1; | |
− | CloseComChannel( | + | |
+ | /// Flow | ||
+ | |||
+ | ComChannel1 = DiagCom.GetComChannel("LL_EnginContrModul1UDS", NULL, false); | ||
+ | DiagCom.CloseComChannel(ComChannel1); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== See also == | == See also == | ||
− | [[GetComChannel]] | + | [[Extensions.DiagCom.GetComChannel|GetComChannel]] |
Latest revision as of 10:01, 12 September 2019
Classification
Name | CloseComChannel |
Short Description | Closes a communication channel |
Class | Action |
Extension | OTX DiagCom extension |
Group | ComChanel related actions |
Exceptions | InvalidReferenceException |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
DiagCom.CloseComChannel(ComChannelVariable comChannel);
Description
OTX CloseComChannel activity is used for the Diagnosis Runtime System to announce that an open communication channel that all relevant resources can be released and closed.
![]() |
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! |
![]() |
Important: Please note that the use of a shared ComChannel can bring the OTX runtime system in an undefined state and that is this case is not validated at design time! |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
ComChannel | ComChannel | Variable | - | [1] | This element comprises communication channel which will be closed. |
OTL Examples
/// Local Declarations
DiagCom.ComChannel ComChannel1;
/// Flow
ComChannel1 = DiagCom.GetComChannel("LL_EnginContrModul1UDS", NULL, false);
DiagCom.CloseComChannel(ComChannel1);