Overview

These are instructions for upgrading components authored against 1065 to 1199. They were initially published as part of the release notes for BRAHMS 0.7.0.

Upgrading to 1199 (from 1065)

Here, we assume you have already followed the section above and upgraded your component to 1065, and it is compiling and working correctly. Upgrading to 1199 improves efficiency, and will be the supported binding in future, but there is no requirement to upgrade components, especially if you don't intend to modify them further.

Note also that this upgrade is less trivial than the upgrade to 1065, and may take you a little while for each process.

  • change *2* include lines from/to
  • change your event function declaration from/to
    • void <process_class>::event(Event& event)
    • Symbol <process_class>::event(Event* event)
  • search/replace
  • search/replace:
    • FLAG_ ==> F_
  • search/replace
  • search/replace
    • RESPONSE_ ==> C_
  • search/replace
  • search/replace
  • search/replace
  • search/replace
  • manual change (the bindings insert the 1st arg for you)
    • getComponentInfo(hComponent, ...) ==> getComponentInfo(...)
  • CAUTIOUS search/replace
    • event. ==> event->
    • (because the function declaration has changed)
  • in each individual event, you will have to change the way that data is pulled out of the "event" object. the old system had "event" with a bunch of fields specific to each event. the new system has "event" with a single field "data" which is a pointer to a data structure specific to that event. you may have to work with the documentation for each event to fix these up, but you should find that each transpose is actually mostly syntactic. an example is given here, for the EVENT_STATE_SET event:
    • (old code)
        • // get parameters
        • MatMLNode nodeState(event->xmlNode);
    • (new code)
  • CAUTIOUS search/replace
    • time. ==> time->
    • (because the storage format of time has changed)
  • response code is now returned from event() rather than passed back in the "event" object, so...
    • (old code)
      • event->response = C_OK;
      • return;
    • (new code)
  • remove implementation of EVENT_EXECPARS
  • search/replace
  • if you use it, search/replace...
    • COMPONENT_FLAGS ==> MODULE_COMPONENT_FLAGS