From b790fb093d953d3e36a1f1874f56d4e2543b7747 Mon Sep 17 00:00:00 2001 From: Joe Britton Date: Tue, 25 Aug 2015 22:01:51 -0600 Subject: [PATCH] add ping() to novatech driver --- artiq/devices/novatech409b/driver.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/artiq/devices/novatech409b/driver.py b/artiq/devices/novatech409b/driver.py index 5bea7164e..ffe971012 100644 --- a/artiq/devices/novatech409b/driver.py +++ b/artiq/devices/novatech409b/driver.py @@ -210,3 +210,15 @@ class Novatech409B: result = [r.rstrip().decode() for r in result] logger.debug("got device status: %s", result) return result + + def ping(self): + try: + stat = self.get_status() + except: + return False + # check that version number matches is "21" + if stat[4][20:] == "21": + logger.debug("ping successful") + return True + else: + return False