X-Git-Url: http://www.average.org/gitweb/?p=loctrkd.git;a=blobdiff_plain;f=gps303%2Fwatch.py;h=2e5b412fb89c87c98d0338ff3069f934f3132896;hp=ed51ad19ebea040062d3e3cca1ead844bfb9e5af;hb=5e1e7a4d37a1e149d5e899dada7b55a863cd8e64;hpb=9d43b364c397f1f50bd8620e487cbc8fc7189f20 diff --git a/gps303/watch.py b/gps303/watch.py index ed51ad1..2e5b412 100644 --- a/gps303/watch.py +++ b/gps303/watch.py @@ -5,6 +5,7 @@ from logging import getLogger import zmq from . import common +from .gps303proto import parse_message from .zmsg import Bcast log = getLogger("gps303/watch") @@ -19,8 +20,8 @@ def runserver(conf): try: while True: zmsg = Bcast(zsub.recv()) - msg = parse_message(zmsg.packet) - print(zmsg.imei, msg) + msg = parse_message(zmsg.packet, zmsg.is_incoming) + print("I" if zmsg.is_incoming else "O", zmsg.imei, msg) except KeyboardInterrupt: pass