Extensions.DiagCom.ExecuteDiagService

From emotive
Jump to navigation Jump to search

Classification

Name ExecuteDiagService
Short Description Sending a diagnostic services to the ECU.
Class Action
Extension DiagCom
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

Template:TableRowProperties1 Template:TableRowProperties2 Template:TableRowProperties1 Template:TableRowProperties2 Template:TableRowProperties1 Template:TableRowProperties2 Template:TableRowProperties1

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