Difference between revisions of "Extensions.DiagCom.GetFirstResult"
Jump to navigation
Jump to search
(4 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 | | + | {{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 | + | ResultTerm DiagCom.GetFirstResult(DiagServiceTerm diagService); |
</syntaxhighlight> | </syntaxhighlight> | ||
== Description == | == Description == | ||
− | The '''GetFirstResult''' term returns the first result of a | + | 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]] | | + | {{TermReturnValue| [[Extensions.DiagCom.Result|Result]] | The first result of the service execution.}} |
== Properties == | == Properties == | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
− | {{TableRowPropertie2| DiagService | [[ | + | {{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 | + | /// Local Declarations |
+ | |||
+ | DiagCom.ComChannel ComChannel1; | ||
DiagCom.DiagService DiagService1; | DiagCom.DiagService DiagService1; | ||
DiagCom.Result Result1; | DiagCom.Result Result1; | ||
− | + | /// Flow | |
− | DiagService1 = DiagCom.CreateDiagServiceByName( | + | |
− | DiagCom.SetRepetitionTime(DiagService1, | + | ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "", false); |
+ | DiagService1 = DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_ReadDataByIdentActuaTestStatu"); | ||
+ | DiagCom.SetRepetitionTime(DiagService1, 5); | ||
DiagCom.StartRepeatedExecution(DiagService1); | DiagCom.StartRepeatedExecution(DiagService1); | ||
− | + | 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
Contents
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.
![]()
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