Difference between revisions of "Extensions.DiagCom.IsDiagServiceEvent"

From emotive
Jump to navigation Jump to search
Line 1: Line 1:
 
{{DISPLAYTITLE:OTX '''IsDiagServiceEvent'''}}[[Category:DiagCom]]
 
{{DISPLAYTITLE:OTX '''IsDiagServiceEvent'''}}[[Category:DiagCom]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | IsDiagServiceEvent | Checks whether an event was rased to a diagnostic service | [[Term]] | [[Extensions.DiagCom|OTX DiagCom extension]] | [[Event related terms]] | - | - }}
+
{{ClassificationActivity | IsDiagServiceEvent | Checks the type of the Event | [[Term]] | [[Extensions.DiagCom|OTX DiagCom extension]] | [[Event related terms]] | - | - }}
  
 
== OTL Syntax ==
 
== OTL Syntax ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
BooleanTerm = DiagCom.IsDiagServiceEvent(EventTerm);
+
BooleanTerm = DiagCom.IsDiagServiceEvent(EventValue);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== Description ==
 
== Description ==
The '''IsDiagServiceEvent''' term checks whether the passed event so was rased to a diagnostic service on the [[Extensions.DiagCom.DiagServiceEventSource|DiagServiceEventSource]] was generated term or not, see [[Event Library]].
+
The '''IsDiagServiceEvent''' term accepts an '''EventValue''' term yielding an [[Extensions.EventHandling.Event|Event]] object that has been raised by the OTX runtime, as a result of declaring a [[Extensions.DiagCom.DiagService|DiagService]] object as an event source by using the term [[Extensions.DiagCom.DiagServiceEventSource|DiagServiceEventSource]]. The term shall return '''true''' if and only if the [[Extensions.EventHandling.Event|Event]] originates from a [[Extensions.DiagCom.DiagServiceEventSource|DiagServiceEventSource]] term.
  
{{TermReturnValue| [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | True if and only if the Eventoriginates from a [[Extensions.DiagCom.DiagServiceEventSource|DiagServiceEventSource]] term, otherwise false.}}
+
{{TermReturnValue| [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | Returns '''true''' if and only if the [[Extensions.EventHandling.Event|Event]] originates from a [[Extensions.DiagCom.DiagServiceEventSource|DiagServiceEventSource]] term, otherwise '''false'''.}}
  
 
== Properties ==
 
== Properties ==
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie1| Event | [[Extensions.EventHandling.Event|Event]] | [[Term]] | - | [1] | Represents the Eventwhose type shall be tested.}}
+
{{TableRowPropertie2| Event | [[Extensions.EventHandling.Event|Event]] | [[Value]] | - | [1] | Represents the '''Event''' whose type shall be tested.}}
 
|}
 
|}
  
 
== 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;
 
EventHandling.Event Event1;
 
EventHandling.Event Event1;
Boolean Boolean1 = false;
+
DiagCom.ComChannel ComChannel1;
 +
Boolean Boolean1;
  
myComCannel = DiagCom.GetComChannel("LL_AirbaUDS", null, false);
+
/// Flow
DiagService1 = DiagCom.CreateDiagServiceByName(myComCannel, "DiagnServi_ReadDataByIdentBasicSettiStatu");
+
 
 +
ComChannel1 = DiagCom.GetComChannel("LL_GatewUDS", "", false);
 +
DiagService1 = DiagCom.CreateDiagServiceByName(ComChannel1, "DiagnServi_DiagnSessiContr");
 
EventSource1 = DiagCom.DiagServiceEventSource(DiagService1);
 
EventSource1 = DiagCom.DiagServiceEventSource(DiagService1);
  
 
parallel
 
parallel
 
{
 
{
  lane
+
lane
  {
+
{
      DiagCom.ExecuteDiagService(DiagService1, {}, {}, false, false);
+
DiagCom.ExecuteDiagService(DiagService1, {}, {}, NULL, NULL, false, false);
  }
+
}
  lane
+
lane
  {
+
{
      EventHandling.WaitForEvent({EventSource1}, Event1);
+
EventHandling.WaitForEvent({EventSource1}, Event1);
  }
+
}
 
}
 
}
  
Line 47: Line 49:
  
 
== 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.DiagServiceEventSource|DiagServiceEventSource]]
 
[[Extensions.DiagCom.DiagServiceEventSource|DiagServiceEventSource]]

Revision as of 11:22, 15 October 2018

Classification

Name IsDiagServiceEvent
Short Description Checks the type of the Event
Class Term
Extension OTX DiagCom extension
Group Event related terms
Exceptions -
Checker Rules -
Standard Compliant Yes

OTL Syntax

BooleanTerm = DiagCom.IsDiagServiceEvent(EventValue);

Description

The IsDiagServiceEvent 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. The term shall return true if and only if the Event originates from a 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
Boolean Returns true if and only if the Event originates from a DiagServiceEventSource term, otherwise false.

Properties

Name Data Type Class Default Cardinality Description
Event Event Value - [1] Represents the Event whose type shall be tested.

OTL Examples

DiagCom.DiagService DiagService1;
EventHandling.EventSource EventSource1;
EventHandling.Event Event1;
DiagCom.ComChannel ComChannel1;
Boolean Boolean1;

/// Flow

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

parallel
{
	lane
	{
		DiagCom.ExecuteDiagService(DiagService1, {}, {}, NULL, NULL, false, false);
	}
	lane
	{
		EventHandling.WaitForEvent({EventSource1}, Event1);
	}
}

Boolean1 = DiagCom.IsDiagServiceEvent(Event1);

See also

GetComChannel
CreateDiagServiceByName
ExecuteDiagService
WaitForEvent
GetDiagServiceFromEvent
DiagServiceEventSource