def __init__(self, oldDevice, newDevice, source): super(raritan.rpc.portsmodel.Port.DeviceChangedEvent, self).__init__(source) typecheck.is_remote_obj(oldDevice, AssertionError) typecheck.is_remote_obj(newDevice, AssertionError) self.oldDevice = oldDevice self.newDevice = newDevice
def getModem(self): agent = self.agent args = {} rsp = agent.json_rpc(self.target, "getModem", args) _ret_ = Interface.decode(rsp["_ret_"], agent) typecheck.is_remote_obj(_ret_, DecodeException) return _ret_
def getDevice(self): agent = self.agent args = {} rsp = agent.json_rpc(self.target, 'getDevice', args) _ret_ = Interface.decode(rsp['_ret_'], agent) typecheck.is_remote_obj(_ret_, DecodeException) return _ret_
def cancelEvent(self, type, src): agent = self.agent typecheck.is_typeinfo(type, AssertionError) typecheck.is_remote_obj(src, AssertionError) args = {} args['type'] = raritan.rpc.TypeInfo.encode(type) args['src'] = Interface.encode(src) rsp = agent.json_rpc(self.target, 'cancelEvent', args)
def demandEvent(self, type, src): agent = self.agent typecheck.is_typeinfo(type, AssertionError) typecheck.is_remote_obj(src, AssertionError) args = {} args["type"] = raritan.rpc.TypeInfo.encode(type) args["src"] = Interface.encode(src) rsp = agent.json_rpc(self.target, "demandEvent", args)
def getDeviceConfig(self, deviceType): agent = self.agent typecheck.is_string(deviceType, AssertionError) args = {} args['deviceType'] = deviceType rsp = agent.json_rpc(self.target, 'getDeviceConfig', args) _ret_ = Interface.decode(rsp['_ret_'], agent) typecheck.is_remote_obj(_ret_, DecodeException) return _ret_
def lookup(self, name): agent = self.agent typecheck.is_string(name, AssertionError) args = {} args['name'] = name rsp = agent.json_rpc(self.target, 'lookup', args) _ret_ = Interface.decode(rsp['_ret_'], agent) typecheck.is_remote_obj(_ret_, DecodeException) return _ret_
def decode(rsp, agent): _ret_ = Interface.decode(rsp['_ret_'], agent) typecheck.is_remote_obj(_ret_, DecodeException) return _ret_
def __init__(self, source): typecheck.is_remote_obj(source, AssertionError) self.source = source
def __init__(self, modem, source): super(raritan.rpc.serial.SerialPort.ModemEvent, self).__init__(source) typecheck.is_remote_obj(modem, AssertionError) self.modem = modem
def __init__(self, type, src): typecheck.is_typeinfo(type, AssertionError) typecheck.is_remote_obj(src, AssertionError) self.type = type self.src = src