Events are the lifeblood of all FSM-like systems. In many cases they consist of nothing but an integer representing the event-type, but in many other cases they carry additional information.
For instance, an application for access-control whould not only like to be informed whenever someone enters or leaves the building, but also *who* exactly is entering or leaving.
Furthermore, in the case of concurrent states, it is desirable to have some control over the propagation of events. Should they be restricted to the one SSM, or be broadcast to all the concurrent Ssm's.
In order to facilitate this, a PlanB event is represented by a series of words, which are composed using a simple grammar.
Type |
A single word defining the event type. |
Flags |
A single word defining the event flags (see below). |
Size |
A single word defining the size of the event. That is, the size of the additional arguments. |
Parameter list |
Any set of additional arguments. |
The BNF notation of the grammar hence can be defined as
event ::= <type> <flags> <size> <arglst>
type ::= <word>
flags ::= <word>
size ::= <word>
arglst ::= <word><arglst>
| <word>
word ::= system defined unsigned integer.
These events are not bound to the system in any other way, which allows them to be transmitted by any network, thus allowing PlanB to cooperate easily with other networked devices or instances of PlanB. Endian issues should be taken care of, but fall outside the scope of this document.