RTXI 2.4 The Real-Time eXperiment Interface Documentation |
#include <workspace.h>
Public Member Functions | |
Instance (std::string name, variable_t *variables, size_t size) | |
virtual | ~Instance (void) |
size_t | getCount (IO::flags_t type) const |
std::string | getName (IO::flags_t type, size_t index) const |
std::string | getDescription (IO::flags_t type, size_t index) const |
double | getValue (IO::flags_t type, size_t index) const |
std::string | getValueString (IO::flags_t type, size_t index) const |
void | setValue (size_t index, double value) |
void | setComment (size_t index, std::string comment) |
Public Member Functions inherited from IO::Block | |
Block (std::string name, channel_t *channels, size_t size) | |
virtual | ~Block (void) |
std::string | getName (void) const |
double | input (size_t index) const |
double | output (size_t index) const |
Public Member Functions inherited from Settings::Object | |
Object (void) | |
virtual | ~Object (void) |
ID | getID (void) const |
State | save (void) const |
void | load (const State &) |
void | deferred (const State &) |
Protected Member Functions | |
double * | getData (IO::flags_t type, size_t index) |
void | setData (IO::flags_t type, size_t index, double *value) |
Protected Member Functions inherited from IO::Block | |
double & | output (size_t index) |
Protected Member Functions inherited from Settings::Object | |
virtual void | doLoad (const State &) |
virtual void | doDeferred (const State &) |
virtual void | doSave (State &) const |
Friends | |
class | Manager |
Additional Inherited Members | |
Public Types inherited from Settings::Object | |
typedef unsigned long | ID |
Static Public Attributes inherited from Settings::Object | |
const static ID | INVALID = 0 |
An object that provides a standardized interface for accessing and manipulating both internal and external data.
Definition at line 76 of file workspace.h.
Workspace::Instance::Instance | ( | std::string | name, |
Workspace::variable_t * | d, | ||
size_t | size | ||
) |
The constructor needs to be provided with a specification of the variables that will be embedded in this workspace in the variables parameter. Fields that are not of type INPUT, OUTPUT, PARAMETER, or STATE will be safely ignored. Size should be the number of total fields in the variables parameter, regardless of type.
name | The name of the workspace. |
variables | The variable specification for this workspace. |
size | The number of variables in the specification. |
Definition at line 67 of file workspace.cpp.
| virtual |
| virtual |
Get the number of variables of the specified type.
type | The type of variable to be probed. |
Reimplemented from IO::Block.
Definition at line 136 of file workspace.cpp.
| protected |
Get the internal reference of the variable, for STATE types.
type | The variable's type. |
index | The variable's index. |
Definition at line 261 of file workspace.cpp.
| virtual |
Get the description of the specified variable.
type | The type of the variable. |
index | The variable's index. |
Reimplemented from IO::Block.
Definition at line 168 of file workspace.cpp.
| virtual |
Get the name of the specified variable.
type | The type of the variable. |
index | The variable's index. |
Reimplemented from IO::Block.
Definition at line 152 of file workspace.cpp.
| virtual |
Get the value of the specified EVENT, PARAMETER or STATE variable.
type | The type of the specified variable. |
index | The variable's index. |
Reimplemented from IO::Block.
Definition at line 182 of file workspace.cpp.
std::string Workspace::Instance::getValueString | ( | IO::flags_t | type, |
size_t | index | ||
) | const |
Get the value of the specified EVENT, PARAMETER, STATE, or COMMENT variable in string form.
type | The type of the specified variable. |
index | The variable's index. |
Definition at line 204 of file workspace.cpp.
void Workspace::Instance::setComment | ( | size_t | index, |
std::string | comment | ||
) |
Set the value of a COMMENT type variable
index | The variable's index. |
value | The variable's new value. |
Definition at line 253 of file workspace.cpp.
| protected |
Set the internal reference of the variable, for STATE types.
type | The variable's type. |
index | The variable's index. |
value | The variable's storage location. |
Definition at line 272 of file workspace.cpp.
void Workspace::Instance::setValue | ( | size_t | index, |
double | value | ||
) |
Set the value of a PARAMETER type variable.
index | The variable's index. |
value | The variable's new value. |
Definition at line 231 of file workspace.cpp.
| friend |
Definition at line 79 of file workspace.h.