Difference between revisions of "Extensions.DiagCom.IsPositive"

From emotive
Jump to navigation Jump to search
Line 1: Line 1:
 
{{DISPLAYTITLE:OTX '''IsPositive'''}}[[Category:DiagCom]]
 
{{DISPLAYTITLE:OTX '''IsPositive'''}}[[Category:DiagCom]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | IsPositive | Test, a response to positive or negative | [[Term]] | [[Extensions.DiagCom|OTX DiagCom extension]] | [[Response related terms]] | - | - }}
+
{{ClassificationActivity | IsPositive | Checks whether a response is positive | [[Term]] | [[Extensions.DiagCom|OTX DiagCom extension]] | [[Extensions.DiagCom#Terms|Response related terms]] | - | - }}
  
 
== OTL Syntax ==
 
== OTL Syntax ==
Line 9: Line 9:
  
 
== Description ==
 
== Description ==
The '''IsPositive''' term tests whether the specified response is positive or negative.
+
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}}
{{TableRowPropertie1| Response | [[Extensions.DiagCom.Response|Response]] | [[Term]] | - | [1] | Response object.}}
+
{{TableRowPropertie2| Response | [[Extensions.DiagCom.Response|Response]] | [[Term]] | - | [1] | The Response which shall be checked for being positive.}}
 
|}
 
|}
  
Line 23: Line 23:
 
DiagCom.Result Result1;
 
DiagCom.Result Result1;
 
DiagCom.Response Response1;
 
DiagCom.Response Response1;
DiagCom.ResponseState ResponseState1 = @ResponseStates:FAILED;
 
 
Boolean Boolean1 = false;
 
Boolean Boolean1 = false;
 
DiagCom.ComChannel ComChannel1;
 
DiagCom.ComChannel ComChannel1;
  
ComChannel1 = DiagCom.GetComChannel("LL_AirbaUDS", null, false);
+
/// Flow
DiagCom.ExecuteDiagService(DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_ReadDataByIdentVWECUHardwVersiNumbe"), {}, {}, false, false, Result1);
+
 
 +
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);
ResponseState1 = DiagCom.GetResponseState(Response1);
 
 
Boolean1 = DiagCom.IsPositive(Response1);
 
Boolean1 = DiagCom.IsPositive(Response1);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== See also ==
 
== See also ==
[[Extensions.DiagCom.GetAllResponses|GetAllResponses]] <br/>
 
[[Extensions.DiagCom.GetFirstResponse|GetFirstResponse]] <br/>
 
 
[[Extensions.DiagCom.GetComChannel|GetComChannel]] <br/>
 
[[Extensions.DiagCom.GetComChannel|GetComChannel]] <br/>
 
[[Extensions.DiagCom.CreateDiagServiceByName|CreateDiagServiceByName]] <br/>
 
[[Extensions.DiagCom.CreateDiagServiceByName|CreateDiagServiceByName]] <br/>
Line 43: Line 42:
 
[[Extensions.DiagCom.GetFirstResult|GetFirstResult]] <br/>
 
[[Extensions.DiagCom.GetFirstResult|GetFirstResult]] <br/>
 
[[Extensions.DiagCom.GetAllResults|GetAllResults]] <br/>
 
[[Extensions.DiagCom.GetAllResults|GetAllResults]] <br/>
[[Extensions.DiagCom.GetAllResults|GetAllResults]] <br/>
+
[[Extensions.DiagCom.GetAllResponses|GetAllResponses]] <br/>
 +
[[Extensions.DiagCom.GetFirstResponse|GetFirstResponse]] <br/>
 +
[[Extensions.DiagCom.GetResponseState|GetResponseState]] <br/>

Revision as of 09:59, 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