Difference between revisions of "Extensions.DiagCom.IsPositive"

From emotive
Jump to navigation Jump to search
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);
+
/// Local Declarations
 +
Boolean BooleanVariable = false;
 +
/// Flow
 +
BooleanVariable = DiagCom.IsPositive(ResponseTerm);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 21: Line 24:
 
== 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;

Revision as of 10:41, 23 October 2018

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

/// Local Declarations
Boolean BooleanVariable = false;
/// Flow
BooleanVariable = DiagCom.IsPositive(ResponseTerm);

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 shall 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