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

A Step-by-Step Design of a Trivial Fesa Class

Here we want to explain step-by-step the design of a trivial Fesa class. In code fragments shown in this step-by-step tutorial, the class is called HBrTrivial. But any other name works too. We start by defining, what the class should do (always a good starting point):
  • The class will return as data a random value according to v = offset + random() % range - range / 2.
  • The values for offset and range are settable fields of the class.
  • The class will return as status the time since the start or last reset.
  • The class can be reset, i.e. the time counter set to 0.
  • The class will acquire data and status using the internal periodic timer.

As of 2009-03-18 there are problems with external timing under Fesa version 2.10. As we do not use external timing in this trivial class, it should run under 2.10 as well as under 2.9.

  1. Designing the class
    1. Creating an empty design
    2. Creating the data fields
    3. Creating the interface
    4. Events, Actions and Schedules
    5. Save the design !
  2. Creating and Modifying the C++ code
  3. Deploying and Instances - FEC specific stuff
  4. Running and Testing the class
Topic revision: r3 - 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