Node
- class ioiocore.node.Node(name=None, **kwargs)[source]
Bases:
ABC,PortableAbstract 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:
- config
The configuration object for the Node.
- Type:
- class Configuration(name=None, **kwargs)[source]
Bases:
ConfigurationConfiguration 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_state()[source]
Get the current state of the Node.
- Returns:
The current state of the Node.
- Return type:
- property name: str
- abstractmethod setup(data, port_context_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_context_in (dict) – Context for the input ports.
- Returns:
The configuration of the output ports.
- Return type:
dict
- abstractmethod step(data)[source]
Abstract method for the Node’s step function.
This method should be implemented to define the processing logic for each step of the Node.
- Parameters:
data (dict) – The input data to process.
- Returns:
The processed data after applying the step logic.
- Return type:
dict