Calls the event that is passed in the policy configuration. The event occurs if this is allowed by the transition function for the current state. When the event occurs, the clock for this event is reset to zero.
Type: call
policy
Syntax
event <configuration> ()
Policy configuration
<configuration> ::= <event>
Configuration elements
|
Name of the event in the family instance configuration. |
Returned value
KSS_GRANT
if the event occurrence is allowed by the transition function for the current state, or KSS_DENY
if it is not allowed.
Example
...
policy era0_event = era0.event;
entity foo {
...
/* when the on function is called,
the event occurs and there is a transition to the process state. Moreover,
a repeat call of the on function will not be executed
until the restart policy is called */
security call on = era0_event request;
/* if era0 is in the process state
and the off function is called, the response event occurs
and era0 transitions to the final state of stop */
security call off = era0_event response;
}