--
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.
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.
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.