Extensions.DiagCom.GetDiagServiceFromEvent
Jump to navigation
Jump to search
Contents
Classification
Name | GetDiagServiceFromEvent |
Short Description | Gets a handle to the DiagService object that caused the event |
Class | Term |
Extension | OTX DiagCom extension |
Group | Event related terms |
Exceptions | TypeMismatchException |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
DiagServiceTerm DiagCom.GetDiagServiceFromEvent(EventValue event);
Description
The GetDiagServiceFromEvent term accepts an EventValue term yielding an Event object that has been raised by the OTX runtime, as a result of declaring a DiagService object as an event source by using the term DiagServiceEventSource. It returns a handle to the DiagService object that caused the event (i.e. because a new ECU Result has been received after the DiagService has been executed). By using this term, an OTX sequence can wait for an Event raised by a DiagService receiving a new Result and then evaluate the Result/Response structure of that DiagService.
Return Value
The Term returns the value, see table below.
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
DiagService | The DiagService object that caused the event. |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Event | Event | Value | - | [1] | Represents the event that was raised by the DiagService that will be retrieved. |
OTL Examples
/// Local Declarations
DiagCom.DiagService DiagService1;
EventHandling.EventSource EventSource1;
EventHandling.Event Event1;
DiagCom.DiagService DiagServiceFromEvent1;
DiagCom.ComChannel ComChannel1;
/// Flow
ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "", false);
DiagService1 = DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_DiagnSessiContr");
EventSource1 = DiagCom.DiagServiceEventSource(DiagService1);
parallel
{
lane
{
[#MetaData(RequestPdu), <#Data>10 01</#Data>]
DiagCom.ExecuteDiagService(DiagService1, {}, {}, NULL, NULL, true, false);
}
lane
{
EventHandling.WaitForEvent({EventSource1}, Event1);
DiagServiceFromEvent1 = DiagCom.GetDiagServiceFromEvent(Event1);
}
}
See also
GetComChannel
CreateDiagServiceByName
ExecuteDiagService
WaitForEvent
DiagServiceEventSource
IsDiagServiceEvent