Exemplo n.º 1
0
 def decode(rsp, agent):
     _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)
Exemplo n.º 2
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     meta = [raritan.rpc.webcam.StorageManager.ImageStorageMetaData.decode(x0, agent) for x0 in rsp['meta']]
     typecheck.is_int(_ret_, DecodeException)
     for x0 in meta:
         typecheck.is_struct(x0, raritan.rpc.webcam.StorageManager.ImageStorageMetaData, DecodeException)
     return (_ret_, meta)
Exemplo n.º 3
0
 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
Exemplo n.º 4
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     results = [x0 for x0 in rsp['results']]
     typecheck.is_int(_ret_, DecodeException)
     for x0 in results:
         typecheck.is_string(x0, DecodeException)
     return (_ret_, results)
Exemplo n.º 5
0
 def encode(hostName, count):
     typecheck.is_string(hostName, AssertionError)
     typecheck.is_int(count, AssertionError)
     args = {}
     args['hostName'] = hostName
     args['count'] = count
     return args
Exemplo n.º 6
0
 def getRawValue(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'getRawValue', args)
     _ret_ = rsp['_ret_']
     typecheck.is_int(_ret_, DecodeException)
     return _ret_
Exemplo n.º 7
0
 def encode(portNum, hasPower):
     typecheck.is_int(portNum, AssertionError)
     typecheck.is_bool(hasPower, AssertionError)
     args = {}
     args['portNum'] = portNum
     args['hasPower'] = hasPower
     return args
Exemplo n.º 8
0
 def encode(blockTimeout, maxFailedLogins):
     typecheck.is_int(blockTimeout, AssertionError)
     typecheck.is_int(maxFailedLogins, AssertionError)
     args = {}
     args['blockTimeout'] = blockTimeout
     args['maxFailedLogins'] = maxFailedLogins
     return args
Exemplo n.º 9
0
 def getBridgeSlaveCount(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'getBridgeSlaveCount', args)
     _ret_ = rsp['_ret_']
     typecheck.is_int(_ret_, DecodeException)
     return _ret_
Exemplo n.º 10
0
 def encode(id, settings):
     typecheck.is_int(id, AssertionError)
     typecheck.is_struct(settings, raritan.rpc.servermon.ServerMonitor.ServerSettings, AssertionError)
     args = {}
     args['id'] = id
     args['settings'] = raritan.rpc.servermon.ServerMonitor.ServerSettings.encode(settings)
     return args
Exemplo n.º 11
0
 def encode(sessionId, reason):
     typecheck.is_int(sessionId, AssertionError)
     typecheck.is_enum(reason, raritan.rpc.session.SessionManager.CloseReason, AssertionError)
     args = {}
     args['sessionId'] = sessionId
     args['reason'] = raritan.rpc.session.SessionManager.CloseReason.encode(reason)
     return args
Exemplo n.º 12
0
 def installPendingKeyPair(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'installPendingKeyPair', args)
     _ret_ = rsp['_ret_']
     typecheck.is_int(_ret_, DecodeException)
     return _ret_
Exemplo n.º 13
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     values = [x0 for x0 in rsp['values']]
     typecheck.is_int(_ret_, DecodeException)
     for x0 in values:
         typecheck.is_string(x0, DecodeException)
     return (_ret_, values)
Exemplo n.º 14
0
 def encode(startIndex, count):
     typecheck.is_int(startIndex, AssertionError)
     typecheck.is_int(count, AssertionError)
     args = {}
     args['startIndex'] = startIndex
     args['count'] = count
     return args
Exemplo n.º 15
0
 def acknowledgeAlertStatus(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'acknowledgeAlertStatus', args)
     _ret_ = rsp['_ret_']
     typecheck.is_int(_ret_, DecodeException)
     return _ret_
Exemplo n.º 16
0
 def getIdleTimeoutSettings(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'getIdleTimeoutSettings', args)
     _ret_ = rsp['_ret_']
     typecheck.is_int(_ret_, DecodeException)
     return _ret_
Exemplo n.º 17
0
 def getIndex(self):
     agent = self.agent
     args = {}
     rsp = agent.json_rpc(self.target, 'getIndex', args)
     idx = rsp['idx']
     typecheck.is_int(idx, DecodeException)
     return idx
