Provides methods to query libIntegra and process commands.
More...
#include "api/server.h"
Provides methods to query libIntegra and process commands.
- Note
- All the methods of IServer assumes that the server is locked, ie that exactly one instance of CServerLock exists See documentation for CServerLock for a discussion of how to do this
virtual void integra_api::IServer::dump_dsp_state |
( |
const string & |
file | ) |
|
|
pure virtual |
Testing function.
Uses undocumented libPD function to write libPD's internal state to the specified file as a pd patch
virtual void integra_api::IServer::dump_libintegra_state |
( |
| ) |
|
|
pure virtual |
Testing function.
Dumps state of all existing nodes and their stateful endpoints to output console
virtual const INode* integra_api::IServer::find_node |
( |
const CPath & |
path, |
|
|
const INode * |
relative_to = NULL |
|
) |
| const |
|
pure virtual |
Lookup a node by its path.
- Parameters
-
path | absolute or relative path |
relative_to | if provided, path is interpreted as being relative to this node. If NULL, path is interpreted to be absolute |
- Returns
- the looked-up node, or NULL if not found
virtual const INodeEndpoint* integra_api::IServer::find_node_endpoint |
( |
const CPath & |
path, |
|
|
const INode * |
relative_to = NULL |
|
) |
| const |
|
pure virtual |
Lookup a node endpoint by its path.
- Parameters
-
path | absolute or relative path |
relative_to | if provided, path is interpreted as being relative to this node. If NULL, path is interpreted to be absolute |
- Returns
- the looked-up node endpoint, or NULL if not found
virtual string integra_api::IServer::get_libintegra_version |
( |
| ) |
const |
|
pure virtual |
Get version number.
Version number are provided as a dot-separated string containing four numbers: major version, minor version, patch number, build number Build numbers should always go up, that is they are not reset to 0 when we change any other part of the version number. So comparing build numbers should be sufficient to test whether one version is more recent that another.
virtual const node_map& integra_api::IServer::get_nodes |
( |
| ) |
const |
|
pure virtual |
Get the set of top-level nodes.
- Returns
- a map of node name -> INode * containing all top-level nodes
- Note
- Actually, this function gets all the nodes in the system, since the top-level nodes can be interrogated for their children, and so on. But only the top-level ones are directly available by iterating the returned map
virtual const node_map& integra_api::IServer::get_siblings |
( |
const INode & |
node | ) |
const |
|
pure virtual |
Get a node's sibling set.
This helper is more convenient than using INode's tree traversal functions, because it can also get siblings of top-level nodes.
- Parameters
-
node | The node who's sibling set we're interested in |
- Returns
- All of the node's siblings, including itself
virtual const CValue* integra_api::IServer::get_value |
( |
const CPath & |
path | ) |
const |
|
pure virtual |
Lookup the value of a stateful control node endpoint.
- Parameters
-
path | path of the node endpoint |
- Returns
- the node endpoint's value, or NULL if node endpoint not found, not a control or not stateful
virtual void integra_api::IServer::ping_all_dsp_modules |
( |
| ) |
|
|
pure virtual |
Testing function.
Sends a ping command to all dsp modules, and dumps to output console info about which responded ok
Alter libIntegra's state by passing in a subclass of CCommand.
- Parameters
-
command | The command should be created using one of the IXXXCommand::create methods (see ICommand) |
result | If the caller needs feedback about what the command did, pass a pointer to the relevent subclass of CCommandResult here. It is the caller's responsibility to ensure that this object is of the correct type to match command (see CCommandResult). |
- Note
- Unusually, this method expects to be passed commands which have been created on the heap, and assumes responsibility for deleting them itself. The reason for this is a) to maximise cleanliness of calling code - commands can be created and processed inline and b) for maximum efficiency if we wanted to add an undo/redo stack to libIntegra at some future time.
- Returns
- an error code, or CError::SUCCESS if no error. See CError for all the codes.
The documentation for this class was generated from the following file:
- /Users/jamie/Documents/IntegraLive/libIntegra/api/server.h