I am trying to build a fixed length packet in python for an ATSC PSIP generator. This is probably very simple but so far I can't seem to get it to work. I am trying to build a packet with fields similar to the following:
table_id = 0xCB
syntax = 0b1
reserved = 0b11
table_ext = 0xFF
the end goal would be the following in binary
'1100101111111111111'
I have tried a dozen different things and can't get the results I would expect. I am going to send this via sockets so I believe it needs to end up in a string.