Exemplo n.º 18
0
        def __init__(self, tcp, serial, primaryUnitId):
            typecheck.is_struct(tcp, raritan.rpc.devsettings.Modbus.TcpSettings, AssertionError)
            typecheck.is_struct(serial, raritan.rpc.devsettings.Modbus.SerialSettings, AssertionError)
            typecheck.is_int(primaryUnitId, AssertionError)

            self.tcp = tcp
            self.serial = serial
            self.primaryUnitId = primaryUnitId
Exemplo n.º 19
0
        def __init__(self, id, name, enableAutoDST):
            typecheck.is_int(id, AssertionError)
            typecheck.is_string(name, AssertionError)
            typecheck.is_bool(enableAutoDST, AssertionError)

            self.id = id
            self.name = name
            self.enableAutoDST = enableAutoDST
Exemplo n.º 20
0
    def __init__(self, width, height, pixelFormat):
        typecheck.is_int(width, AssertionError)
        typecheck.is_int(height, AssertionError)
        typecheck.is_enum(pixelFormat, raritan.rpc.webcam.PixelFormat, AssertionError)

        self.width = width
        self.height = height
        self.pixelFormat = pixelFormat
Exemplo n.º 21
0
 def encode(requests, timeoutMs):
     for x0 in requests:
         typecheck.is_struct(x0, raritan.rpc.bulkrpc.BulkRequest.Request, AssertionError)
     typecheck.is_int(timeoutMs, AssertionError)
     args = {}
     args['requests'] = [raritan.rpc.bulkrpc.BulkRequest.Request.encode(x0) for x0 in requests]
     args['timeoutMs'] = timeoutMs
     return args
Exemplo n.º 22
0
        def __init__(self, imageMeta, fileSize, storageMeta):
            typecheck.is_struct(imageMeta, raritan.rpc.webcam.ImageMetaData, AssertionError)
            typecheck.is_int(fileSize, AssertionError)
            typecheck.is_struct(storageMeta, raritan.rpc.webcam.StorageManager.StorageMetaData, AssertionError)

            self.imageMeta = imageMeta
            self.fileSize = fileSize
            self.storageMeta = storageMeta
Exemplo n.º 23
0
        def __init__(self, id, name, info):
            typecheck.is_int(id, AssertionError)
            typecheck.is_string(name, AssertionError)
            typecheck.is_struct(info, raritan.rpc.usermgmt.Role.Info, AssertionError)

            self.id = id
            self.name = name
            self.info = info
Exemplo n.º 24
0
        def __init__(self, appProtoId, appProtoName, transportProtoName):
            typecheck.is_int(appProtoId, AssertionError)
            typecheck.is_string(appProtoName, AssertionError)
            typecheck.is_string(transportProtoName, AssertionError)

            self.appProtoId = appProtoId
            self.appProtoName = appProtoName
            self.transportProtoName = transportProtoName
Exemplo n.º 25
0
        def __init__(self, value, rawValue, metadata):
            typecheck.is_double(value, AssertionError)
            typecheck.is_int(rawValue, AssertionError)
            typecheck.is_struct(metadata, raritan.rpc.lhxmodel.Parameter.MetaData, AssertionError)

            self.value = value
            self.rawValue = rawValue
            self.metadata = metadata
Exemplo n.º 26
0
        def __init__(self, min, max, decdigits):
            typecheck.is_double(min, AssertionError)
            typecheck.is_double(max, AssertionError)
            typecheck.is_int(decdigits, AssertionError)

            self.min = min
            self.max = max
            self.decdigits = decdigits
Exemplo n.º 27
0
        def __init__(self, timestamp, available, value):
            typecheck.is_time(timestamp, AssertionError)
            typecheck.is_bool(available, AssertionError)
            typecheck.is_int(value, AssertionError)

            self.timestamp = timestamp
            self.available = available
            self.value = value
Exemplo n.º 28
0
    def __init__(self, creationTime, idFirst, idNext):
        typecheck.is_long(creationTime, AssertionError)
        typecheck.is_int(idFirst, AssertionError)
        typecheck.is_int(idNext, AssertionError)

        self.creationTime = creationTime
        self.idFirst = idFirst
        self.idNext = idNext
Exemplo n.º 29
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     session = raritan.rpc.session.Session.decode(rsp['session'], agent)
     token = rsp['token']
     typecheck.is_int(_ret_, DecodeException)
     typecheck.is_struct(session, raritan.rpc.session.Session, DecodeException)
     typecheck.is_string(token, DecodeException)
     return (_ret_, session, token)
