Difference between revisions of "Extensions.DiagCom.IsPositive"

From emotive
Jump to navigation Jump to search
Line 11: Line 11:
 
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  
 
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]] | Returns 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 ==

Revision as of 10:00, 12 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

BooleanTerm = 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

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