Exemple #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)
Exemple #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)
Exemple #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
Exemple #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)
Exemple #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
 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_
Exemple #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
Exemple #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
 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_
Exemple #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
Exemple #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
 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_
Exemple #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)
Exemple #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
 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_
 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_
 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
Exemple #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
Exemple #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
Exemple #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
Exemple #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
Exemple #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
Exemple #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
        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
        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
        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
        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
    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
Exemple #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)
Exemple #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
Exemple #31
0
 def encode(id):
     typecheck.is_int(id, AssertionError)
     args = {}
     args['id'] = id
     return args
Exemple #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)
Exemple #33
0
        def __init__(self, systemType, displayMode):
            typecheck.is_int(systemType, AssertionError)
            typecheck.is_int(displayMode, AssertionError)

            self.systemType = systemType
            self.displayMode = displayMode
        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
Exemple #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)
Exemple #36
0
 def encode(cycleTime_ms):
     typecheck.is_int(cycleTime_ms, AssertionError)
     args = {}
     args['cycleTime_ms'] = cycleTime_ms
     return args
Exemple #37
0
        def __init__(self, status, message):
            typecheck.is_int(status, AssertionError)
            typecheck.is_string(message, AssertionError)

            self.status = status
            self.message = message
Exemple #38
0
    def __init__(self, code, errtext):
        typecheck.is_int(code, AssertionError)
        typecheck.is_string(errtext, AssertionError)

        self.code = code
        self.errtext = errtext
Exemple #39
0
 def encode(portNum):
     typecheck.is_int(portNum, AssertionError)
     args = {}
     args['portNum'] = portNum
     return args
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #44
0
 def encode(interval):
     typecheck.is_int(interval, AssertionError)
     args = {}
     args['interval'] = interval
     return args
Exemple #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)
Exemple #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)
Exemple #47
0
 def encode(rs485Addr):
     typecheck.is_int(rs485Addr, AssertionError)
     args = {}
     args['rs485Addr'] = rs485Addr
     return args
Exemple #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)
Exemple #49
0
 def encode(idleTimeout):
     typecheck.is_int(idleTimeout, AssertionError)
     args = {}
     args['idleTimeout'] = idleTimeout
     return args
Exemple #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)
Exemple #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)
Exemple #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
Exemple #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)
Exemple #54
0
        def __init__(self, dialInEnabled, ringsUntilAnswer):
            typecheck.is_bool(dialInEnabled, AssertionError)
            typecheck.is_int(ringsUntilAnswer, AssertionError)

            self.dialInEnabled = dialInEnabled
            self.ringsUntilAnswer = ringsUntilAnswer
Exemple #55
0
    def __init__(self, json, statcode):
        typecheck.is_string(json, AssertionError)
        typecheck.is_int(statcode, AssertionError)

        self.json = json
        self.statcode = statcode
Exemple #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
Exemple #57
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     typecheck.is_int(_ret_, DecodeException)
     return _ret_
Exemple #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)
Exemple #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)