X-Git-Url: http://www.average.org/gitweb/?p=loctrkd.git;a=blobdiff_plain;f=loctrkd%2Fzx303proto.py;h=bd19e108c770221e3a0132dfc7c863e23181622f;hp=4d5730304fbead5492db2c1b08f5bf86381a0618;hb=15537c8be40f3ba25c5a51af75d9bed53a8a215d;hpb=b0bfb1a7b499ca18bf707858b0650e04acec9881 diff --git a/loctrkd/zx303proto.py b/loctrkd/zx303proto.py index 4d57303..bd19e10 100755 --- a/loctrkd/zx303proto.py +++ b/loctrkd/zx303proto.py @@ -34,6 +34,8 @@ from typing import ( __all__ = ( "Stream", "class_by_prefix", + "enframe", + "exposed_protos", "inline_response", "proto_handled", "parse_message", @@ -946,3 +948,11 @@ def parse_message(packet: bytes, is_incoming: bool = True) -> GPS303Pkt: retobj.PROTO = proto # Override class attr with object attr retobj.cause = cause return retobj + + +def exposed_protos() -> List[Tuple[str, bool]]: + return [ + (proto_name(GPS_POSITIONING), True), + (proto_name(WIFI_POSITIONING), False), + (proto_name(STATUS), True), + ]