Evaluation Environment for AUTOSAR-Autocode in Motor Control ...
Evaluation Environment for AUTOSAR-Autocode in Motor Control ...
Evaluation Environment for AUTOSAR-Autocode in Motor Control ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
2.4 Basic Concepts<br />
OperationInvokedEvent This event is called when an operation <strong>for</strong> a server port<br />
is <strong>in</strong>voked. The event is specified with the port and with the operation <strong>for</strong> which it<br />
should occur.<br />
AsynchronousServerCallReturnsEvent If an asynchronous call is used to <strong>in</strong>voke<br />
an operation on a server, the result of the server call can be fetched at later time. This<br />
event shows, that the server is f<strong>in</strong>ished and the result is available. It is specified <strong>for</strong> a<br />
client port and an operation, which is called by the client.<br />
ModeSwitchEvent For this event a mode and an action “entry” or “exit” has to<br />
be specified. The event arises when the specified mode is entered or exited, depend<strong>in</strong>g<br />
on which action is specified.<br />
Every event can trigger a runnable, but not every event can wake up a WaitPo<strong>in</strong>t.<br />
The events, which can wake up a WaitPo<strong>in</strong>t, are DataReceivedEvents, DataSendCompletedEvents<br />
and AsynchronousServerCallReturnsEvents.<br />
Inter Runnable Variable<br />
Ports def<strong>in</strong>e the <strong>in</strong>teraction between SWCs, or more precise the <strong>in</strong>teraction between<br />
the runnables of the SWCs. For runnables of one SWC another mechanism <strong>for</strong> <strong>in</strong>ternal<br />
communication exists. These are the Inter Runnable Variables (IRVs), which can be<br />
accessed by the runnables. Runnables could also use global variables <strong>for</strong> this <strong>in</strong>ternal<br />
communication, but with IRVs protection mechanism are provided by the RTE <strong>for</strong><br />
concurrency.<br />
Exclusive Area<br />
Exclusive Area are a similar mechanism to the operat<strong>in</strong>g system resources described <strong>in</strong><br />
section 2.3.3. Exclusive areas just provide mutual exclusive access <strong>for</strong> the runnables of<br />
one SWC, but not <strong>for</strong> the whole task. Exclusive areas can be implemented with operat<strong>in</strong>g<br />
system resources, but this is no requirement. There can be other implementation<br />
possibilities specified like e.g. <strong>in</strong>terrupt–disabl<strong>in</strong>g.<br />
2.4.5 Modes<br />
Modes have the simple purpose that components can provide a different behavior<br />
depend<strong>in</strong>g on which mode is active. The mode can be distributed from a component<br />
through ports to other components. Typical modes <strong>for</strong> a motor control unit are<br />
“Start”, “Drive” and “Stop”.<br />
A mode has to be distributed through a port, because there must be the possibility<br />
to provide modes to other ECUs. RTE Events can be disabled <strong>in</strong> a mode. Then<br />
the event is prevented, if a special mode is active. This makes it possible to execute<br />
runnables just <strong>in</strong> one mode. A ModeSwitchEvent responds directly to a mode switch.<br />
It triggers a runnable if a special mode is entered or left. These runnables can be used<br />
to clean up the old mode or prepare the new mode.<br />
13