from struct import pack, unpack
from typing import Any, cast, Optional, Tuple, Type, Union
-__all__ = "Bcast", "Resp", "topic"
+__all__ = "Bcast", "Resp", "topic", "rtopic"
def pack_peer( # 18 bytes
)
+def rtopic(imei: str) -> bytes:
+ return pack("16s", imei.encode())
+
+
class Bcast(_Zmsg):
"""Zmq message to broadcast what was received from the terminal"""
self.packet = buffer[24:]
-class Report(_Zmsg):
+class Rept(_Zmsg):
"""Broadcast Zzmq message with "rectified" proto-agnostic json data"""
KWARGS = (("imei", None), ("payload", ""))