Overview

All components should take the form of a class definition file that defines a class derived from one of the component base classes (described below). The name of the class should be exactly the Class Name of the component, with the slashes replaced by underscores, followed by an additional underscore, followed by the release number in numerals. For example, the current numeric data component has class name std_2009_data_numeric_0.

Classes

The base classes of all three component types are the same, except that the Process base class has two instances of SystemMLInterface representing its input and output interfaces, as follows.

C++ API (1199)
class Data, Process, Utility { public: virtual Symbol event(Event* event) = 0; const ComponentTime* time; Symbol hComponent; ComponentOut bout; #ifdef COMPONENT_PROCESS SystemMLInterface iif; SystemMLInterface oif; #endif };

Your derived class must define the virtual event() function, and perform all its processing within this function. The member variables have the following significance.

const ComponentTime* time
Pointer to the time object for this component (which is maintained by the framework). You can dereference it using time-> to read your timing data.
Symbol hComponent
The Handle of this component. Should be passed to core API functions which require hCaller (handle of the caller).
ComponentOut bout
The Component's output object, which is connected to the BRAHMS Structured Log. Any messages for the user should be sent through this object.
SystemMLInterface iif
SystemML input interface.
SystemMLInterface oif
SystemML output interface.