Exemplo n.º 30
0
        def __init__(self, id, name, hasDSTInfo):
            typecheck.is_int(id, AssertionError)
            typecheck.is_string(name, AssertionError)
            typecheck.is_bool(hasDSTInfo, AssertionError)

            self.id = id
            self.name = name
            self.hasDSTInfo = hasDSTInfo
Exemplo n.º 31
0
 def encode(id):
     typecheck.is_int(id, AssertionError)
     args = {}
     args['id'] = id
     return args
Exemplo n.º 32
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     numPorts = rsp['numPorts']
     typecheck.is_int(_ret_, DecodeException)
     typecheck.is_int(numPorts, DecodeException)
     return (_ret_, numPorts)
Exemplo n.º 33
0
        def __init__(self, systemType, displayMode):
            typecheck.is_int(systemType, AssertionError)
            typecheck.is_int(displayMode, AssertionError)

            self.systemType = systemType
            self.displayMode = displayMode
Exemplo n.º 34
0
        def __init__(self, subject, keyLength):
            typecheck.is_struct(subject, raritan.rpc.cert.ServerSSLCert.CommonAttributes, AssertionError)
            typecheck.is_int(keyLength, AssertionError)

            self.subject = subject
            self.keyLength = keyLength
Exemplo n.º 35
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     captureToken = rsp['captureToken']
     typecheck.is_int(_ret_, DecodeException)
     typecheck.is_string(captureToken, DecodeException)
     return (_ret_, captureToken)
Exemplo n.º 36
0
 def encode(cycleTime_ms):
     typecheck.is_int(cycleTime_ms, AssertionError)
     args = {}
     args['cycleTime_ms'] = cycleTime_ms
     return args
Exemplo n.º 37
0
        def __init__(self, status, message):
            typecheck.is_int(status, AssertionError)
            typecheck.is_string(message, AssertionError)

            self.status = status
            self.message = message
Exemplo n.º 38
0
    def __init__(self, code, errtext):
        typecheck.is_int(code, AssertionError)
        typecheck.is_string(errtext, AssertionError)

        self.code = code
        self.errtext = errtext
Exemplo n.º 39
0
 def encode(portNum):
     typecheck.is_int(portNum, AssertionError)
     args = {}
     args['portNum'] = portNum
     return args
Exemplo n.º 40
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     id = rsp['id']
     typecheck.is_int(_ret_, DecodeException)
     typecheck.is_int(id, DecodeException)
     return (_ret_, id)
Exemplo n.º 41
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     errstr = rsp['errstr']
     typecheck.is_int(_ret_, DecodeException)
     typecheck.is_string(errstr, DecodeException)
     return (_ret_, errstr)
Exemplo n.º 42
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     cardInfo = raritan.rpc.smartcard.CardReader.CardInformation.decode(rsp['cardInfo'], agent)
     typecheck.is_int(_ret_, DecodeException)
     typecheck.is_struct(cardInfo, raritan.rpc.smartcard.CardReader.CardInformation, DecodeException)
     return (_ret_, cardInfo)
Exemplo n.º 43
0
 def setScanInterval(self, interval):
     agent = self.agent
     typecheck.is_int(interval, AssertionError)
     args = {}
     args['interval'] = interval
     rsp = agent.json_rpc(self.target, 'setScanInterval', args)
Exemplo n.º 44
0
 def encode(interval):
     typecheck.is_int(interval, AssertionError)
     args = {}
     args['interval'] = interval
     return args
Exemplo n.º 45
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     state = raritan.rpc.luaservice.ScriptState.decode(rsp['state'], agent)
     typecheck.is_int(_ret_, DecodeException)
     typecheck.is_struct(state, raritan.rpc.luaservice.ScriptState, DecodeException)
     return (_ret_, state)
Exemplo n.º 46
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     server = raritan.rpc.servermon.ServerMonitor.Server.decode(rsp['server'], agent)
     typecheck.is_int(_ret_, DecodeException)
     typecheck.is_struct(server, raritan.rpc.servermon.ServerMonitor.Server, DecodeException)
     return (_ret_, server)
Exemplo n.º 47
0
 def encode(rs485Addr):
     typecheck.is_int(rs485Addr, AssertionError)
     args = {}
     args['rs485Addr'] = rs485Addr
     return args
Exemplo n.º 48
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     script = rsp['script']
     typecheck.is_int(_ret_, DecodeException)
     typecheck.is_string(script, DecodeException)
     return (_ret_, script)
