Setting Default Values in GSI Template based FESA Software automatically

Using the GSI template to create FESA software from brings a couple of items which have to be filled with data. Since this is a procedure which occurs for every newly written FESA software a helper class is provided. This helper class assists filling in device fields such as status, detailedStatus, powerState, control, interlock, opReady, moduleStatus and modulesReady with default values. Of course these values are dependent on the actual hardware and have to be adapted for actual device states!


  • Download the class DefaultValueAutomation into your FESA class project: workspace/<FESAclass>/src/<FESAclass>/RealTime/UserCode
  • Replace the FESA class name "AnOpClass" by your FESA class name
  • Include the DefaultValueAutomation class header in you RealTime actions code:
  • #include <AnOpClass/RealTime/UserCode/DefaultValueAutomation.h>
  • Add the call of the function DefaultValueAutomation::fillDefaultDataAutomaticallyInRTAction into the device loop:
  •       const fesa::MultiplexingContext* context = pEvt->getMultiplexingContext();
          static_cast<void>(context); // This line prevents an "unused variable" warning, it can be removed safely.
          const Devices& devices = getFilteredDeviceCollection(pEvt);          
          for (Devices::const_iterator it = devices.begin(); it != devices.end(); ++it) {
              try {
                  Device* device = *it;
                  static_cast<void (device); // This line prevents an "unused variable" warning, it can be removed safely 
                  // Apply default settings per device
                  DataFillAutomation dfa;
                  dfa.fillAutomaticallyInRTAction(pEvt, device);
              } catch (const fesa::FesaException& exception) {
                  LOG_ERROR_IF(logger, exception.getMessage());

-- SolveighMatthies - 14 Aug 2017
Topic revision: r1 - 14 Aug 2017, SolveighMatthies
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