You are here: Foswiki>FESA Web>HowTo>StepByStep>StepByStepDesign3 (19 Mar 2009, HaraldBraeuning)Edit Attach
-- HaraldBraeuning - 19 Mar 2009

Events, Actions and Schedules

Usually, a Fesa device is triggered by external events. On such events, real time (RT) actions are executed, which read out the hardware and store the data in the device data fields. Scheduling units bind the events to the real time actions.

Actions

First we add two RT actions named 'Acquire' and 'AcquireStatus' to the actions field of our design. The name of actions should always be verbs indicating the function of the action. An empty 'notified-property' field is automatically created. This field is optional and specifies the property which is notified, whenever the RT action is called. External programs like GUIs can subscribe to properties and will automatically recieve the new data, when the property is notified by the RT action. More than one 'notified-property' fields can be added to a single RT action. In out design, the 'Acquire' action notifies the 'Data' property and the 'AcquireStatus' action notifies the 'Status' property.

StepByStep8.png

Events

Next we define the events on which our Fesa class should react. If you selected the empty design at the beginning, you have first to create the 'events' field for the 'standard-class'. In the 'events' field we create two 'logical-events' named 'AcquireEvent' and 'AcquireStatusEvent'. Their purpose is evident from the names. They are automatically created as timer event as indicated by the 'timer' field. This field can be replaced if necessary by other event types like 'user' event or a reference to a custom event source.

StepByStep9.png

Scheduling

Finally we define the scheduling to bind the events and RT actions together. If you selected the empty design at the beginning, you have first to create the 'scheduling' field for the 'standard-class'. One empty scheduling unit is automatically created. The description field is optional but it is always good practice to use it. We name the first scheduling unit 'Acquire'. In the 'rt-action-ref' field we select the 'Acquire' RT action and under 'trigger' in the 'explicit-event-ref' we select the correspondiong 'AcquireEvent'. This bind the RT action 'Acquire' to the event 'AcquireEvent'. We then create a similar scheduling unit for the 'AcquireStatus' RT action and 'AcquireStatusEvent'.

StepByStep10.png

This also concludes the design phase of our Fesa class.
I Attachment Action Size Date Who Comment
StepByStep10.pngpng StepByStep10.png manage 4 K 19 Mar 2009 - 11:41 HaraldBraeuning Defining the scheduling units
StepByStep8.pngpng StepByStep8.png manage 2 K 19 Mar 2009 - 11:40 HaraldBraeuning Definig the actions
StepByStep9.pngpng StepByStep9.png manage 2 K 19 Mar 2009 - 11:40 HaraldBraeuning Defining the events
Topic revision: r1 - 19 Mar 2009, HaraldBraeuning
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback