NodeElement
class NodeElement : public GenericElement<NodeElement>
@brief The NodeElement groups other elements into a hierarchy
The NodeElement can be used to create hierarchies in the expected parameter section of a device.
Example:
NODE_ELEMENT(expected).key("myNode")
.displayedName("This is a Node")
.commit();
SOME_ELEMENT(expected).key("myNode.myKeyA")
...
.assignmentOptional().defaultValue("client")
...
.commit();
SOME_ELEMENT(expected).key("myNode.myKeyB")
...
.assignmentOptional().defaultValue("client")
...
.commit();
creates the following hierarchy:
MyNode -> myKeyA -> myKeyB
NodeElements may contain subnodes so that arbitrary compley hierarchies up to a maximum aggregated key-length of 120 characters are possible
NodeElements may further be used to provide options for karabo::data::ChoiceElement and list entries for karabo::data::ListElement
Functions
| Name | Description |
|---|---|
| appendParametersOfConfigurableClass | Insert the expected parameters of another class of type ConfigurationBase. |
| appendParametersOf | Insert the expected parameters of another class of type ConfigurationBase. |
| appendSchema | Append the elements specified in a Schema to the node schema : Return : |
| setAllowedActions | Specify one or more actions that are allowed on this node. |
Function Details
appendParametersOf
template <class T> NodeElement& appendParametersOf()
Insert the expected parameters of another class of type ConfigurationBase. The class needs to be known by the factory system.
Return :
appendParametersOfConfigurableClass
template <class ConfigurableClass> NodeElement& appendParametersOfConfigurableClass(const std::string& classId)
Insert the expected parameters of another class of type ConfigurationBase. The class needs to be known by the factory system.
classId
: identifying the clas
Return :
appendSchema
NodeElement& appendSchema(const Schema& schema)
Append the elements specified in a Schema to the node
schema
:
Return :
setAllowedActions
NodeElement& setAllowedActions(const std::vector<std::string>& actions)
Specify one or more actions that are allowed on this node.
If a Karabo device specifies allowed actions for a node, that means that it offers a specific slot interface to operate on this node. Which allowed actions require which interface will be defined elsewhere.
Return : reference to the Element (to allow method's chaining)