Difference between revisions of "Extensions.DiagCom.GetDiagServiceFromException"
Jump to navigation
Jump to search
(2 intermediate revisions by one other user not shown) | |||
Line 5: | Line 5: | ||
== OTL Syntax == | == OTL Syntax == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | + | DiagServiceTerm DiagCom.GetDiagServiceFromException(ExceptionValue unknownResponseException); | |
− | |||
− | |||
− | |||
</syntaxhighlight> | </syntaxhighlight> | ||
== Description == | == Description == | ||
− | The '''GetDiagServiceFromException''' term accepts an '''ExceptionReference''' and | + | The '''GetDiagServiceFromException''' term accepts an '''ExceptionReference''' and will return the handle of the '''DiagService''' that caused the exception to be thrown. It will only be used together with exceptions of type [[Extensions.DiagCom.UnknownResponseException|UnknownResponseException]] that will be thrown by the [[Extensions.DiagCom.ExecuteDiagService|ExecuteDiagService]] action in case the static response mapping does not map a response that has been returned from the vehicle. |
{{TermReturnValue| [[Extensions.DiagCom.DiagService|DiagService]] | The handle of the '''DiagService''' that caused the exception.}} | {{TermReturnValue| [[Extensions.DiagCom.DiagService|DiagService]] | The handle of the '''DiagService''' that caused the exception.}} | ||
Line 19: | Line 16: | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
− | {{TableRowPropertie2| UnknownResponseException | [[Core.DataTypes.ComplexDataType.Exception|Exception]] | [[Value]] | - | [1] | Specifies the '''Exception''' for which the '''DiagService''' | + | {{TableRowPropertie2| UnknownResponseException | [[Core.DataTypes.ComplexDataType.Exception|Exception]] | [[Value]] | - | [1] | Specifies the '''Exception''' for which the '''DiagService''' will be retrieved that caused the exception when executed. It is only allowed to reference exceptions of type '''UnknownResponseException'''.}} |
|} | |} | ||
Latest revision as of 10:12, 12 September 2019
Contents
Classification
Name | GetDiagServiceFromException |
Short Description | Gets the handle of the DiagService that caused the exception |
Class | Term |
Extension | OTX DiagCom extension |
Group | DiagService related terms |
Exceptions | UnknownTargetException TypeMismatchException |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
DiagServiceTerm DiagCom.GetDiagServiceFromException(ExceptionValue unknownResponseException);
Description
The GetDiagServiceFromException term accepts an ExceptionReference and will return the handle of the DiagService that caused the exception to be thrown. It will only be used together with exceptions of type UnknownResponseException that will be thrown by the ExecuteDiagService action in case the static response mapping does not map a response that has been returned from the vehicle.
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
DiagService | The handle of the DiagService that caused the exception. |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
UnknownResponseException | Exception | Value | - | [1] | Specifies the Exception for which the DiagService will be retrieved that caused the exception when executed. It is only allowed to reference exceptions of type UnknownResponseException. |
OTL Examples
/// Local Declarations
DiagCom.DiagService DiagService1;
DiagCom.UnknownResponseException Handle1;
DiagCom.ComChannel ComChannel1;
/// Flow
try
{
ComChannel1 = DiagCom.GetComChannel("LL_AllEmissRelatUDSSyste", NULL, false);
[#MetaData(RequestPdu), <#Data>22 F1 9E</#Data>]
DiagCom.ExecuteDiagService(DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_ReadDataByIdentASAMODXFileIdent"), {}, {Resp_ReadDataByIdentASAMODXFileIdent.Expected = true}, NULL, NULL, false, false);
}
catch (DiagCom.UnknownResponseException Handle1)
{
DiagService1 = DiagCom.GetDiagServiceFromException(Handle1);
}
See also
CreateDiagServiceByName
CreateDiagServiceBySemantic
GetDiagServiceListBySemantic
GetDiagServiceFromResult
GetDiagServiceName
ExecuteDiagService
GetComChannel