libSDRForge
Loading...
Searching...
No Matches
sdrforge.protocols.zmq.publisher.ZmqTelemetryPublisher Class Reference

Publish versioned JSON envelopes with topic-based subscriptions. More...

Public Member Functions

None __init__ (self, str endpoint="tcp://127.0.0.1:5571", *, Any context=None, Any socket=None)
 Initialize the instance.
bool publish (self, str topic, dict[str, Any] payload)
 Return False when the output queue is full; never block.
None close (self)
 Close the component.

Public Attributes

int dropped_messages = 0

Protected Attributes

 _zmq = zmq
 _context = context if context is not None else zmq.Context.instance()
 _socket = socket

Detailed Description

Publish versioned JSON envelopes with topic-based subscriptions.

Constructor & Destructor Documentation

◆ __init__()

None sdrforge.protocols.zmq.publisher.ZmqTelemetryPublisher.__init__ ( self,
str endpoint = "tcp://127.0.0.1:5571",
* ,
Any context = None,
Any socket = None )

Initialize the instance.

Parameters
selfThe current instance.
endpointThe endpoint value.
contextThe context value.
socketThe socket value.

Member Function Documentation

◆ close()

None sdrforge.protocols.zmq.publisher.ZmqTelemetryPublisher.close ( self)

Close the component.

Parameters
selfThe current instance.

◆ publish()

bool sdrforge.protocols.zmq.publisher.ZmqTelemetryPublisher.publish ( self,
str topic,
dict[str, Any] payload )

Return False when the output queue is full; never block.

Parameters
selfThe current instance.
topicThe telemetry topic.
payloadThe telemetry payload.
Returns
The operation result.

Member Data Documentation

◆ _context

sdrforge.protocols.zmq.publisher.ZmqTelemetryPublisher._context = context if context is not None else zmq.Context.instance()
protected

◆ _socket

sdrforge.protocols.zmq.publisher.ZmqTelemetryPublisher._socket = socket
protected

◆ _zmq

sdrforge.protocols.zmq.publisher.ZmqTelemetryPublisher._zmq = zmq
protected

◆ dropped_messages

int sdrforge.protocols.zmq.publisher.ZmqTelemetryPublisher.dropped_messages = 0

The documentation for this class was generated from the following file: