Difference between revisions of "Extensions.DiagCom.DiagServiceEventSource"

From emotive
Jump to navigation Jump to search
Line 1: Line 1:
 
{{DISPLAYTITLE:OTX '''DiagServiceEventSource'''}}[[Category:DiagCom]]
 
{{DISPLAYTITLE:OTX '''DiagServiceEventSource'''}}[[Category:DiagCom]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | DiagServiceEventSource | Binds a diagnosis service to an event handling source | [[Term]] | [[Extensions.DiagCom|OTX DiagCom extension]] | [[Event related terms]] | - | - }}
+
{{ClassificationActivity | DiagServiceEventSource | Binds a diagnosis service to an event handling source | [[Term]] | [[Extensions.DiagCom|OTX DiagCom extension]] | [[Extensions.DiagCom#Terms|Event related terms]] | - | - }}
  
 
== OTL Syntax ==
 
== OTL Syntax ==
Line 9: Line 9:
  
 
== Description ==
 
== Description ==
The '''DiagServiceEventSource''' term binds the given diagnosis service to an event handling source, see [[Event Library]].
+
The '''DiagServiceEventSource''' term accepts a [[Extensions.DiagCom.DiagService|DiagService]] object that is to be made an event source. A [[Extensions.DiagCom.DiagService|DiagService]] shall trigger an event every time a new [[Extensions.DiagCom.Result|Result]] has arrived.The '''DiagServiceEventSource''' term is the complementary functionality to the asynchronous execution feature of the [[Extensions.DiagCom.ExecuteDiagService|ExecuteDiagService]] action: when [[Extensions.DiagCom.ExecuteDiagService|ExecuteDiagService]] is used with '''<executeAsync>''' set to true, the only way to be notified of available results for the executed diagnostic service is to use it as an event source through the '''DiagServiceEventSource''' term.
 
 
The functionality of the '''DiagServiceEventSource''' term is the counterpart of the asynchronous mode in the [[Extensions.DiagCom.ExecuteDiagService|ExecuteDiagService]] activity. Every time a new result is received from the control unit, an event is triggered.
 
  
 
{{TermReturnValue| [[Extensions.EventHandling.EventSource|EventSource]] | Source for event handling}}
 
{{TermReturnValue| [[Extensions.EventHandling.EventSource|EventSource]] | Source for event handling}}
Line 18: Line 16:
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie1| DiagService | [[Core.DataTypes.ComplexDataType.DiagService|DiagService]] | [[Term]] | - | [1] | Represents the [[Core.DataTypes.ComplexDataType.DiagService|DiagService]] that shall be connected to the event source.}}
+
{{TableRowPropertie1| DiagService | [[Extensions.DiagCom.DiagService|DiagService]] | [[Term]] | - | [1] | Represents the '''DiagService''' that shall be connected to the event source.}}
 
|}
 
|}
  
 
== OTL Examples ==
 
== OTL Examples ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
DiagCom.ComChannel myComCannel;
 
 
DiagCom.DiagService DiagService1;
 
DiagCom.DiagService DiagService1;
 
EventHandling.EventSource EventSource1;
 
EventHandling.EventSource EventSource1;
 +
DiagCom.ComChannel ComChannel1;
 +
 +
/// Flow
  
myComCannel = DiagCom.GetComChannel("LL_AirbaUDS", null, false);
+
ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "", false);
DiagService1 = DiagCom.CreateDiagServiceByName(myComCannel, "DiagnServi_ReadDataByIdentBasicSettiStatu");
+
DiagService1 = DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_DiagnSessiContr");
 
EventSource1 = DiagCom.DiagServiceEventSource(DiagService1);
 
EventSource1 = DiagCom.DiagServiceEventSource(DiagService1);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== See also ==
 
== See also ==
 +
[[Extensions.DiagCom.GetComChannel|GetComChannel]] <br/>
 +
[[Extensions.DiagCom.CreateDiagServiceByName|CreateDiagServiceByName]] <br/>
 +
[[Extensions.DiagCom.ExecuteDiagService|ExecuteDiagService]] <br/>
 +
[[Extensions.EventHandling.WaitForEvent|WaitForEvent]] <br/>
 
[[Extensions.DiagCom.GetDiagServiceFromEvent|GetDiagServiceFromEvent]] <br/>
 
[[Extensions.DiagCom.GetDiagServiceFromEvent|GetDiagServiceFromEvent]] <br/>
 
[[Extensions.DiagCom.IsDiagServiceEvent|IsDiagServiceEvent]]
 
[[Extensions.DiagCom.IsDiagServiceEvent|IsDiagServiceEvent]]

Revision as of 11:34, 15 October 2018

Classification

Name DiagServiceEventSource
Short Description Binds a diagnosis service to an event handling source
Class Term
Extension OTX DiagCom extension
Group Event related terms
Exceptions -
Checker Rules -
Standard Compliant Yes

OTL Syntax

EventSourceTerm = DiagCom.DiagServiceEventSource(DiagServiceTerm);

Description

The DiagServiceEventSource term accepts a DiagService object that is to be made an event source. A DiagService shall trigger an event every time a new Result has arrived.The DiagServiceEventSource term is the complementary functionality to the asynchronous execution feature of the ExecuteDiagService action: when ExecuteDiagService is used with <executeAsync> set to true, the only way to be notified of available results for the executed diagnostic service is to use it as an event source through the DiagServiceEventSource term.

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
EventSource Source for event handling

Properties

Name Data Type Class Default Cardinality Description
DiagService DiagService Term - [1] Represents the DiagService that shall be connected to the event source.

OTL Examples

DiagCom.DiagService DiagService1;
EventHandling.EventSource EventSource1;
DiagCom.ComChannel ComChannel1;

/// Flow

ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "", false);
DiagService1 = DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_DiagnSessiContr");
EventSource1 = DiagCom.DiagServiceEventSource(DiagService1);

See also

GetComChannel
CreateDiagServiceByName
ExecuteDiagService
WaitForEvent
GetDiagServiceFromEvent
IsDiagServiceEvent