UDP Sender
- class gpype.backend.sinks.udp_sender.UDPSender[source]
Bases:
SinkUDP sender for real-time data transmission.
Transmits data as float64 numpy arrays via UDP packets to a configurable target address, optionally re-framed through a buffer.
- DEFAULT_IP = '127.0.0.1'
Default target IP address (localhost)
- DEFAULT_PORT = 56000
Default target UDP port number
- class Configuration[source]
Bases:
ConfigurationConfiguration class for UDPSender parameters.
- __init__(ip=None, port=None, frame_size_out=None, edge_id=None, **kwargs)[source]
Initialize UDP sender with target address and port.
- Parameters:
ip (
Optional[str]) – Target IP address. Defaults to localhost if None.port (
Optional[int]) – Target port number. Defaults to DEFAULT_PORT if None.frame_size_out (
Optional[int]) – Output frame size. If None, data is sent with its original frame size. If specified, data is buffered and sent when frame_size_out samples are accumulated.edge_id (
Optional[str]) – Which edge runs this node, matched against the edge process’s –edge-id. None, the default, is every edge; ignored when the pipeline is not distributed.**kwargs – Additional arguments for parent INode.
- start()[source]
Start UDP sender and initialize socket connection.
Creates UDP socket and configures target address from configuration.
- Raises:
OSError – If socket creation fails.
- setup(data, port_context_in)[source]
Setup method for pipeline initialization.
Initializes the output buffer if frame_size_out is configured.