
#!/usr/bin/env python3
import time
import zmq
import pmt
import sys


context = zmq.Context()
zmq_socket = context.socket(zmq.PUSH)
zmq_socket.bind("tcp://127.0.0.1:55001")

data = 'C0 12 30 20 00 AF 00 E0 00 66 C0 02 00 9F 00 00 00 00 00 17 46 CF 00 00 00 8E A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 FE 00 00 00 00 00 00 00 00 00 00 03 FE 00 00 05 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
data = bytes.fromhex(data)
data = list(data)
frame_size = 444
# Pad data
for i in range(frame_size - len(data)):
    data.append(0)

# print(data)
pdu = pmt.cons(pmt.PMT_NIL, pmt.init_u8vector(len(data), data))

zmq_socket.send(pmt.serialize_str(pdu))
