Difference between revisions of "Extensions.Job.AddElement"

From emotive
Jump to navigation Jump to search
Line 20: Line 20:
 
== OTL Examples ==
 
== OTL Examples ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
DiagCom.Request Request;
 
 
DiagCom.ComChannel ComChannel1;
 
DiagCom.ComChannel ComChannel1;
 
DiagCom.DiagService DiagService1;
 
DiagCom.DiagService DiagService1;
 
DiagCom.Result Result1;
 
DiagCom.Result Result1;
 
DiagCom.Response Response1;
 
DiagCom.Response Response1;
 +
DiagCom.Parameter Parameter1;
  
 
/// Flow
 
/// Flow
  
ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", NULL, false);
+
ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "EV_GatewLear_006", false);
DiagService1 = DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_ReadDataByIdentActuaTestStatu");
+
DiagService1 = DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_ReadDataByIdentECUIdent");
[#MetaData(RequestPdu), <#Data>22 01 00</#Data>]
+
[#MetaData(RequestPdu), <#Data>22 04 07</#Data>]
DiagCom.ExecuteDiagService(DiagService1, {}, {}, Result1, NULL, false, false);
+
DiagCom.ExecuteDiagService(DiagService1, {Param_RecorDataIdent = "VW Logical Software Block Counter Of Programming Attempts"}, {}, Result1, NULL, false, false);
 
Response1 = DiagCom.GetFirstResponse(Result1);
 
Response1 = DiagCom.GetFirstResponse(Result1);
Request = DiagCom.GetRequest(DiagService1);
+
Parameter1 = DiagCom.GetParameterByPath(Response1, {"Param_DataRecor"});
Job.AddElement(Response1, Request);
+
Job.AddElement(Response1, Parameter1);
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Revision as of 07:23, 18 October 2018

Classification

Name AddElement
Short Description Add parameters or parameter structure
Class Action
Extension OTX Job extension
Group Job related actions
Exceptions TypeMismatchException
Checker Rules -
Standard Compliant Yes

OTL Syntax

Job.AddElement(ParameterContainerTerm, ParameterContainerTerm);

Description

The AddElement is used to add a parameter or parameter structure to a point in a response structure.

Properties

Name Data Type Class Default Cardinality Description
ParameterContainer ParameterContainer Term - [1] The parameters in which new element (s) to be added.
Content ParameterContainer Term - [0..1] The item (s) is added to the parameter container.

OTL Examples

DiagCom.ComChannel ComChannel1;
DiagCom.DiagService DiagService1;
DiagCom.Result Result1;
DiagCom.Response Response1;
DiagCom.Parameter Parameter1;

/// Flow

ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "EV_GatewLear_006", false);
DiagService1 = DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_ReadDataByIdentECUIdent");
[#MetaData(RequestPdu), <#Data>22 04 07</#Data>]
DiagCom.ExecuteDiagService(DiagService1, {Param_RecorDataIdent = "VW Logical Software Block Counter Of Programming Attempts"}, {}, Result1, NULL, false, false);
Response1 = DiagCom.GetFirstResponse(Result1);
Parameter1 = DiagCom.GetParameterByPath(Response1, {"Param_DataRecor"});
Job.AddElement(Response1, Parameter1);

See also

SendFinalResult
SendIntermediateResult
SetJobInfo
SetProgressInfo
AddBranchByName
AddBranchByIndex
AddBranchByValue
AddEnvDataByDtc
GetComChannel
CreateDiagServiceByName
ExecuteDiagService
GetFirstResponse
GetRequest