Difference between revisions of "Extensions.Job.AddBranchByIndex"

From emotive
Jump to navigation Jump to search
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{DISPLAYTITLE:  '''AddBranchByIndex '''}}
 
{{DISPLAYTITLE:  '''AddBranchByIndex '''}}
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | AddBranchByIndex | Adds a set of response parameters to the response structure by its index| [[Action]] | [[Extensions.Job|OTX Job extension]] | [[Extensions.Job#Actions|Job related actions]] | [[Core.DataTypes.ComplexDataType.TypeMismatchException|TypeMismatchException]]<br/>[Core.DataTypes.ComplexDataType.OutOfBoundsException|OutOfBoundsException]] | - }}
+
{{ClassificationActivity | AddBranchByIndex | Adds a set of response parameters to the response structure by its index| [[Action]] | [[Extensions.Job|OTX Job extension]] | [[Extensions.Job#Actions|Job related actions]] | [[Core.DataTypes.ComplexDataType.TypeMismatchException|TypeMismatchException]]<br/>[[Core.DataTypes.ComplexDataType.OutOfBoundsException|OutOfBoundsException]] | - }}
  
 
== OTL Syntax ==
 
== OTL Syntax ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
Job.AddBranchByIndex(ParameterContainer, ParameterContainer, NumericTerm);
+
Job.AddBranchByIndex(ParameterContainerTerm parameterContainer, ParameterContainerTerm content, NumericTerm index);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 14: Line 14:
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie2| ParameterContainer | [[Extensions.DiagCom.ParameterContainer|ParameterContainer]] | [[Term]] | - | [1] | The parameter where new element(s) shall be added.}}
+
{{TableRowPropertie2| ParameterContainer | [[Extensions.DiagCom.ParameterContainer|ParameterContainer]] | [[Term]] | - | [1] | The parameter where new element(s) will be added.}}
{{TableRowPropertie1| Index | [[Numeric]] | [[Term]] | - | [1] | The index of the multiplexer branch to be added. [[Core.DataTypes.SimpleDataType.Float|Float]] values shall be truncated.}}
+
{{TableRowPropertie1| Index | [[Numeric]] | [[Term]] | - | [1] | The index of the multiplexer branch to be added. [[Core.DataTypes.SimpleDataType.Float|Float]] values will be truncated.}}
 
{{TableRowPropertie2| Content | [[Extensions.DiagCom.ParameterContainer|ParameterContainer]] | [[Term]] | - | [0..1] | The element(s) to be placed in the newly created multiplexer branch.}}
 
{{TableRowPropertie2| Content | [[Extensions.DiagCom.ParameterContainer|ParameterContainer]] | [[Term]] | - | [0..1] | The element(s) to be placed in the newly created multiplexer branch.}}
 
|}
 
|}
Line 21: Line 21:
 
== 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;
+
/// Local Declarations
 +
 
 
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.AddBranchByIndex(Response1, Request, 1);
+
Job.AddBranchByIndex(Response1, Parameter1, 1);
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Latest revision as of 03:26, 13 September 2019

Classification

Name AddBranchByIndex
Short Description Adds a set of response parameters to the response structure by its index
Class Action
Extension OTX Job extension
Group Job related actions
Exceptions TypeMismatchException
OutOfBoundsException
Checker Rules -
Standard Compliant Yes

OTL Syntax

Job.AddBranchByIndex(ParameterContainerTerm parameterContainer, ParameterContainerTerm content, NumericTerm index);

Description

The AddBranchByIndex is used to add a number of parameters Response to Response structure according to a multiplexer database definition given by its index.

Properties

Name Data Type Class Default Cardinality Description
ParameterContainer ParameterContainer Term - [1] The parameter where new element(s) will be added.
Index Numeric Term - [1] The index of the multiplexer branch to be added. Float values will be truncated.
Content ParameterContainer Term - [0..1] The element(s) to be placed in the newly created multiplexer branch.

OTL Examples

/// Local Declarations

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.AddBranchByIndex(Response1, Parameter1, 1);

See also

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