FAQ - Frequently Asked Questions



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"

How can I get help/information while working with the FESA Eclipse plug-in?

The FESA3 Eclipse plug-in ships with a number of "cheat sheets". The cheat sheets are integrated into the Eclipse IDE and can be accessed via the menu: Help > Cheat Sheets... . Open the folder named FESA from the cheat sheet list to select a cheat sheet to work with. The information of each step inside a cheat sheet will be displayed when clicking on "Start working on this task" and "Click to begin" in the introduction to each task. To display the wiki links select them and copy them into the browser of your choice.

Where do I find example FESA software?

A source for example FESA software is the SVN repository, namely the integration tests that are used for testing a release candidate. Check e.g. https://www-acc.gsi.de/svn/fesa/framework/branches/release/FESA3_2.0.1/fesa-core-gsi-integration-test or https://www-acc.gsi.de/svn/fesa/framework/branches/release/FESA3_2.0.1/fesa-core-integration-test

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

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 manage Eclipse's Secure Storage 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. The secure-storage can be managed in Window > Preferences > General > Security > Secure Storage

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.

Can I use FESA 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 the FESA CLI Tool.

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.

Can I use the FESA Explorer without Eclipse?

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

Content assistance / auto completion does not work? What's wrong?

Window > Preferences > C/C++ > Editor > Content Assist > Advanced : check "Parsing-based Proposals"

XML Document modification


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.

How do I use the units-value-item?

The units-value-item references a value-item of a property. To specify a unit of this item either provide a default value or add the value in an action. https://www-acc.gsi.de/data/documentation/fesa-gsi/metamodel/2.3.2/design-doc.html#//equipment-model/interface/shared-definitions/units-value-item

The FESA design has an error. Why is it not visible in the Problems View?

If the Problems View already lists more than 100 messages or so the newest error messages are not visible. It is possible to delete the error messages in the Problems View to see the newest error messages from the validation process.

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.

The default of a new field/value-item is 'scalar'. How can I use arrays?

One way is to right-click on 'scalar'; in the class design (Design View) and select 'Replace with' in the context menu. The same works reverse, array types can be replaced by scalars as well.

I use a custom server action. Why some value-items still are filled by FESA?

As soon as a value-item defines a 'data-field-ref', the values-item will automatically be filled by FESA after execution of the custom server action. To prevent that, just remove the node 'data-field-ref' from a value-item.

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?

Best practice is to use the FESA diagnostic logging.

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

How do I work with filter-items?

If filter-items are defined in a setting- or acquisition property it is possible to evaluate 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.

Release/Delivery


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 deliver FESA software for the MCS in Saclay, France?

https://www-acc.gsi.de/wiki/bin/view/FAIR/PlinacSource/DeploymentFESASoftware

How do I configure the deploy-unit to use White Rabbit based timing?

Check the White Rabbit timing documentation for WR-related information.

Why does export to database not work? RMI exception is thrown.

When trying to export a FESA document to the database I receive the error message

"Error creating bean with name 'org.springframework.remoting.rmi.RmiServiceExporter#0' defined in class path resource [resources/server_config.xml]: Invocation of init method failed; nested exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:

java.rmi.UnmarshalException
error unmarshalling arguments; nested exception is:

java.lang.ClassNotFoundException
org.springframework.remoting.rmi.RmiInvocationHandler (no security manager: RMI class loader disabled)"

Solution: Please check whether port 1199 is used by another program.

Quick Solution: Switch to another asl machine in the cluster.

How do I create instance documents for muck up devices efficiently?

Push the button mock.pngon the toolbar of the instance file. A new file with a different file name will be created. It contains the same information as the original instance file. Only the device instance names will be changed (preceding X) as well as the timing configuration which will be set to NONE.

Run-Time


How do I launch a FESA3 deploy-unit automatically on a (virtual) front-end?

The basic steps to launch a FESA3 deploy-unit are outlined here: https://www-acc.gsi.de/wiki/FESA/FECFilesystem#FEC64.

How do I test whether my FESA software is running and accessible for applications?

  • Raphael M. kindly provided a tool to test the full stack from the top:
    ./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 can I check whether my deploy-unit is up and running?

  • Launch ./cmw-admin-console on the command line at a machine of the asl cluster. The tool lists the FESA software found in the database and allows status checks.

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

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 )

FESA_9006 Failed to restore the devices

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.

FESA_13008 Partial setting not allowed for this property

