本文整理汇总了Python中raritan.rpc.typecheck.is_interface函数的典型用法代码示例。如果您正苦于以下问题:Python is_interface函数的具体用法?Python is_interface怎么用?Python is_interface使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了is_interface函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: encode
def encode(webcam, clientType):
typecheck.is_interface(webcam, raritan.rpc.webcam.Webcam, AssertionError)
typecheck.is_string(clientType, AssertionError)
args = {}
args['webcam'] = Interface.encode(webcam)
args['clientType'] = clientType
return args
开发者ID:gsquire1,项目名称:automation,代码行数:7,代码来源:__init__.py
示例2: getPeripheralDeviceManager
def getPeripheralDeviceManager(self):
agent = self.agent
args = {}
rsp = agent.json_rpc(self.target, 'getPeripheralDeviceManager', args)
_ret_ = Interface.decode(rsp['_ret_'], agent)
typecheck.is_interface(_ret_, raritan.rpc.peripheral.DeviceManager, DecodeException)
return _ret_
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:7,代码来源:__init__.py
示例3: getSensorLogger
def getSensorLogger(self):
agent = self.agent
args = {}
rsp = agent.json_rpc(self.target, 'getSensorLogger', args)
_ret_ = Interface.decode(rsp['_ret_'], agent)
typecheck.is_interface(_ret_, raritan.rpc.sensors.Logger, DecodeException)
return _ret_
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:7,代码来源:__init__.py
示例4: getWebcam
def getWebcam(self):
agent = self.agent
args = {}
rsp = agent.json_rpc(self.target, 'getWebcam', args)
_ret_ = Interface.decode(rsp['_ret_'], agent)
typecheck.is_interface(_ret_, raritan.rpc.webcam.Webcam, DecodeException)
return _ret_
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:7,代码来源:__init__.py
示例5: getActualValues
def getActualValues(self):
agent = self.agent
args = {}
rsp = agent.json_rpc(self.target, 'getActualValues', args)
_ret_ = [Interface.decode(x0, agent) for x0 in rsp['_ret_']]
for x0 in _ret_:
typecheck.is_interface(x0, raritan.rpc.lhxmodel.Parameter, DecodeException)
return _ret_
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:8,代码来源:__init__.py
示例6: getCardReaders
def getCardReaders(self):
agent = self.agent
args = {}
rsp = agent.json_rpc(self.target, 'getCardReaders', args)
_ret_ = [Interface.decode(x0, agent) for x0 in rsp['_ret_']]
for x0 in _ret_:
typecheck.is_interface(x0, raritan.rpc.smartcard.CardReader, DecodeException)
return _ret_
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:8,代码来源:__init__.py
示例7: getAuxiliaryPorts
def getAuxiliaryPorts(self):
agent = self.agent
args = {}
rsp = agent.json_rpc(self.target, 'getAuxiliaryPorts', args)
_ret_ = [Interface.decode(x0, agent) for x0 in rsp['_ret_']]
for x0 in _ret_:
typecheck.is_interface(x0, raritan.rpc.portsmodel.Port, DecodeException)
return _ret_
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:8,代码来源:__init__.py
示例8: getChannels
def getChannels(self):
agent = self.agent
args = {}
rsp = agent.json_rpc(self.target, 'getChannels', args)
_ret_ = [Interface.decode(x0, agent) for x0 in rsp['_ret_']]
for x0 in _ret_:
typecheck.is_interface(x0, raritan.rpc.webcam.Channel, DecodeException)
return _ret_
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:8,代码来源:__init__.py
示例9: __init__
def __init__(self, sensors, slots):
for x0 in sensors:
typecheck.is_interface(x0, raritan.rpc.sensors.Sensor, AssertionError)
for x0 in slots:
typecheck.is_interface(x0, raritan.rpc.peripheral.DeviceSlot, AssertionError)
self.sensors = sensors
self.slots = slots
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:8,代码来源:__init__.py
示例10: getCardReaderById
def getCardReaderById(self, readerId):
agent = self.agent
typecheck.is_string(readerId, AssertionError)
args = {}
args['readerId'] = readerId
rsp = agent.json_rpc(self.target, 'getCardReaderById', args)
_ret_ = Interface.decode(rsp['_ret_'], agent)
typecheck.is_interface(_ret_, raritan.rpc.smartcard.CardReader, DecodeException)
return _ret_
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:9,代码来源:__init__.py
示例11: stopActivity
def stopActivity(self, webcam):
agent = self.agent
typecheck.is_interface(webcam, raritan.rpc.webcam.Webcam, AssertionError)
args = {}
args['webcam'] = Interface.encode(webcam)
rsp = agent.json_rpc(self.target, 'stopActivity', args)
_ret_ = rsp['_ret_']
typecheck.is_int(_ret_, DecodeException)
return _ret_
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:9,代码来源:__init__.py
示例12: __init__
def __init__(self, webcam, interval, count, done):
typecheck.is_interface(webcam, raritan.rpc.webcam.Webcam, AssertionError)
typecheck.is_int(interval, AssertionError)
typecheck.is_int(count, AssertionError)
typecheck.is_int(done, AssertionError)
self.webcam = webcam
self.interval = interval
self.count = count
self.done = done
开发者ID:gsquire1,项目名称:automation,代码行数:10,代码来源:__init__.py
示例13: __init__
def __init__(self, l1, l2, l3, average):
typecheck.is_struct(l1, raritan.rpc.powerlogic.PowerMeter.MinMaxReading, AssertionError)
typecheck.is_struct(l2, raritan.rpc.powerlogic.PowerMeter.MinMaxReading, AssertionError)
typecheck.is_struct(l3, raritan.rpc.powerlogic.PowerMeter.MinMaxReading, AssertionError)
typecheck.is_interface(average, raritan.rpc.sensors.NumericSensor, AssertionError)
self.l1 = l1
self.l2 = l2
self.l3 = l3
self.average = average
开发者ID:gsquire1,项目名称:Python,代码行数:10,代码来源:__init__.py
示例14: getChannel
def getChannel(self, webcam, clientType):
agent = self.agent
typecheck.is_interface(webcam, raritan.rpc.webcam.Webcam, AssertionError)
typecheck.is_string(clientType, AssertionError)
args = {}
args['webcam'] = Interface.encode(webcam)
args['clientType'] = clientType
rsp = agent.json_rpc(self.target, 'getChannel', args)
_ret_ = rsp['_ret_']
channel = Interface.decode(rsp['channel'], agent)
typecheck.is_int(_ret_, DecodeException)
typecheck.is_interface(channel, raritan.rpc.webcam.Channel, DecodeException)
return (_ret_, channel)
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:13,代码来源:__init__.py
示例15: addImage
def addImage(self, webcam, image):
agent = self.agent
typecheck.is_interface(webcam, raritan.rpc.webcam.Webcam, AssertionError)
typecheck.is_struct(image, raritan.rpc.webcam.Image, AssertionError)
args = {}
args['webcam'] = Interface.encode(webcam)
args['image'] = raritan.rpc.webcam.Image.encode(image)
rsp = agent.json_rpc(self.target, 'addImage', args)
_ret_ = rsp['_ret_']
index = long(rsp['index'])
typecheck.is_int(_ret_, DecodeException)
typecheck.is_long(index, DecodeException)
return (_ret_, index)
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:13,代码来源:__init__.py
示例16: startActivity
def startActivity(self, webcam, count, interval):
agent = self.agent
typecheck.is_interface(webcam, raritan.rpc.webcam.Webcam, AssertionError)
typecheck.is_int(count, AssertionError)
typecheck.is_int(interval, AssertionError)
args = {}
args['webcam'] = Interface.encode(webcam)
args['count'] = count
args['interval'] = interval
rsp = agent.json_rpc(self.target, 'startActivity', args)
_ret_ = rsp['_ret_']
typecheck.is_int(_ret_, DecodeException)
return _ret_
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:13,代码来源:__init__.py
示例17: removeImages
def removeImages(self, webcam, start, count, direction):
agent = self.agent
typecheck.is_interface(webcam, raritan.rpc.webcam.Webcam, AssertionError)
typecheck.is_long(start, AssertionError)
typecheck.is_int(count, AssertionError)
typecheck.is_enum(direction, raritan.rpc.webcam.StorageManager.Direction, AssertionError)
args = {}
args['webcam'] = Interface.encode(webcam)
args['start'] = start
args['count'] = count
args['direction'] = raritan.rpc.webcam.StorageManager.Direction.encode(direction)
rsp = agent.json_rpc(self.target, 'removeImages', args)
_ret_ = rsp['_ret_']
typecheck.is_int(_ret_, DecodeException)
return _ret_
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:15,代码来源:__init__.py
示例18: getPeripheralDeviceTimedRecords
def getPeripheralDeviceTimedRecords(self, slot, recid, count):
agent = self.agent
typecheck.is_interface(slot, raritan.rpc.peripheral.DeviceSlot, AssertionError)
typecheck.is_int(recid, AssertionError)
typecheck.is_int(count, AssertionError)
args = {}
args['slot'] = Interface.encode(slot)
args['recid'] = recid
args['count'] = count
rsp = agent.json_rpc(self.target, 'getPeripheralDeviceTimedRecords', args)
_ret_ = rsp['_ret_']
recs = [raritan.rpc.sensors.Logger.TimedRecord.decode(x0, agent) for x0 in rsp['recs']]
typecheck.is_int(_ret_, DecodeException)
for x0 in recs:
typecheck.is_struct(x0, raritan.rpc.sensors.Logger.TimedRecord, DecodeException)
return (_ret_, recs)
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:16,代码来源:__init__.py
示例19: getImages
def getImages(self, webcam, start, count, direction):
agent = self.agent
typecheck.is_interface(webcam, raritan.rpc.webcam.Webcam, AssertionError)
typecheck.is_long(start, AssertionError)
typecheck.is_int(count, AssertionError)
typecheck.is_enum(direction, raritan.rpc.webcam.StorageManager.Direction, AssertionError)
args = {}
args['webcam'] = Interface.encode(webcam)
args['start'] = start
args['count'] = count
args['direction'] = raritan.rpc.webcam.StorageManager.Direction.encode(direction)
rsp = agent.json_rpc(self.target, 'getImages', args)
_ret_ = rsp['_ret_']
image = [raritan.rpc.webcam.StorageManager.StorageImage.decode(x0, agent) for x0 in rsp['image']]
typecheck.is_int(_ret_, DecodeException)
for x0 in image:
typecheck.is_struct(x0, raritan.rpc.webcam.StorageManager.StorageImage, DecodeException)
return (_ret_, image)
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:18,代码来源:__init__.py
示例20: decode
def decode(rsp, agent):
_ret_ = Interface.decode(rsp['_ret_'], agent)
typecheck.is_interface(_ret_, raritan.rpc.sensors.Logger, DecodeException)
return _ret_
开发者ID:gsquire1,项目名称:automation,代码行数:4,代码来源:__init__.py
注:本文中的raritan.rpc.typecheck.is_interface函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论