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

Designing the Fesa Class

Creating the data fields

The next step is to add the required data fields to the design. The data fields reflect all data associated with the class. They also reflect internal data, which is not communicated to the outside like hardware registers etc. To add a data field, select device-data and right-click to open the popup menu. From the popup menu select Add / field to add a standard data field and fill in the required data. The image shows the properties for the 'offset' parameter.

StepByStep4.png

Because the 'offset' is a settable parameter of our class, we make it PERSISTENT. This has two effects: First we can define an initial value later on, when we create an instance of the class. Second, the value is stored when the running class is terminated. In contrast, data which changes frequently like acuired data or the random value our class will calculate should be given the persistency VOLATILE. Immutable data fields, like for example VME addresses, should be given the FINAL persitency.

StepByStep5.png

The image above shows the 5 data fields required for our class. The fields 'offset' and 'range' are adjustable settings of our class and are persistent. The field 'value' is randomly calculated from the 'offset' and 'range' settings everytime acquired data is requested from the class. It is thus volatile. The fields 'runTime' and 'startTime' are required to return the status of the Fesa class. 'startTime' will hold the unix time when the class was started on the FEC or when the last reset of the class was issued. 'runTime' will hold the current running time in seconds since 'startTime'. Both fields are of course volatile.

I Attachment Action Size Date Who Comment
StepByStep4.pngpng StepByStep4.png manage 8 K 18 Mar 2009 - 14:52 HaraldBraeuning Creating the data fields
StepByStep5.pngpng StepByStep5.png manage 2 K 18 Mar 2009 - 14:59 HaraldBraeuning The data fields of the class
Topic revision: r1 - 18 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