FAQ - Frequently Asked Questions



How to import an existing FESA class/FESA deploy-unit into the workspace ?

Briefly:
  • 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"
With screenshots:

How to move to another Eclipse Version

After the import of existing working copies from another workspace the SVN repository URL is wrong. However, the project is still connected to the proper SVN repository internally. How do I adjust the wrongly displayed URL?

How can I get help/information on FESA 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_3.1.0/fesa-core-gsi-integration-test or https://www-acc.gsi.de/svn/fesa/framework/branches/release/FESA3_3.1.0/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 output of the FESA Eclipse plug-in?

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 on top 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 FESA operations?

Yes. Frequently used operations such as design validation and code synchronization from the FESA3 workflow are accessible via the FESA CLI Tool. For a full feature list of the FESA CLI tool run the tool without parameters.

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"

The FESA Eclipse plug-in does not write messages to the console any more. What can I do ?

This can have different reasons. Here some solution proposals:
  • First of all, please check that the "FESA Console" is open. On the right side of the console you can pick between different consoles.
  • For me the problem somehow was workspace-specific. Only In one specific eclipse-workspace, the FESA eclipse plug-in did not write to the console any more. I was able to fix that by removing the folder ".metadata" of this workspace. ( move the folder to ".metadata.old" in case you want to switch back! )
  • Here as well a stack-overflow thread on the topic.

The number of projects in my workspace is large. Is there a way to focus on the three projects I currently work on?

Eclipse allows to define 'Working Sets'. A working set may include a smaller number of projects that belong together. If selected only the projects that belong to a working set are displayed in the project explorer.

See this wiki page for further information.

How can I view documents side by side?

There are several possibilities:
  • If more than one document is open in an editor the upper tab (where the file name is shown) may be dragged within the workbench. Docking frames for "dropping" the document will be displayed within the workbench when moving the document around.
  • Since Eclipse Luna it is possible to drag a document in an editor window outside of the Eclipse main frame.

XML Document modification


In setting properties a warning recommends 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/3.1.0/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 are still filled by the FESA FWK?

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.

Why does the promotion mechanism for instance files not work?

  • The promotion mechanism relies on XSD schema. The XSD schema files are created / updated in the background during source code synchronization.

Why does the promotion mechanism ignore my setting / acquisition data fields?

  • These types of data fields in the FESA class design are promoted only to the instance file if a default value is given in the FESA class design.

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 retrieve the FESA class name / version in the C++ code?

std::string className = this-><FESAClassName>ServiceLocator_->getClassName();
std::string classVersion = this-><FESAClassName>ServiceLocator_->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.

How do I use GSI's Conditions to illustrate error conditions of my FESA software?

How do I create and use an array of strings?

  • An example is found in the integration test class RDADataTypes in the setting property '!AllTypesArray2D'. Basically a 2D-array of the type char is defined in the FESA class design. In the C++ code the array can be filled using the method setString:
    pDev->array2d.setString("the value", index, pContext);


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 FESA deploy-unit to use White Rabbit based timing?

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

Why does export to the database not work? An 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.

Why does SVN require a password during the release of FESA software? ACC Login (kerberos)

Release ElectroStatQuadDU, version 0.2.0 Delivering FESA deploy-unit
ElectroStatQuadDU.deploy for FEC vmla09...
Authentication realm: < [[https://www-acc.gsi.de:443][https://www-acc.gsi.de:443]]> ACC Login (kerberos)

Most probably the kerberos ticket expired. Before starting Eclipse check with klist which tickets your Linux session already have and perform kinit to re-initialize your kerberos ticket. See https://www-acc.gsi.de/wiki/IN/Subversion for details.

During release the KDE Wallet pops up. What is this?

The KDE wallet is Linux' password storage on KDE systems. It can be disabled. See https://www-acc.gsi.de/wiki/IN/Subversion for details.

How do I create instance documents for mock 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.

What is the difference between development/test and productive release of FESA software?

(07/2016) Different settings apply during release. See https://www-acc.gsi.de/wiki/FESA/FESA3ReleaseOfFESASoftware for details.

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 data 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 running FESA software with the FESA Explorer, and yes, the FESA software 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.

How can I see the log output of my FESA software?

Using logstash.

FESA Database


How can I store information in the FESA database?

See Database Workflow - Issues to consider

How can I find out what is stored in the FESA database?

See Getting Information from the FESA Database

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 (=Linux login credentials) 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: r13 - 12 Jul 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