Extensions.DiagCom.ExecuteDiagService

From emotive
Revision as of 16:57, 9 July 2014 by Js (talk | contribs)
Jump to navigation Jump to search

Classification

Name ExecuteDiagService
Short Description Sending a diagnostic services to the ECU.
Type Action
Extension DiagCom
Group DiagService related actions
Exceptions IncompleteParameterizationException
LossOfComException
UnknownTargetException
UnknownResponseException
OutOfBoundsException
TypeMismatchException
Checker Rules DiagCom_Chk001
DiagCom_Chk100
DiagCom_Chk101

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 Type 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.

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);

See also

GetComChannel
CreateDiagServiceByName