Extensions.DiagCom.GetAllResultsAndClear

From emotive
Jump to navigation Jump to search

Classification

Name GetAllResultsAndClear
Short Description Gets all available result objects of a diagnostic services and clears the result buffer
Class Action
Extension OTX DiagCom extension
Group DiagService related actions
Exceptions DiagCom_Chk002
Checker Rules -
Standard Compliant Yes

OTL Syntax

DiagCom.GetAllResultsAndClear(DiagServiceValue diagService, ListVariable resultList);

Description

The GetAllResultsAndClear activity retrieves all available result entries from a diagnostic service and then clears the diagnostic communication system’s result buffer. The results are provided as a list of Result elements

The DiagCom action GetAllResultsAndClear fetches all results present at the time of the call out of the communication component's result buffer and tells the communication component to clear the buffer afterwards. The list of results that is returned to OTX will be in ascending order from first (oldest) to last (most recent) result.

Properties

Name Data Type Class Default Cardinality Description
DiagService DiagService Value - [1] This element specifies the diagnostic service to retrieve results from.
ResultList List Variable - [1] This element specifies the List to which the list of Result items will be assigned.

OTL Examples

/// Local Declarations

DiagCom.ComChannel ComChannel1;
DiagCom.DiagService DiagService1;
List<DiagCom.Result> ListOfResults1;

/// Flow

ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "", false);
DiagService1 = DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_ReadDataByIdentActuaTestStatu");
[#MetaData(RequestPdu), <#Data>22 01 00</#Data>]
DiagCom.ExecuteDiagService(DiagService1, {}, {}, NULL, NULL, false, false);
DiagCom.GetAllResultsAndClear(DiagService1, ListOfResults1);

See also

GetComChannel
CreateDiagServiceByName
CreateDiagServiceBySemantic
ExecuteDiagService
GetAllResults
GetFirstResult