DUECA/DUSIME
Loading...
Searching...
No Matches
Public Attributes | List of all members
dueca::ParameterTable Struct Reference

Element of a parameter table for configuration of modules. More...

#include <ParameterTable.hxx>

Collaboration diagram for dueca::ParameterTable:
Collaboration graph
[legend]

Public Attributes

const charname
 Name of parameter, as used from Scheme.
 
const GenericVarIOprobe
 Pointer to MemberCall or VarProbe object that gets the data into the module.
 
const chardescription
 An additional comment to describe the required use of the parameter.
 

Detailed Description

Element of a parameter table for configuration of modules.

Modules can be extensively configured from the Scheme creation script. A parameter table, with ParameterTable objects, defines the names of parameters and the probing object to set these parameters in the module class.

Note that the table always has to be closed off with a row of NULL pointers. Typical use would be:

const ParameterTable* SomeClass::getParameterTable()
{
// note the use of static! We don't want this table to disappear
static const ParameterTable table[] = {
{ "my-variable", new VarProbe<SomeClass,int>
(REF_MEMBER(&SomeClass::my_variable)),
"this controls the blah blah blah, enter an integer value\n"
"between 0 and 10" },
{ "set-timing", new MemberCall<SomeClass,TimeSpec>
(&SomeClass::setTimeSpec),
"Control the update rate with a time specification" },
{ NULL, NULL,
"A descrription for the complete module, purpose etc. " }
};
return table;
}
This is a "light weight object" that enables you to read the latest set of data on a StreamChannelEnd...
Definition StreamReaderLatest.hxx:43
Element of a parameter table for configuration of modules.
Definition ParameterTable.hxx:70

Note the use of the REF_MEMBER define, this is needed for compatibility with older versions of gcc compilers (2.95).

The third element of the ParameterTable class point to a description of the variable, and for the very last element in the table it points to a string with a description of the complete module. Note that older code (where this third element was not present), still compiles, only there are no descriptions.

You can list all descriptions in a DUECA executable by starting it with the environment variable DUECA_SCRIPTINSTRUCTIONS set, e.g.:

In this way you can get some documentation for writing the dueca.cnf and dueca.mod scripts.

Member Data Documentation

◆ description

const char* dueca::ParameterTable::description

An additional comment to describe the required use of the parameter.

If not added to the "table", it will be NULL.


The documentation for this struct was generated from the following file: