|
| | NodeMap ()=delete |
| | ~NodeMap ()=default |
| | NodeMap (const NodeMap &other)=delete |
| NodeMap & | operator= (const NodeMap &other)=delete |
| | NodeMap (NodeMap &&other)=delete |
| NodeMap & | operator= (NodeMap &&other)=delete |
| bool | HasNode (const std::string &name) const |
| | Checks whether the node map contains a node with the given name.
|
| template<class NodeType, typename std::enable_if< std::is_base_of< nodes::Node, NodeType >::value, int >::type = 0> |
| bool | HasNode (const std::string &name) |
| | Checks whether the node map contains a node with the given name and type.
|
| std::shared_ptr< nodes::Node > | FindNode (const std::string &name) |
| | Find a node with the given name.
|
| template<class NodeType, typename std::enable_if< std::is_base_of< nodes::Node, NodeType >::value, int >::type = 0> |
| std::shared_ptr< NodeType > | FindNode (const std::string &name) |
| | Find a node with the given name and type.
|
| std::shared_ptr< nodes::Node > | TryFindNode (const std::string &name) |
| | Tries to find a node with the given name.
|
| template<class NodeType, typename std::enable_if< std::is_base_of< nodes::Node, NodeType >::value, int >::type = 0> |
| std::shared_ptr< NodeType > | TryFindNode (const std::string &name) |
| | Tries to find a node with the given name and type.
|
| void | InvalidateNodes () |
| | Invalidates all nodes.
|
| void | PollNodes (int64_t elapsedTime_ms) |
| | Polls all nodes having a polling time.
|
| std::vector< std::shared_ptr< nodes::Node > > | Nodes () const |
| | Returns the nodes.
|
| bool | HasBufferSupportedChunks (const std::shared_ptr< Buffer > &buffer) const |
| | Checks if the Buffer contains chunks corresponding to the NodeMap.
|
| void | UpdateChunkNodes (const std::shared_ptr< Buffer > &buffer) |
| | Updates chunk information in the NodeMap.
|
| bool | HasEventSupportedData (const std::unique_ptr< Event > &event) const |
| | Checks if the Event contains data corresponding to the NodeMap.
|
| void | UpdateEventNodes (const std::unique_ptr< Event > &event) |
| | Updates event information in the NodeMap.
|
| void | StoreToFile (const std::string &filePath) const |
| | Stores the values of streamable nodes to the file at the given file path.
|
| void | LoadFromFile (const std::string &filePath) |
| | Loads the values of streamable nodes from the file at the given file path.
|
| std::unique_ptr< ScopedNodeMapLock > | Lock () |
| | Acquires the NodeMap lock. Use this function to synchronize sequences of dependent NodeMap operations across multiple threads.
|
| std::unique_ptr< ScopedNodeMapLock > | TryLock () |
| | Attempts to acquire the NodeMap lock without blocking. Use this function to synchronize sequences of dependent NodeMap operations across multiple threads. If the NodeMap is currently locked by another thread, this function returns immediately without acquiring the lock.
|
| PEAK_NODE_MAP_HANDLE | Handle () const |
| | Get the backend handle.
|
Represents a GenAPI node map.
This class allows to interact with the nodes of a module.
| void peak::core::NodeMap::PollNodes |
( |
int64_t | elapsedTime_ms | ) |
|
|
inline |
Polls all nodes having a polling time.
- Parameters
-
| [in] | elapsedTime_ms | The elapsed time since the last poll in milliseconds. |
See Node Caching and Polling Concepts for conceptual guidance on polling and cache interaction.
This method implements node polling on node map level. Pass the real elapsed time since the previous call; it is used to determine when nodes with a polling time need to be updated.
The API does not poll automatically. Applications should call this method periodically, for example from a service or UI loop while dynamic node state is in use.
- Since
- 1.0
- Exceptions
-
Attempts to acquire the NodeMap lock without blocking. Use this function to synchronize sequences of dependent NodeMap operations across multiple threads. If the NodeMap is currently locked by another thread, this function returns immediately without acquiring the lock.
- Note
- Individual NodeMap operations are already thread-safe and do not require explicit locking. However, if multiple operations must be performed as a single logical unit, they should be protected by this lock to prevent interleaving with operations from other threads.
A common example is the use of selectors: changing a selector (e.g. setting "GainSelector" to "DigitalRed") and then accessing the selected node (e.g. "Gain"). Without holding the lock, another thread could change the selector between these operations, causing the wrong setting to be accessed.
- Returns
- A ScopedNodeMapLock if the lock was successfully acquired; otherwise, a null unique pointer.
- Since
- 1.11
- Exceptions
-