FESA3 2.2.2/2.3.2 FAQ - Frequently Asked Questions


Working with Projects in Eclipse


  • How to import an existing FESA class/FESA deploy-unit into the workspace ?
    • Copy the class to your workspace or check it out via SVN
    • Open the C++ perspective or the FESA perspective
    • File --> Import --> "Existing Projects into Workspace"
    • Browse to the root directory of the project(s) you want to add.
    • Select the project(s) to import.
    • Press "Finish"

Working with FESA3 in Eclipse


  • The default of a new value-item is scalar. How can I use arrays?
  • One way is to select the value-item's type <sclar> in the class design (Design View). Right-click to open the context menu and select the desired array, array2D, custom-type-array, etc .

value-item_scalar2array.png

The same works reverse, array types can be replaced by scalars as well.
  • How can I comment or copy nodes in the design view of a FESA design?
    • Right-click on any XML element and select <Comment> or <Copy> from the context menu.


Working with FESA3 on the commandline


  • Can I use FESA3 on the commandline? Can I write a shell script for frequently occuring FESA3 operations?
    • Yes. Frequently used operations from the FESA3 workflow are accessible via a commandline interface.
  • How can I use the FESA3 command line interface?
    • The FESA3 command line interface is based on JAVA. For Linux users in the fesa group on the as cluster the tool is fully accessible. Running 'fesa3' displays a list of the possible options. More information: https://www-acc.gsi.de/wiki/FESA/FESA3CLITool232

Plug-In Configuration


  • What can I do to see more log-messages?
    • In Window > Preferences > FESA > Log Preferences select the log level. Log level INFO allows to see detailed output of various FESA actions, e.g. the delivery paths during deployment.
  • How do I set Eclipse's Secure Storage master password?
    • E.g. the first time an SVN repository location is accessed the secure storage mechanism becomes active and asks the user to provide a master password. If a master password is entered the FESA plug-in requests this information during the start-up phase.
  • How do I reset Eclipse's Secure Storage master password?
    • On the Secure Storage Settings page in Window > Preferences > General > Security > Secure Storage select on the Contents tab the Default Secure Storage entry and press delete.
  • How do I get rid of obsolete perspectives in Eclipse, e.g. <FESA> / <<FESA>> after repeated updates or new installations of the FESA plug-in?
    • Open Window>Preferences>General>Perspectives, from the list of available perspectives delete the unwanted ones.
  • How do I convince the build console to appear automatically in the front during a build?
    • The full path for the console settings in Eclipse Kepler in the preferences is Window>Preferences>C++>Build>Console>Bring console to top when building (if present). It is also possible to search the preferences with the keyword "console" to find this option.

FESA Design


  • In setting properties warning recommend to introduce min-/max- items for each value-item. What is this?
    • The usage of min- and max- items per value-item is recommended to allow applications to define lower and upper bounds for these values. Otherwise they behave like normal value-items.

