Difference between revisions of "Extensions.DiagCom.GetFirstResult"

From emotive
Jump to navigation Jump to search
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{DISPLAYTITLE:OTX '''GetFirstResult'''}}[[Category:DiagCom]]
 
{{DISPLAYTITLE:OTX '''GetFirstResult'''}}[[Category:DiagCom]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | GetFirstResult | The first result of a diagnostic services performed | [[Term]] | [[Extensions.DiagCom|OTX DiagCom extension]] | [[Result related terms]] | [[OutOfBoundsException]] | - }}
+
{{ClassificationActivity | GetFirstResult | Gets the first result of a service execution | [[Term]] | [[Extensions.DiagCom|OTX DiagCom extension]] | [[Extensions.DiagCom#Terms|Result related terms]] | [[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;">
ResultTerm = DiagCom.GetFirstResult(DiagServiceTerm);
+
ResultTerm DiagCom.GetFirstResult(DiagServiceTerm diagService);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== Description ==
 
== Description ==
The '''GetFirstResult''' term returns the first result of a diagnostic services performed. This is necessary especially for the evaluation of the responses of several ECUs.
+
The '''GetFirstResult''' term returns the first result of a service execution, irrespective of whether there exists more than one result. The term accepts a '''DiagServiceTerm''' argument and returns a [[Extensions.DiagCom.Result|Result]] object.
  
{{TermReturnValue| [[Extensions.DiagCom.Result|Result]] | Result object of diagnostic services.}}
+
{{TermReturnValue| [[Extensions.DiagCom.Result|Result]] | The first result of the service execution.}}
  
 
== Properties ==
 
== Properties ==
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie2| DiagService | [[Core.DataTypes.ComplexDataType.DiagService|DiagService]] | [[Term]] | - | [1] | Diagnostics Service.}}
+
{{TableRowPropertie2| DiagService | [[Extensions.DiagCom.DiagService|DiagService]] | [[Term]] | - | [1] | Represents the '''DiagService''' object of which the first '''Result''' will be returned.}}
 
|}
 
|}
  
 
== Examples ==
 
== Examples ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
DiagCom.ComChannel myComCannel;
+
/// Local Declarations
 +
 
 +
DiagCom.ComChannel ComChannel1;
 
DiagCom.DiagService DiagService1;
 
DiagCom.DiagService DiagService1;
 
DiagCom.Result Result1;
 
DiagCom.Result Result1;
  
myComCannel = DiagCom.GetComChannel("LL_AllEmissRelatUDSSyste", "", false);
+
/// Flow
DiagService1 = DiagCom.CreateDiagServiceByName(myComCannel, "DiagnServi_ReadDataByIdentActuaTestStatu");
+
 
DiagCom.SetRepetitionTime(DiagService1, 50);
+
ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "", false);
 +
DiagService1 = DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_ReadDataByIdentActuaTestStatu");
 +
DiagCom.SetRepetitionTime(DiagService1, 5);
 
DiagCom.StartRepeatedExecution(DiagService1);
 
DiagCom.StartRepeatedExecution(DiagService1);
DiagCom.ExecuteDiagService(DiagService1, {}, {}, false, false);
+
EventHandling.Sleep(50);
 
DiagCom.StopRepeatedExecution(DiagService1);
 
DiagCom.StopRepeatedExecution(DiagService1);
 
Result1 = DiagCom.GetFirstResult(DiagService1);
 
Result1 = DiagCom.GetFirstResult(DiagService1);
Line 35: Line 39:
  
 
== See also ==
 
== See also ==
 +
[[Extensions.DiagCom.GetComChannel|GetComChannel]] <br/>
 +
[[Extensions.DiagCom.CreateDiagServiceByName|CreateDiagServiceByName]] <br/>
 +
[[Extensions.DiagCom.CreateDiagServiceBySemantic|CreateDiagServiceBySemantic]] <br/>
 +
[[Extensions.DiagCom.SetRepetitionTime|SetRepetitionTime]] <br/>
 +
[[Extensions.DiagCom.StartRepeatedExecution|StartRepeatedExecution]] <br/>
 +
[[Extensions.DiagCom.StopRepeatedExecution|StopRepeatedExecution]] <br/>
 
[[Extensions.DiagCom.GetAllResults|GetAllResults]] <br/>
 
[[Extensions.DiagCom.GetAllResults|GetAllResults]] <br/>
 
[[Extensions.DiagCom.ExecuteDiagService|ExecuteDiagService]]
 
[[Extensions.DiagCom.ExecuteDiagService|ExecuteDiagService]]

Latest revision as of 10:12, 12 September 2019

Classification

Name GetFirstResult
Short Description Gets the first result of a service execution
Class Term
Extension OTX DiagCom extension
Group Result related terms
Exceptions OutOfBoundsException
Checker Rules -
Standard Compliant Yes

OTL Syntax

ResultTerm DiagCom.GetFirstResult(DiagServiceTerm diagService);

Description

The GetFirstResult term returns the first result of a service execution, irrespective of whether there exists more than one result. The term accepts a DiagServiceTerm argument and returns a Result object.

Return Value

The Term returns the value, see table below.

Icons Note.png In OTX, Terms are categorized according to its return data type!
Data Type Description
Result The first result of the service execution.

Properties

Name Data Type Class Default Cardinality Description
DiagService DiagService Term - [1] Represents the DiagService object of which the first Result will be returned.

Examples

/// Local Declarations

DiagCom.ComChannel ComChannel1;
DiagCom.DiagService DiagService1;
DiagCom.Result Result1;

/// Flow

ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "", false);
DiagService1 = DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_ReadDataByIdentActuaTestStatu");
DiagCom.SetRepetitionTime(DiagService1, 5);
DiagCom.StartRepeatedExecution(DiagService1);
EventHandling.Sleep(50);
DiagCom.StopRepeatedExecution(DiagService1);
Result1 = DiagCom.GetFirstResult(DiagService1);

See also

GetComChannel
CreateDiagServiceByName
CreateDiagServiceBySemantic
SetRepetitionTime
StartRepeatedExecution
StopRepeatedExecution
GetAllResults
ExecuteDiagService