Difference between revisions of "Extensions.DiagCom.GetDiagServiceFromEvent"

From emotive
Jump to navigation Jump to search
Line 3: Line 3:
 
{{ClassificationActivity | GetDiagServiceFromEvent | Diagnostics service event handler source | [[Term]] | [[DiagCom|OTX DiagCom extension]] | [[Event related terms]] | [[TypeMismatchException]] | - }}
 
{{ClassificationActivity | GetDiagServiceFromEvent | Diagnostics service event handler source | [[Term]] | [[DiagCom|OTX DiagCom extension]] | [[Event related terms]] | [[TypeMismatchException]] | - }}
  
== Pseudo-Code Syntax ==
+
== OTL Syntax ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
DiagService GetDiagServiceFromEvent(Event source);
+
DiagServiceTerm = DiagCom.GetDiagServiceFromEvent(EventTerm);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 19: Line 19:
 
|}
 
|}
  
== Examples ==
+
== OTL Examples ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
DiagService result = GetDiagServiceFromEvent(event);
+
DiagCom.ComChannel myComCannel;
 +
DiagCom.DiagService DiagService1;
 +
EventHandling.EventSource EventSource1;
 +
EventHandling.Event Event1;
 +
DiagCom.DiagService DiagService2;
 +
 
 +
myComCannel = DiagCom.GetComChannel("LL_AirbaUDS", null, false);
 +
DiagService1 = DiagCom.CreateDiagServiceByName(myComCannel, "DiagnServi_ReadDataByIdentBasicSettiStatu");
 +
EventSource1 = DiagCom.DiagServiceEventSource(DiagService1);
 +
 
 +
parallel
 +
{
 +
lane
 +
{
 +
DiagCom.ExecuteDiagService(DiagService1, {}, {}, false, false);
 +
}
 +
lane
 +
{
 +
EventHandling.WaitForEvent({EventSource1}, Event1);
 +
}
 +
}
 +
 
 +
DiagService2 = DiagCom.GetDiagServiceFromEvent(Event1);
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Revision as of 08:10, 6 February 2015

Classification

Name GetDiagServiceFromEvent
Short Description Diagnostics service event handler source
Class Term
Extension OTX DiagCom extension
Group Event related terms
Exceptions TypeMismatchException
Checker Rules -
Standard Compliant Yes

OTL Syntax

DiagServiceTerm = DiagCom.GetDiagServiceFromEvent(EventTerm);

Description

The GetDiagServiceFromEvent term returns associated with the event handling source Diagnostics Service, see Event Library. Thus, this term is the opposite of 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
DiagService Diagnostics Service.

Properties

Name Data Type Class Default Cardinality Description
Event Event Term - [1] Represents the event that was raised by the DiagService that shall be retrieved.

OTL Examples

DiagCom.ComChannel myComCannel;
DiagCom.DiagService DiagService1;
EventHandling.EventSource EventSource1;
EventHandling.Event Event1;
DiagCom.DiagService DiagService2;

myComCannel = DiagCom.GetComChannel("LL_AirbaUDS", null, false);
DiagService1 = DiagCom.CreateDiagServiceByName(myComCannel, "DiagnServi_ReadDataByIdentBasicSettiStatu");
EventSource1 = DiagCom.DiagServiceEventSource(DiagService1);

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

DiagService2 = DiagCom.GetDiagServiceFromEvent(Event1);

See also

DiagServiceEventSource
IsDiagServiceEvent