Difference between revisions of "Extensions.DiagCom.ExecuteDiagService"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
== Classification == | == Classification == | ||
− | {{ClassificationActivity | ExecuteDiagService | Sending a diagnostic services to the ECU. | [[Action]]|[[DiagCom]] | [[DiagService related actions]] | [[IncompleteParameterizationException]]<br />[[LossOfComException]]<br />[[UnknownTargetException]]<br />[[UnknownResponseException]]<br />[[OutOfBoundsException]]<br />[[TypeMismatchException]] | [[DiagCom_Chk001]]<br />[[DiagCom_Chk100]]<br />[[DiagCom_Chk101]] }} | + | {{ClassificationActivity | ExecuteDiagService | Sending a diagnostic services to the ECU. | [[Action]] | [[OTX DiagCom extension]] | [[DiagService related actions]] | [[IncompleteParameterizationException]]<br />[[LossOfComException]]<br />[[UnknownTargetException]]<br />[[UnknownResponseException]]<br />[[OutOfBoundsException]]<br />[[TypeMismatchException]] | [[DiagCom_Chk001]]<br />[[DiagCom_Chk100]]<br />[[DiagCom_Chk101]] }} |
== Pseudo-Code Syntax == | == Pseudo-Code Syntax == |
Revision as of 07:50, 10 July 2014
Classification
Name | ExecuteDiagService |
Short Description | Sending a diagnostic services to the ECU. |
Class | Action |
Extension | OTX DiagCom extension |
Group | DiagService related actions |
Exceptions | IncompleteParameterizationException LossOfComException UnknownTargetException UnknownResponseException OutOfBoundsException TypeMismatchException |
Checker Rules | DiagCom_Chk001 DiagCom_Chk100 DiagCom_Chk101 |
Standard Compliant | Yes |
Pseudo-Code Syntax
ExecuteDiagService(DiagServiceTerm diagService, RequestParameters requestParameters, ResponseParameters responseParameters, Boolean executeAsync, Boolean suppressPositiveResponse, ResultVariable result, ResultStateVariable resultState);
Description
The ExecuteDiagService action is used for performing diagnostic vehicle communication. An ExecuteDiagService node in an OTX sequence indicates to the runtime system that at this point, a service request shall be transmitted to one or more ECUs and one or more responses can be received. The ExecuteDiagService action requires the following information:
- The DiagService to use
- The mapping of OTX values to the service’s Request-Parameters
- The mapping of values of the service’s response parameters to OTX variables
The writing/reading of values to/from service request and/or response parameters can be done in two ways, depending on whether a service’s parameter structure is known at OTX authoring time or will have to be dynamically evaluated at run time:
- Inline mapping: In case a service’s parameter structure is static (known at authoring time), the ExecuteDiagService action can be used to define request and response parameter mappings inline through its Request- and Response-Parameters members.
- Dynamic response: In case a service’s parameter structure is dynamic at runtime (not known at authoring time), it is possible to use terms defined by the DiagCom extension to evaluate request and response parameter structures by explicit OTX statements.
Properties
Name | Data Type | Class | Default | Cardinality | Description |
executeAsync | Boolean | Value | false | [0..1] | This option tells the communication backend to make this diagnostic service execution non-blocking. This means that if executeAsync is set to true, the OTX execution flow will immediately move on to the next Action, without waiting for the result of the ExecuteDiagService action. |
suppressPositiveResponse | Boolean | Value | false | [0..1] | This option tells the ECU(s) addressed by the diagnostic service to suppress sending of a positive response. |
diagService | DiagService | Term | - | [1] | The element specifies the service which shall be executed, see CreateDiagServiceByName or CreateDiagServiceBySemantic. |
requestParameters | RequestParameters | - | - | [0..*] | Collection of Terms which are mapped to service request parameters. |
responseParameters | ResponseParameters | - | - | [0..*] | Collection of Response Parameters which are mapped to OTX Variables. |
result | Result | Variable | - | [0..1] | After execution of the diagnostic service, the first result shall be assigned to the variable given by this optional element. |
resultState | ResultState | Variable | - | [0..1] | After execution of the diagnostic service, the state of its first result (i.e. whether the ECU(s) answered at all, correctly, positively or negatively) shall be assigned to the variable given by this optional element. In order to get the result state of further results (e.g. in case of cyclic execution), the GetResultState term shall be used. |
Examples
// The example shows the execution of an diagnostic service after establishing the communication
ComChannel myComCannel = GetComChannel("LL_AirbaUDS", "", false);
DiagService myDiagService = CreateDiagServiceByName(myComChannel, "DiagnServi_ReadDataByIdentECUIdent");
ExecuteDiagService(myDiagService, new RequestParameters<RequestParameter>() { { "Param_RecorDataIdent", "Spare Part Number" } }, new ResponseParameters<ResponseParameter>() { { "Resp_ReadDataByIdentECUIdent.Param_DataRecor.Param_SparePartNumbe", mySparePartNumberStringVariable } }, false, false);