当前位置: 首页>>代码示例>>Python>>正文


Python typecheck.is_struct函数代码示例

本文整理汇总了Python中raritan.rpc.typecheck.is_struct函数的典型用法代码示例。如果您正苦于以下问题:Python is_struct函数的具体用法?Python is_struct怎么用?Python is_struct使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了is_struct函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

        def __init__(self, oldMetaData, newMetaData, source):
            super(raritan.rpc.lhxmodel.Parameter.MetaDataChangedEvent, self).__init__(source)
            typecheck.is_struct(oldMetaData, raritan.rpc.lhxmodel.Parameter.MetaData, AssertionError)
            typecheck.is_struct(newMetaData, raritan.rpc.lhxmodel.Parameter.MetaData, AssertionError)

            self.oldMetaData = oldMetaData
            self.newMetaData = newMetaData
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:7,代码来源:__init__.py

示例2: __init__

        def __init__(self, oldStatus, newStatus, source):
            super(raritan.rpc.powerlogic.PowerMeter.ErrorStatusChangedEvent, self).__init__(source)
            typecheck.is_struct(oldStatus, raritan.rpc.powerlogic.PowerMeter.ErrorStatus, AssertionError)
            typecheck.is_struct(newStatus, raritan.rpc.powerlogic.PowerMeter.ErrorStatus, AssertionError)

            self.oldStatus = oldStatus
            self.newStatus = newStatus
开发者ID:gsquire1,项目名称:Python,代码行数:7,代码来源:__init__.py

示例3: __init__

        def __init__(self, oldSettings, newSettings, actUserName, actIpAddr, source):
            super(raritan.rpc.emdmodel.Emd.SettingsChangedEvent, self).__init__(actUserName, actIpAddr, source)
            typecheck.is_struct(oldSettings, raritan.rpc.emdmodel.Emd.Settings, AssertionError)
            typecheck.is_struct(newSettings, raritan.rpc.emdmodel.Emd.Settings, AssertionError)

            self.oldSettings = oldSettings
            self.newSettings = newSettings
开发者ID:gsquire1,项目名称:automation,代码行数:7,代码来源:__init__.py

示例4: decode

 def decode(rsp, agent):
     info = raritan.rpc.usermgmt.UserInfo.decode(rsp['info'], agent)
     privileges = [raritan.rpc.usermgmt.Role.Privilege.decode(x0, agent) for x0 in rsp['privileges']]
     typecheck.is_struct(info, raritan.rpc.usermgmt.UserInfo, DecodeException)
     for x0 in privileges:
         typecheck.is_struct(x0, raritan.rpc.usermgmt.Role.Privilege, DecodeException)
     return (info, privileges)
开发者ID:gsquire1,项目名称:Python,代码行数:7,代码来源:__init__.py

示例5: encode

 def encode(reqInfo, days):
     typecheck.is_struct(reqInfo, raritan.rpc.cert.ServerSSLCert.ReqInfo, AssertionError)
     typecheck.is_int(days, AssertionError)
     args = {}
     args['reqInfo'] = raritan.rpc.cert.ServerSSLCert.ReqInfo.encode(reqInfo)
     args['days'] = days
     return args
开发者ID:gsquire1,项目名称:automation,代码行数:7,代码来源:__init__.py

示例6: encode

 def encode(name, info):
     typecheck.is_string(name, AssertionError)
     typecheck.is_struct(info, raritan.rpc.usermgmt.Role.Info, AssertionError)
     args = {}
     args['name'] = name
     args['info'] = raritan.rpc.usermgmt.Role.Info.encode(info)
     return args
开发者ID:gsquire1,项目名称:Python,代码行数:7,代码来源:__init__.py

示例7: getCapabilities

 def getCapabilities(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'getCapabilities', args)
     _ret_ = raritan.rpc.lhxmodel.Lhx.Capabilities.decode(rsp['_ret_'], agent)
     typecheck.is_struct(_ret_, raritan.rpc.lhxmodel.Lhx.Capabilities, DecodeException)
     return _ret_
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:7,代码来源:__init__.py

示例8: getThresholds

 def getThresholds(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'getThresholds', args)
     _ret_ = raritan.rpc.lhxmodel.Sensor.NumThresholds.decode(rsp['_ret_'], agent)
     typecheck.is_struct(_ret_, raritan.rpc.lhxmodel.Sensor.NumThresholds, DecodeException)
     return _ret_
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:7,代码来源:__init__.py

示例9: getReading

 def getReading(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'getReading', args)
     _ret_ = raritan.rpc.lhxmodel.Sensor.Reading.decode(rsp['_ret_'], agent)
     typecheck.is_struct(_ret_, raritan.rpc.lhxmodel.Sensor.Reading, DecodeException)
     return _ret_
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:7,代码来源:__init__.py

示例10: getValue

 def getValue(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'getValue', args)
     _ret_ = raritan.rpc.lhxmodel.Parameter.Value.decode(rsp['_ret_'], agent)
     typecheck.is_struct(_ret_, raritan.rpc.lhxmodel.Parameter.Value, DecodeException)
     return _ret_
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:7,代码来源:__init__.py

示例11: getOpState

 def getOpState(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'getOpState', args)
     _ret_ = raritan.rpc.lhxmodel.Lhx.OpState.decode(rsp['_ret_'], agent)
     typecheck.is_struct(_ret_, raritan.rpc.lhxmodel.Lhx.OpState, DecodeException)
     return _ret_
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:7,代码来源:__init__.py

示例12: getErrorStatus

 def getErrorStatus(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'getErrorStatus', args)
     _ret_ = raritan.rpc.powerlogic.PowerMeter.ErrorStatus.decode(rsp['_ret_'], agent)
     typecheck.is_struct(_ret_, raritan.rpc.powerlogic.PowerMeter.ErrorStatus, DecodeException)
     return _ret_
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:7,代码来源:__init__.py

示例13: getStatus

 def getStatus(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'getStatus', args)
     _ret_ = raritan.rpc.firmware.UpdateStatus.decode(rsp['_ret_'], agent)
     typecheck.is_struct(_ret_, raritan.rpc.firmware.UpdateStatus, DecodeException)
     return _ret_
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:7,代码来源:__init__.py

示例14: readDeviceIdentification

 def readDeviceIdentification(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'readDeviceIdentification', args)
     _ret_ = raritan.rpc.modbus.Device.DeviceID.decode(rsp['_ret_'], agent)
     typecheck.is_struct(_ret_, raritan.rpc.modbus.Device.DeviceID, DecodeException)
     return _ret_
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:7,代码来源:__init__.py

示例15: getInfo

 def getInfo(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'getInfo', args)
     _ret_ = raritan.rpc.logging.LogInfo.decode(rsp['_ret_'], agent)
     typecheck.is_struct(_ret_, raritan.rpc.logging.LogInfo, DecodeException)
     return _ret_
开发者ID:QualiSystems,项目名称:Raritan-PDU-Shell,代码行数:7,代码来源:__init__.py


注:本文中的raritan.rpc.typecheck.is_struct函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。