The rda data container expects all desired data values to be used during call of the settings property.

FESA_13021 The field namedPositionNames has no data for the cycle selector ALL (no set was done before calling get) ...

  • 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. This may happen in an RT-Action for example:
void StatusRTAction::execute(fesa::RTEvent* pEvt) {
   MultiplexingContext *pCtxt = pEvt->getMultiplexingContext();
   std::vector<Device*> deviceCollection =
         A201ServiceLocator_->getDeviceCollection();
   for (unsigned int i = 0; i < deviceCollection.size(); i++) {
      Device *pDev = deviceCollection[i];
      if (pDev->power.get(pCtxt) != DEVICE_POWER::ON) {
         pDev->powerState.set(DEVICE_POWER_STATE::OFF, pCtxt);
         std::cout << "StatusRTAction(): power off device : "
               << pDev->getName() << std::endl;
         pDev->status.set(DEVICE_STATUS::UNKNOWN, pCtxt);
         pDev->detailedStatus.lower(0, pCtxt);
         pDev->detailedStatus.lower(1, pCtxt);
         pDev->control.set(DEVICE_CONTROL::LOCAL, pCtxt);
         pDev->opReady.set(false, pCtxt);
         pDev->interlock.set(false,pCtxt);
         std::string errorString= "Device turned off";
         long error_code= 4711;
         pDev->error_collection.set(0,0,pCtxt);
      } else {
         pDev->powerState.set(DEVICE_POWER_STATE::ON, pCtxt);
         std::cout << "StatusRTAction(): power on device : "
               << pDev->getName() << std::endl;
         pDev->status.set(DEVICE_STATUS::OK, pCtxt);
         pDev->detailedStatus.raise(0, pCtxt);
         pDev->detailedStatus.raise(1, pCtxt);
         pDev->control.set(DEVICE_CONTROL::LOCAL, pCtxt);
         pDev->opReady.set(true, pCtxt);
         pDev->interlock.set(false,pCtxt);
         std::string errorString= "Device turned on";
         long error_code=1;
         pDev->error_collection.set(0,0,pCtxt);
      }
      std::cout << "Synchronize setting fields" << std::endl;
      pDev->synchronizeSettingFields(*pCtxt);
   }}
  • 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.

FESA_4025 Instantiation file error: The value '-2147483648' is not valid for the xml-attribute 'value'....

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 .

FESA_1009 Failed to set the priority of the thread 'Notif_thread-default' to '17'. POSIX-ErrorMessage: Permission denied.

Root rights are required when launching a FESA binary that uses the RT part. May be circumvented by using the parameter -noRTSched during launch if root rights are not available. Another solution is to set the thread priority to '1'.
                <client-notification-threads>
                    <thread-default prio="1"/>
                </client-notification-threads>

I cannot connect to the FESA class with FESA Explorer, and yes, it is up and running

A popular mistake is the naming of the FEC in the test folder of the deploy-unit. Please use the host name only, e.g. asl730. Using e.g. asl730.acc.gsi.de leads to the connection problems mentioned above.

FESA Class Documentation


How do I provide documentation for a FESA3 class?

See FESA3 Class Documentation

Is there a possibility to visualize a FESA class design graphically?

During generation of FESA class documentation atwo graphs are generated. One of the graphs is visualizing the class interface, the other one is describing the internal relations with events, scheduling units, actions etc.

How do I upload FESA class documentation to the webdav server?

During release of an operational FESA deploy-unit the FESA class documentation page will be uploaded to the webdav server (plug-in >=2.5.3).

Alternatively the toolbar button may be used: uploaddocumentation.png

Both possibilities require the SVN username + password in the FESA preferences.

How can I see the documentation on the server?

In a browser select https://www-acc.gsi.de/data/fesa/classes/<NameOfTheClass>.html .

SVN Repository Handling

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

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

Make sure the SVN connector 1.7.x is installed. See https://www-acc.gsi.de/wiki/FESA/FESA3Install201#SVN_Connector for details.

SVN - In Eclipse I can not mark a file to be ignored. The menu is greyed out.

  • Option 1: Remove the file. Commit and update the folder. Add the file again if necessary. Select Team > Add to svn:ignore .
  • Option 2: Work on the command line. Ignore a directory: svn propset svn:ignore dirname . Ignore a file type: svn propset svn:ignore "*.zip" = . Edit the ignore file manually: =svn propedit svn:ignore .
Topic revision: r17 - 10 Feb 2016, 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