FESA Error Messages


  • What does "ERROR Exception: FESA_9006 Failed to restore the devices." mean?
    • This error is relatet to persistent data. If an xml file (<FESA class name>PersistentData.xml) containing persistent data is created during start of a deploy-unit because of persistent data fields in the class design the deploy-unit will not start a second time until the persistent data file is removed.
  • What does "rdaIOError Exception: FESA_13008 Partial setting not allowed for this property." mean?
    • The rda data container expects all desired data values to be used during call of the settings property.
  • What does the exception "FESA_13021 The field namedPositionNames has no data for the cycle selector ALL (no set was done before calling get).. " mean?
    • The exception relates to the content of the rolling buffer that is used internally for acquisition fields. If the content is empty when a get-Operation is performed the exception is thrown. To circumvent this exception it is recommened to fill the buffer, e.g. during initialization before reading it.
    • Another possibility is to remove the data-field-ref elements in the value-item definition of the acquisition property. Then it is possible to set the outgoing acquisition data in the C++ code of the get action for the acquisition property.
  • The deploy-unit crashes with the following error message:
    2015.04.21 13:44:51:250304 [[FESA.USR.BD.GeneratedCode.DeployMode]].BD_S.cpp generated/cpp/BD/GeneratedCode/DeployMode/BD_S.cpp:57 ERROR FESA_4025 Instantiation file error: The value '-2147483648' is not valid for the xml-attribute 'value' in '/instantiation-unit/classes/B/global-instance/configuration/deviceNameTimingReceiver/dim'.. src/fesa-core/Utilities/InstantiationElements/FieldElementImpl.cpp:137
    BD_S: /opt/gsi/3rdparty/boost/1.54.0/include/boost/thread/pthread/condition_variable.hpp:168: boost::condition_variable_any::~condition_variable_any(): Assertion `!pthread_mutex_destroy(&internal_mutex)' failed.
          
    • Since FESA3 2.2.2 the value of the deviceNameTimingReceiver element in the instance file is checked. The default value -2147483648 does not work. For simple tests it is sufficient to select a value >0 .


  • How do I treat the cryptic error messages in my instance file: "cvc-pattern-valid: Value ' {myStatusLabel1,myStatusLabel2}' is not facet-valid with respect to pattern '(\{)([ -z\{\}]*)(\})' for type '#AnonType_valueAdetailedStatus_labelsType'."
    • remove the carriage return / white space from the value element. Example:
                          <detailedStatus_labels idref="_150428095651_55">
                              <value>{myStatusLabel1,myStatusLabel2}</value>
                          </detailedStatus_labels>
            

FESA3 Software on a 64-bit FEC / on an 64-bit SCU


  • How do I mount the required FESA directories on a (virtual) front-end?
    • Create a directory matching the hostname of the (virtual) front-end in /common/export/nfsinit/ and provide a symbolic link to the FESA initialization script similar to the one in e.g. /common/export/nfsinit/vmla02/ .
  • How do I launch a FESA3 deploy-unit automatically on a (virtual) front-end?
  • How do I configure the deploy-unit to use White Rabbit based timing?
    • On an 64-bit FEC / SCU the damon launching the FESA deploy-unit automatically detects whether the deploy-unit uses White Rabbit based timing. The instantiation is parsed for expected information. The required parameters for the launch are applied only if the FAIR timing system is selected in the instantiation document.
  • How do I test whether my FESA software is running and accessible for applications?
    • Raphael M. kindly provided a tool ( see wiki page) to test the full stack from the top:
      /common/usr/cscosv/opt/cscosv-device-test/bin/cscosv-device-test.sh <device instance name> <property name>
    • The tool will not only print the data it received but also summarize at the end in which layer problems appeared. Example:
      ...
      --------------- Result Summary ---------------
      
          Device               : 'XYR01LB1'
          Property             : 'Status'
      
          Nameserver           : success
          CMW/RDA3 (get)       : success
          JAPC (get)           : success
          CMW/RDA3 (subscribe) : success
          JAPC (subscribe)     : success
    • The official wiki page: https://www-acc.gsi.de/wiki/Service/SvDeviceTest


  • How do I quickly test whether my FESA software is running and accessible via RDA3 directly?
    • Use the RDA3 C++ client software which is available for the FESA developers on the asl cluster:
    • get-rda3-c++, set-rda3-c++, subscribe-rda3-c++
user@asl73x:~> get-rda3-c++ -d TestDevice0 -p Status


FESA Framework Services


  • When is the persistency file written ?
    • The default interval is: 300 s (3 m). After a new setting was applied, a delay of 30 s is forced. As well there is a possibility to trigger persistency "by hand".
The default interval and the delay both can be configured in the fesa.cfg file. (On the asl cluster or on 32-bit FECs it is possible to pass the configuration file of your choice via an application argument )

Migrating to newer FESA3 FWK versions


  • After updating from FESA3 2.0.1 to FESA3 2.2.2 the following error occurs:
    "cvc-complex-type.2.4.a: Invalid content was found starting with element 'acquisition-context-field-ref'. One of '{beamProcessID}' is expected."
    • The element acqisition-context-field-ref element must be the last element of the acquisition-context-item. To resolve this error move this element behind the closing XML-tag of sequenceId.

Documentation


C++ Programming


  • How do I use C++ editing support?
    • Eclipse offers the possibility to define code fragments that can be inserted by typing the name of the fragment and pressing CTRL+SPACE. For C++ a huge collection is already available and can be configured in Window > Preferences > C/C++ > Editor > Templates. For FESA3 related code a collection of code templates is defined.
  • How do I place 2D-Arrays in the RDA data container using C++?
    • For example:
string testString = "This is a test string";
const char ** stringArray = new const char*[11];
for (int i = 0; i < 11 ; i++) {
stringArray[i] = testString.c_str();
}
long dims[2] = {11,25};
data.insert("dim_charArrayValue", dims, 2);
data.insert("charArrayValue", stringArray, 11);

  • How do I enable / disable my own DEBUG messages within a FESA class?
  • How do I use preprocessor directives to enable MOCK sections?
    • If the preprocessor directive is going to be reused within several source files:
      • Define a C++ helper class within <class project>/src/<class name>/Common/UserCode, e.g. <class name>Helper, make sure you have the same namespace as the FESA class itself
      • define the preprocessor directive you need in the header, e.g. MOCK_<class name>
      • in the source file you would like to use the preprocessor directive:
        • include the helper class using #include <<class name>/Common/UserCode/<class name>Helper.hpp>
        • use the directive #ifdef MOCK_<class name> around the section you use for mocking, etc
      • if the preprocessor directive is uncommented in the helper classes' header the section will be executed during runtime
      • if the preprocessor directive is commented the section will be ignored
  • How do I use the hasDataChanged()-method in custom get actions?
    • The hasDataChanged()-method was introduced to filter manual notifications. The default implementation returns true, but manual checks can be implemented to trigger manual notifications. A typical use-case for this method is data filtering at the real-time level. The method is also intended to steer when to send updated data. Keywords: on-change / subscription.
  • How do I send manual notifications from an RT actions to other properties in a FESA class?
    • Given that the FESA class design is already prepared for sending manual notifications from an RT action the following steps still have to be performed in the C++ code:
      • call registerManualNotification("NameOfThePropertyWithoutNamespace", pDev->getName()); within the device loop
      • call sendManualNotification(pCtxt); after the loop for the devices to send all registered notifications
      • call resetManualNotification(); after having sent the notifications


  • How do I work with filter-items?
      • If filter-items are defined in a setting- or acquisition property it is possible to evaulate the content within the execute-method of the get-/set-action:
const char* theFilter = filter.getAFilter();
if( strcmp(theFilter, "AString")==0 ) {
    data.setAnItem1(true);
    data.setAnItem2(true);
} else {
    data.setAnItem1(false);
    data.setAnItem2(false);
}

  • How do I get the FESA class name / version in the C++ code?
std::string className = this->WRTimingTestServiceLocator_->getClassName();
std::string classVersion = this->WRTimingTestServiceLocator_->getClassVersion();

  • How do I provide on-change functionality? I.e. send data only when it has notably changed?
    • In the FESA class design: set the attribute 'on-change' to true in the property definition. This will indicate the intention to the applications.
    • In the property implementation: adapt the default implementation of the method 'hasDataChanged'. Per default this method returns true which indicates a data change. If data changes within borders only are supposed to be published it is possible to implement this in the 'hasDataChanged' method.

FESA3 software @runtime


  • I use custom actions. Why does the data not look as expected?
    • As soon as a property steered by a custom action makes use of referenced data fields the default action is called after the execution of the custom action to fill the remaining data fields. To prevent execution of the default action no value-item of the property may use references to data fields.


SVN Repository Usage


  • I just marked a file to be ignored by SVN. However now I cannot commit the folder where the file to be ignored is inside.
    • Trigger a SVN update of the folder in the Project Explorer. After that you will be able to commit the SVN ignore info of the folder.
  • My FESA project was inserted into the SVN repository automatically during creation. But I am not able to synchronize the project with the SVN repository.


Plug-Ins in Eclipse


  • How do I uninstall the FESA3 Eclipse plug-in?
  • Select from the menu Help > Install New Software... . This displays the Available Software dialog.
  • Click the blue hyperlink "What is already installed" in the bottom section of the Available Software dialog.
  • From the Installed Software tab select the FESA Eclipse plug-in and press the Uninstall... button.
  • Follow the required steps of the uninstall procedure and restart Eclipse as suggested.

FESA Explorer


In both cases load the zip file manually in the FESA Explorer. Either directly from the FECs test directory or (if available) from https://websvcdev.acc.gsi.de/groups/fesa/fex/ .

FESA3 Workflow


General


  • How do I enable icons in menus in Eclipse?
    • This is related to the general Linux settings. To enable the icons type the following in a terminal:
x@asl73x> gconftool-2 --type boolean --set /desktop/gnome/interface/buttons_have_icons true
x@asl73x> gconftool-2 --type boolean --set /desktop/gnome/interface/menus_have_icons true

Deployment to MCS

Topic revision: r21 - 16 Sep 2015, UdoKrause
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