Difference between revisions of "Extensions.Job.AddBranchByIndex"

From emotive
Jump to navigation Jump to search
Line 1: Line 1:
 
{{DISPLAYTITLE:  '''AddBranchByIndex '''}}
 
{{DISPLAYTITLE:  '''AddBranchByIndex '''}}
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | AddBranchByIndex | Adds a set of response parameters by index | [[Action]] | [[Extensions.Job|OTX Job extension]] | [[Job related actions]] | [[Core.Actions.Throw.Exception.TypeMismatchException|TypeMismatchException]]<br/>[[Core.Actions.Throw.Exception.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, IntegerTerm);
+
Job.AddBranchByIndex(ParameterContainer, ParameterContainer, NumericTerm);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== Description ==
 
== Description ==
'''AddBranchByIndex''' is used to add a number of parameters '''Response''' to '''Response''' structure according to the definition of a database by its index multiplexer.
+
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 ==
 
== Properties ==
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie1| ParameterContainer | [[Extensions.DiagCom.ParameterContainer|ParameterContainer]] | [[Term]] | - | [1] | The parameters in which new element (s) to be added.}}
+
{{TableRowPropertie2| ParameterContainer | [[Extensions.DiagCom.ParameterContainer|ParameterContainer]] | [[Term]] | - | [1] | The parameter where new element(s) shall be added.}}
{{TableRowPropertie2| Index | [[Core.DataTypes.SimpleDataType.Integer|Integer]] | [[Term]] | - | [0..1] | The index of the multiplexer branch is added to the}}
+
{{TableRowPropertie1| Index | [[Numeric]] | [[Term]] | - | [1] | The index of the multiplexer branch to be added. [[Core.DataTypes.SimpleDataType.Float|Float]] values shall be truncated.}}
{{TableRowPropertie1| Content | [[Extensions.DiagCom.ParameterContainer|ParameterContainer]] | [[Term]] | - | [0..1] | The element that is placed in the newly created branch multiplexer}}
+
{{TableRowPropertie2| Content | [[Extensions.DiagCom.ParameterContainer|ParameterContainer]] | [[Term]] | - | [0..1] | The element(s) to be placed in the newly created multiplexer branch.}}
 
|}
 
|}
  
 
== OTL Examples ==
 
== OTL Examples ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
DiagCom.Request ParameterContainer1;
+
DiagCom.Request Request;
 +
DiagCom.ComChannel ComChannel1;
 +
DiagCom.DiagService DiagService1;
 +
DiagCom.Result Result1;
 +
DiagCom.Response Response1;
  
Job.AddBranchByIndex(ParameterContainer1, ParameterContainer1, 0);
+
/// Flow
 +
 
 +
ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", NULL, false);
 +
DiagService1 = DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_ReadDataByIdentActuaTestStatu");
 +
[#MetaData(RequestPdu), <#Data>22 01 00</#Data>]
 +
DiagCom.ExecuteDiagService(DiagService1, {}, {}, Result1, NULL, false, false);
 +
Response1 = DiagCom.GetFirstResponse(Result1);
 +
Request = DiagCom.GetRequest(DiagService1);
 +
Job.AddBranchByIndex(Response1, Request, 1);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 32: Line 44:
 
[[Extensions.Job.SetProgressInfo|SetProgressInfo]]<br/>
 
[[Extensions.Job.SetProgressInfo|SetProgressInfo]]<br/>
 
[[Extensions.Job.AddElement|AddElement]]<br/>
 
[[Extensions.Job.AddElement|AddElement]]<br/>
[[Extensions.Job.AddBranchByName|AddBranchByName]]<br/>
+
[[Extensions.Job.AddBranchByName|AddBranchByName]]<br/>
 +
<!--[[Extensions.Job.AddBranchByIndex|AddBranchByIndex]]<br/>-->
 
[[Extensions.Job.AddBranchByValue|AddBranchByValue]]<br/>
 
[[Extensions.Job.AddBranchByValue|AddBranchByValue]]<br/>
[[Extensions.Job.AddEnvDataByDtc|AddEnvDataByDtc]]
+
[[Extensions.Job.AddEnvDataByDtc|AddEnvDataByDtc]]<br/>
 +
[[Extensions.DiagCom.GetComChannel|GetComChannel]]<br/>
 +
[[Extensions.DiagCom.CreateDiagServiceByName|CreateDiagServiceByName]]<br/>
 +
[[Extensions.DiagCom.ExecuteDiagService|ExecuteDiagService]]<br/>
 +
[[Extensions.DiagCom.GetFirstResponse|GetFirstResponse]]<br/>
 +
[[Extensions.DiagCom.GetRequest|GetRequest]]<br/>

Revision as of 05:00, 18 October 2018

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
[Core.DataTypes.ComplexDataType.OutOfBoundsException
Checker Rules OutOfBoundsException]]
Standard Compliant Yes

OTL Syntax

Job.AddBranchByIndex(ParameterContainer, ParameterContainer, NumericTerm);

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) shall be added.
Index Numeric Term - [1] The index of the multiplexer branch to be added. Float values shall be truncated.
Content ParameterContainer Term - [0..1] The element(s) to be placed in the newly created multiplexer branch.

OTL Examples

DiagCom.Request Request;
DiagCom.ComChannel ComChannel1;
DiagCom.DiagService DiagService1;
DiagCom.Result Result1;
DiagCom.Response Response1;

/// Flow

ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", NULL, false);
DiagService1 = DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_ReadDataByIdentActuaTestStatu");
[#MetaData(RequestPdu), <#Data>22 01 00</#Data>]
DiagCom.ExecuteDiagService(DiagService1, {}, {}, Result1, NULL, false, false);
Response1 = DiagCom.GetFirstResponse(Result1);
Request = DiagCom.GetRequest(DiagService1);
Job.AddBranchByIndex(Response1, Request, 1);

See also

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