dsim_model member functions that provide lookup of local variables and setup of outlets More...
Functions | |
dsim_variable | dsim_model::request_local_variable (const char *name, bool quiet=false) |
Look up a variable created by this object. | |
dsim_value | dsim_model::current_value_for_variable (const char *name) |
Look up the current value of a variable created by this object. | |
bool | dsim_model::connect_outlet (const char *name, const dsim_variable &source, const char *source_object=NULL) |
Connect one of this object's outlets to a variable. |
dsim_model member functions that provide lookup of local variables and setup of outlets
These methods are generally called on an object by other objects to look up local variables.
bool dsim_model::connect_outlet | ( | const char * | name, |
const dsim_variable & | source, | ||
const char * | source_object = NULL |
||
) | [inherited] |
Connect one of this object's outlets to a variable.
Connects the named outlet to the provided source variable. This function will generally not be called by user code, though it may be; outlets are usually connected to sources automatically according to the simulation setup file.
If the source variable's type or units do not match the outlet's type or units, a warning will be printed but the connection will succeed.
name | The name of the outlet to connect. |
source | The source variable to which the outlet should be connected. |
source_object | If not null and the specified outlet is marked as dependent, a dependency for this object on source_object will be set up. |
dsim_variable dsim_model::request_local_variable | ( | const char * | name, |
bool | quiet = false |
||
) | [inherited] |
Look up a variable created by this object.
Looks up a variable that has been created at this object with one of the create_* functions. Note that this function will not look up outlets.
name | The name of the variable to look up. |
quiet | If true, suppresses showing a warning if a variable with the specified name does not exist. |