#include <SCRAgent.h>
Inheritance diagram for SCRAgent:
Public Member Functions | |
SCRAgent () | |
virtual | ~SCRAgent () |
virtual YCPValue | Read (const YCPPath &path, const YCPValue &arg=YCPNull(), const YCPValue &opt=YCPNull())=0 |
virtual YCPBoolean | Write (const YCPPath &path, const YCPValue &value, const YCPValue &arg=YCPNull())=0 |
virtual YCPList | Dir (const YCPPath &path)=0 |
virtual YCPValue | Execute (const YCPPath &path, const YCPValue &value=YCPNull(), const YCPValue &arg=YCPNull()) |
virtual YCPMap | Error (const YCPPath &path) |
virtual YCPBoolean | RegisterAgent (const YCPPath &path, const YCPValue &value) |
virtual YCPBoolean | UnregisterAgent (const YCPPath &path) |
virtual YCPBoolean | UnregisterAllAgents () |
virtual YCPBoolean | UnmountAgent (const YCPPath &path) |
virtual YCPValue | otherCommand (const YCPTerm &term) |
void | setAsCurrentSCR () |
Static Public Member Functions | |
YCPValue | readconf (const char *filename) |
SCRAgent * | instance () |
Public Attributes | |
SCRAgent * | mainscragent |
Static Private Attributes | |
SCRAgent * | current_scr = 0 |
YCPMap | unspecified_error |
returned by Error |
An SCRAgent is an information agent. It handles a subtree of the whole SRC data tree of the system. You can look upon it as a database that is similar to a filesystem. Data is grouped in a tree. But type of the data being stored are not files but YCP values.
|
Initializes the base class. |
|
Cleans up. Furthermore baseclass must have a virtual destructor. |
|
Get a list of all subtrees. Implemented in AnyAgent, DummyAgent, IniAgent, ModulesAgent, HwProbe, ResolverAgent, SystemAgent, ScriptingAgent, and StdioSCRAgent. |
|
Get a detailed error description if a previous command failed Reimplemented in ScriptingAgent, and StdioSCRAgent. |
|
Execute a command Reimplemented in DummyAgent, SystemAgent, ScriptingAgent, and StdioSCRAgent. |
|
|
|
Execute other commands. Return 0 if the command is not defined in your Agent. Reimplemented in AnyAgent, DummyAgent, IniAgent, ModulesAgent, ResolverAgent, ScriptingAgent, and StdioSCRAgent. |
|
Reads data. Destroy the result after use.
Implemented in AnyAgent, DummyAgent, IniAgent, ModulesAgent, HwProbe, ResolverAgent, SystemAgent, ScriptingAgent, and StdioSCRAgent. |
|
Reads the scr config file and returns the term. It skips all lines upto (including) the first starting with a ".", which is the path where the agant gets mounted (by the ScriptingAgent). |
|
Register an agent Reimplemented in ScriptingAgent. |
|
|
|
Unmount an agent Reimplemented in ScriptingAgent. |
|
Unregister an agent Reimplemented in ScriptingAgent. |
|
Unregister all agents Reimplemented in ScriptingAgent. |
|
Writes data. Destroy the result after use. Implemented in AnyAgent, DummyAgent, IniAgent, ModulesAgent, HwProbe, ResolverAgent, SystemAgent, ScriptingAgent, and StdioSCRAgent. |
|
|
|
A pointer to the SCRAgent (which normally is the ScriptingAgent) that created this SCRAgent. It can be used to call other SCRAgents directly from C++. You must check if it is not 0. |
|
returned by Error
|