pytak icon indicating copy to clipboard operation
pytak copied to clipboard

Decouple client cot object from transmission tak_proto version

Open sei-jmattson opened this issue 2 years ago • 1 comments

As a developer, I'd like to build COT event objects as either protobuf or XML and have pytak convert as necessary to the desired tak_protocol bytes for transmission.

This allows folks to develop withtakproto but still be able to function in TAK_PROTO=0 environments. This allows mixing of new code producing protobuf event objects and legacy code with ET events in the same client. Likewise, it would allow receipt of both TAK_PROTO 0 and 1 messages at the same time (which seems to be how ATAK is functioning).   If you'd be amenable to a PR implementing such, I'm thinking along these lines:

  • takproto.proto2xml() to complement the existing takproto.xml2proto()
  • Have TXWorker determine type of dequeued object (CotEvent or ET) and serialize according to the configured TAK_PROTO option
  • Have RXWorker deserialize according to nature of received bytes and convert (if necessary) to the TAK_PROTO option

sei-jmattson avatar Sep 28 '23 00:09 sei-jmattson

@sei-jmattson PR welcome!

ampledata avatar Nov 30 '23 22:11 ampledata