Difference between revisions of "Extensions.DiagCom.IsPositive"

From emotive
Jump to navigation Jump to search
 
(One intermediate revision by one other user not shown)
Line 5: Line 5:
 
== OTL Syntax ==
 
== OTL Syntax ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
BooleanTerm DiagCom.IsPositive(ResponseTerm Response);
+
BooleanTerm DiagCom.IsPositive(ResponseTerm response);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 16: Line 16:
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie2| Response | [[Extensions.DiagCom.Response|Response]] | [[Term]] | - | [1] | The '''Response''' which shall be checked for being positive.}}
+
{{TableRowPropertie2| Response | [[Extensions.DiagCom.Response|Response]] | [[Term]] | - | [1] | The '''Response''' which will be checked for being positive.}}
 
|}
 
|}
  

Latest revision as of 10:14, 12 September 2019

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.

Icons Note.png 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