def invoke(self, arg, from_tty): obj = objects.information.object_return(self.api, self._class) inst = chains.control(obj) if inst.empty(): print ' error: empty chain' return nd = inst.first() i = 0 while not nd.null(): wd = watchdog.control(nd.cast('Watchdog_Control')) print ' #'+str(i) print wd.to_string() nd.next() i += 1
def invoke(self, arg, from_tty): obj = objects.information.object_return(self.api, self._class) inst = chains.control(obj) if inst.empty(): print(' error: empty chain') return nd = inst.first() i = 0 while not nd.null(): wd = watchdog.control(nd.cast('Watchdog_Control')) print(' #'+str(i)) print(wd.to_string()) nd.next() i += 1
def __init__(self, obj): self.reference = obj self.object = obj.dereference() self.object_control = objects.control(self.object['Object']) self.watchdog = watchdog.control(self.object['Ticker'])