Difference between revisions of "Extensions.DiagCom.IsPositive"
Jump to navigation
Jump to search
(7 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:OTX '''IsPositive'''}}[[Category:DiagCom]] | {{DISPLAYTITLE:OTX '''IsPositive'''}}[[Category:DiagCom]] | ||
== Classification == | == Classification == | ||
− | {{ClassificationActivity | IsPositive | | + | {{ClassificationActivity | IsPositive | Checks whether a response is positive | [[Term]] | [[Extensions.DiagCom|OTX DiagCom extension]] | [[Extensions.DiagCom#Terms|Response related terms]] | - | - }} |
== OTL Syntax == | == OTL Syntax == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | BooleanTerm | + | BooleanTerm DiagCom.IsPositive(ResponseTerm response); |
</syntaxhighlight> | </syntaxhighlight> | ||
== Description == | == Description == | ||
− | The '''IsPositive''' term | + | The '''IsPositive''' term checks whether a response is positive. It accepts a '''ResponseTerm'''. For details on response states, please refer to the [[Extensions.DiagCom.ResponseState|ResponseState]] data type |
− | {{TermReturnValue| [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | True if the response is positive, otherwise false.}} | + | {{TermReturnValue| [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | Returns True if the '''response''' is positive, otherwise false.}} |
== Properties == | == Properties == | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
− | {{ | + | {{TableRowPropertie2| Response | [[Extensions.DiagCom.Response|Response]] | [[Term]] | - | [1] | The '''Response''' which will be checked for being positive.}} |
|} | |} | ||
== Examples == | == Examples == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
+ | /// Local Declarations | ||
+ | |||
DiagCom.Result Result1; | DiagCom.Result Result1; | ||
DiagCom.Response Response1; | DiagCom.Response Response1; | ||
− | |||
Boolean Boolean1 = false; | Boolean Boolean1 = false; | ||
DiagCom.ComChannel ComChannel1; | DiagCom.ComChannel ComChannel1; | ||
− | ComChannel1 = DiagCom.GetComChannel(" | + | /// Flow |
− | DiagCom.ExecuteDiagService(DiagCom.CreateDiagServiceByName(ComChannel1, " | + | |
+ | ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "EV_GatewLear_006", false); | ||
+ | [#MetaData(RequestPdu), <#Data>22 01 00</#Data>] | ||
+ | DiagCom.ExecuteDiagService(DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_ReadDataByIdentActuaTestStatu"), {}, {}, Result1, NULL, false, false); | ||
Response1 = DiagCom.GetFirstResponse(Result1); | Response1 = DiagCom.GetFirstResponse(Result1); | ||
− | |||
Boolean1 = DiagCom.IsPositive(Response1); | Boolean1 = DiagCom.IsPositive(Response1); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== See also == | == See also == | ||
+ | [[Extensions.DiagCom.GetComChannel|GetComChannel]] <br/> | ||
+ | [[Extensions.DiagCom.CreateDiagServiceByName|CreateDiagServiceByName]] <br/> | ||
+ | [[Extensions.DiagCom.CreateDiagServiceBySemantic|CreateDiagServiceBySemantic]] <br/> | ||
+ | [[Extensions.DiagCom.ExecuteDiagService|ExecuteDiagService]] <br/> | ||
+ | [[Extensions.DiagCom.GetFirstResult|GetFirstResult]] <br/> | ||
+ | [[Extensions.DiagCom.GetAllResults|GetAllResults]] <br/> | ||
[[Extensions.DiagCom.GetAllResponses|GetAllResponses]] <br/> | [[Extensions.DiagCom.GetAllResponses|GetAllResponses]] <br/> | ||
[[Extensions.DiagCom.GetFirstResponse|GetFirstResponse]] <br/> | [[Extensions.DiagCom.GetFirstResponse|GetFirstResponse]] <br/> | ||
− | [[Extensions.DiagCom. | + | [[Extensions.DiagCom.GetResponseState|GetResponseState]] <br/> |
− |
Latest revision as of 10:14, 12 September 2019
Contents
Classification
Name | IsPositive |
Short Description | Checks whether a response is positive |
Class | Term |
Extension | OTX DiagCom extension |
Group | Response related terms |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
BooleanTerm DiagCom.IsPositive(ResponseTerm response);
Description
The IsPositive term checks whether a response is positive. It accepts a ResponseTerm. For details on response states, please refer to the ResponseState data type
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
Boolean | Returns True if the response is positive, otherwise false. |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Response | Response | Term | - | [1] | The Response which will be checked for being positive. |
Examples
/// Local Declarations
DiagCom.Result Result1;
DiagCom.Response Response1;
Boolean Boolean1 = false;
DiagCom.ComChannel ComChannel1;
/// Flow
ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "EV_GatewLear_006", false);
[#MetaData(RequestPdu), <#Data>22 01 00</#Data>]
DiagCom.ExecuteDiagService(DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_ReadDataByIdentActuaTestStatu"), {}, {}, Result1, NULL, false, false);
Response1 = DiagCom.GetFirstResponse(Result1);
Boolean1 = DiagCom.IsPositive(Response1);
See also
GetComChannel
CreateDiagServiceByName
CreateDiagServiceBySemantic
ExecuteDiagService
GetFirstResult
GetAllResults
GetAllResponses
GetFirstResponse
GetResponseState