Exemplo n.º 49
0
 def encode(idleTimeout):
     typecheck.is_int(idleTimeout, AssertionError)
     args = {}
     args['idleTimeout'] = idleTimeout
     return args
Exemplo n.º 50
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     options = raritan.rpc.luaservice.ScriptOptions.decode(rsp['options'], agent)
     typecheck.is_int(_ret_, DecodeException)
     typecheck.is_struct(options, raritan.rpc.luaservice.ScriptOptions, DecodeException)
     return (_ret_, options)
Exemplo n.º 51
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     index = long(rsp['index'])
     typecheck.is_int(_ret_, DecodeException)
     typecheck.is_long(index, DecodeException)
     return (_ret_, index)
Exemplo n.º 52
0
        def __init__(self, host, enabled, pingInterval, retryInterval, activationCount, failureCount, resumeDelay, resumeCount):
            typecheck.is_string(host, AssertionError)
            typecheck.is_bool(enabled, AssertionError)
            typecheck.is_int(pingInterval, AssertionError)
            typecheck.is_int(retryInterval, AssertionError)
            typecheck.is_int(activationCount, AssertionError)
            typecheck.is_int(failureCount, AssertionError)
            typecheck.is_int(resumeDelay, AssertionError)
            typecheck.is_int(resumeCount, AssertionError)

            self.host = host
            self.enabled = enabled
            self.pingInterval = pingInterval
            self.retryInterval = retryInterval
            self.activationCount = activationCount
            self.failureCount = failureCount
            self.resumeDelay = resumeDelay
            self.resumeCount = resumeCount
Exemplo n.º 53
0
 def decode(rsp, agent):
     blockTimeout = rsp['blockTimeout']
     maxFailedLogins = rsp['maxFailedLogins']
     typecheck.is_int(blockTimeout, DecodeException)
     typecheck.is_int(maxFailedLogins, DecodeException)
     return (blockTimeout, maxFailedLogins)
Exemplo n.º 54
0
        def __init__(self, dialInEnabled, ringsUntilAnswer):
            typecheck.is_bool(dialInEnabled, AssertionError)
            typecheck.is_int(ringsUntilAnswer, AssertionError)

            self.dialInEnabled = dialInEnabled
            self.ringsUntilAnswer = ringsUntilAnswer
Exemplo n.º 55
0
    def __init__(self, json, statcode):
        typecheck.is_string(json, AssertionError)
        typecheck.is_int(statcode, AssertionError)

        self.json = json
        self.statcode = statcode
Exemplo n.º 56
0
    def __init__(self, maxScriptMemoryGrowth, maxAmountOfScripts, amountOfScripts, maxScriptSize, maxAllScriptSize, allScriptSize, outputBufferSize, restartInterval, autoStartDelay):
        typecheck.is_int(maxScriptMemoryGrowth, AssertionError)
        typecheck.is_int(maxAmountOfScripts, AssertionError)
        typecheck.is_int(amountOfScripts, AssertionError)
        typecheck.is_int(maxScriptSize, AssertionError)
        typecheck.is_int(maxAllScriptSize, AssertionError)
        typecheck.is_int(allScriptSize, AssertionError)
        typecheck.is_int(outputBufferSize, AssertionError)
        typecheck.is_int(restartInterval, AssertionError)
        typecheck.is_int(autoStartDelay, AssertionError)

        self.maxScriptMemoryGrowth = maxScriptMemoryGrowth
        self.maxAmountOfScripts = maxAmountOfScripts
        self.amountOfScripts = amountOfScripts
        self.maxScriptSize = maxScriptSize
        self.maxAllScriptSize = maxAllScriptSize
        self.allScriptSize = allScriptSize
        self.outputBufferSize = outputBufferSize
        self.restartInterval = restartInterval
        self.autoStartDelay = autoStartDelay
Exemplo n.º 57
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     typecheck.is_int(_ret_, DecodeException)
     return _ret_
Exemplo n.º 58
0
 def decode(rsp, agent):
     firstIndex = rsp['firstIndex']
     entryCount = rsp['entryCount']
     typecheck.is_int(firstIndex, DecodeException)
     typecheck.is_int(entryCount, DecodeException)
     return (firstIndex, entryCount)
Exemplo n.º 59
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     diagMsg = rsp['diagMsg']
     typecheck.is_int(_ret_, DecodeException)
     typecheck.is_string(diagMsg, DecodeException)
     return (_ret_, diagMsg)