Node
- class ioiocore.node.Node(name=None, **kwargs)[source]
Bases:
ABC
,Portable
Abstract base class representing a node in a signal processing pipeline.
Inherits from ABC and Portable, and provides the core structure for setting up and running the Node, including managing its configuration, implementation, logger, and state.
- Parameters:
name (str)
- _IMP_CLASS
The implementation class for the Node.
- Type:
type
- _imp
The instance of the implementation class for the Node.
- Type:
_IMP_CLASS
- config
The configuration object for the Node.
- Type:
- class Configuration(name=None, **kwargs)[source]
Bases:
Configuration
Configuration class for the Node
- Parameters:
name (str)
- __init__(name=None, **kwargs)[source]
Initialize the Node.
- Parameters:
name (str, optional) – The name of the Node (default is None).
kwargs (additional keyword arguments) – Other parameters passed to create the Node configuration.
-
config:
Configuration
- get_counter()[source]
Get the current counter value of the Node.
- Returns:
The counter value of the Node.
- Return type:
int
- get_load()[source]
Get the current load of the Node.
- Returns:
The load value of the Node.
- Return type:
float
- get_state()[source]
Get the current state of the Node.
- Returns:
The current state of the Node.
- Return type:
- set_logger(logger)[source]
Set the logger for the Node.
- Parameters:
logger (Logger) – The Logger instance to set for the Node.
- abstract setup(data, port_metadata_in)[source]
Abstract method to setup the Node.
This method should be implemented to define the setup logic for the Node.
- Parameters:
data (dict) – The input data to configure the Node.
port_metadata_in (dict) – Metadata for the input ports.
- Returns:
The configuration of the output ports.
- Return type:
dict