summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pyagl/services/can.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pyagl/services/can.py b/pyagl/services/can.py
index 91bd01d..a63bbb7 100644
--- a/pyagl/services/can.py
+++ b/pyagl/services/can.py
@@ -27,6 +27,7 @@ class CANService(AGLBaseService):
parser.add_argument('--auth', help='Send an authentication request', action='store_true')
parser.add_argument('--write', metavar='JSON', help='Write values to CAN')
parser.add_argument('--list', help='List CAN signals', action='store_true')
+ parser.add_argument('--get',type=str, help='get event from CAN')
def __init__(self, ip, port=None, service='service-can-low-level'):
super().__init__(api='low-can', ip=ip, port=port, service=service)
@@ -66,6 +67,11 @@ async def main(loop):
data = await svc.afbresponse()
print(data)
+ if args.get:
+ sessionid = await svc.get(args.get)
+ data = await svc.afbresponse()
+ print(data)
+
if args.list:
msgid = await svc.list()
data = await svc.afbresponse()