These steps will help you to upgrade your FESA-class and deploy-unit from FESA v0.8.0 or v0.8.1 to v1.0.0

Step 1 - Update your class-design

  1. Make sure you have the development-environment for FESA v1.0.0 installed
  2. Copy your class to your workspace (or get it from SVN)
  3. Download the following files. Place them into the directory of your class-design-file:
  4. Make sure the design-file of your class is closed in eclipse!
  5. Execute the script. E.g: ./migrate.0.8.x-1.0.0.sh MyClass.design
  6. Now you should have a backup of your old class-design (MyClass.design.backup) and the updated new one. Open the new one in eclipse.
  7. Check that the file validates. If there are problem, try either to fix them, or call the fesa-support.

Step 2 - Update the source-code

The API to some fesa-core methods was slightly changed for v1.0.0. Here a list of files which are concerned in any case. You will either need to modify them by hand, or you can re-generate them from your design via the FESA-eclipse-plugin.
  • Realtime/RTDeviceClass.h/.cpp and Server/ServerDeviceClass.h/.cpp
    • The constructor of the class, and as well the constructor of the base-class does not need arguments any more. If you have no own code inside, you can just delete both files and re-generate them via the "generate source code" button. If you have own code inside, just remove all arguments in the constructors of all 4 files.
  • RT/Server-Actions - general
    • All calls to the field "mode" need to be replaced by calls to the field "powerState". The corresponding enum is "DEVICE_POWER_STATE" (was "DEVICE_MODE")
    • The field "acquisitionContext" has now a GSI-specific method, in order to allow easy handling. Instead of:
            long long stamp = 12345678;
            std::string dummyCycle("dummyCycle");
            (*device)->acquisitionContext.setacqStamp(stamp,pCtxt);
            (*device)->acquisitionContext.setcycleName(const_cast<char*>(dummyCycle.c_str()),pCtxt);
            (*device)->acquisitionContext.setcycleStamp(stamp,pCtxt);

You have to use:
            (*device)->acquisitionContext.insert(pCtxt);

or, if you like to specify your own acq-stamp:
            int64_t acquisitionStamp = 12345678;
            (*device)->acquisitionContext.insert(pCtxt,acquisitionStamp);
  • The API for manual notifications, bit-enums and Exceptions has slightly changed. Check the code snippets of v1.0.0 for detailed infos!
  • Custom-Event-Sources
    • In this sector, alot of changes were introduced. You can now add any number of "custom-events" to your custom-event-source in the design, and connect each custom-event to a different RT-Action in the events-mapping of the instantiation-file.
    • Best take a try by moving your old custom-event source to MySource.cpp_old / MySource.h_old and re-generate the source-code. The new source will already contain an code-example.
    • The wait-method of the new source does not have a return-type any more. You just fill the event which is provided by the framework and than return from the method. This was done in order to make the framework more robust, and to eliminiate possible memory-leaks in this sector. ( The RTEvents are now managed as boost::shared-pointer )

Step 3 - Update the deploy-unit

  • It is tricky to update the information/fesa-version in the MyDeployUnit.deploy, since the plugin refuses to save the document if you modify it by hand. "update FESA version" only works, if version 0.8.x is installed on a system. To solve this, just close your .deploy file in eclipse and open it with any 3rd-party editor ( right-click -> open with ). Now just replace the old fesa-version with 1.0.0. As well remove the "include" section and the "path" which is attached to each class.
  • Re-open the .deploy file with the FESA-editor and just add a "enter" somewhere + safe the file. The FESA-plugin will automatically add the correct code of all missing elements.
  • RTEquipment.cpp/.h and ServerEquipment.cpp/.h
    • Some include-pathes have changed here. Depending on if you have own-code inside these files you can:
      • No own code inside: Delete all 4 files + re-generate the source-code.
      • Own code inside: Back-up your old files, generate the new ones and paste your code into the new ones.
  • Similar to the first bullet point of this list the FESA3 version in the instantiation document has to be treated as well using another edito than Eclipse.
  • If you did all changes in a proper way, the class should compile + link without problems.
  • If there are conflicts which you cannot solve, dont hesitate to call the fesa-support!
I Attachment Action Size Date Who Comment
migrate.0.8.x-1.0.0.shsh migrate.0.8.x-1.0.0.sh manage 1 K 04 Jul 2013 - 10:21 AlexanderSchwinn migration shell-script
migrate.0.8.x-1.0.0.xslxsl migrate.0.8.x-1.0.0.xsl manage 8 K 04 Jul 2013 - 10:21 AlexanderSchwinn migration design-transformation file
Topic revision: r7 - 11 Jul 2013, 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