Beispiel #1
0
 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)
Beispiel #2
0
        def __init__(self, index, webcam):
            typecheck.is_long(index, AssertionError)
            typecheck.is_interface(webcam, raritan.rpc.webcam.Webcam,
                                   AssertionError)

            self.index = index
            self.webcam = webcam
 def getMetaData(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, 'getMetaData', args)
     _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)
Beispiel #4
0
 def encode(name, iAddr):
     typecheck.is_string(name, AssertionError)
     typecheck.is_long(iAddr, AssertionError)
     args = {}
     args['name'] = name
     args['iAddr'] = iAddr
     return args
Beispiel #5
0
 def encode(name, iAddr):
     typecheck.is_string(name, AssertionError)
     typecheck.is_long(iAddr, AssertionError)
     args = {}
     args['name'] = name
     args['iAddr'] = iAddr
     return args
Beispiel #6
0
    def __init__(self, type, name, value):
        typecheck.is_enum(type, raritan.rpc.res_mon.Entry.Type, AssertionError)
        typecheck.is_string(name, AssertionError)
        typecheck.is_long(value, AssertionError)

        self.type = type
        self.name = name
        self.value = value
Beispiel #7
0
    def __init__(self, type, name, value):
        typecheck.is_enum(type, raritan.rpc.res_mon.Entry.Type, AssertionError)
        typecheck.is_string(name, AssertionError)
        typecheck.is_long(value, AssertionError)

        self.type = type
        self.name = name
        self.value = value
Beispiel #8
0
    def __init__(self, format, timestamp, location):
        typecheck.is_struct(format, raritan.rpc.webcam.Format, AssertionError)
        typecheck.is_long(timestamp, AssertionError)
        typecheck.is_struct(location, raritan.rpc.webcam.Location, AssertionError)

        self.format = format
        self.timestamp = timestamp
        self.location = location
Beispiel #9
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
    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
Beispiel #11
0
        def __init__(self, webcam, newestIndex, oldestIndex, count):
            typecheck.is_interface(webcam, raritan.rpc.webcam.Webcam, AssertionError)
            typecheck.is_long(newestIndex, AssertionError)
            typecheck.is_long(oldestIndex, AssertionError)
            typecheck.is_int(count, AssertionError)

            self.webcam = webcam
            self.newestIndex = newestIndex
            self.oldestIndex = oldestIndex
            self.count = count
    def __init__(self, logCreationTime, idFirst, allEntryCnt, selEntries):
        typecheck.is_long(logCreationTime, AssertionError)
        typecheck.is_int(idFirst, AssertionError)
        typecheck.is_int(allEntryCnt, AssertionError)
        for x0 in selEntries:
            typecheck.is_struct(x0, raritan.rpc.logging.LogEntry, AssertionError)

        self.logCreationTime = logCreationTime
        self.idFirst = idFirst
        self.allEntryCnt = allEntryCnt
        self.selEntries = selEntries
Beispiel #13
0
    def __init__(self, logCreationTime, idFirst, allEntryCnt, selEntries):
        typecheck.is_long(logCreationTime, AssertionError)
        typecheck.is_int(idFirst, AssertionError)
        typecheck.is_int(allEntryCnt, AssertionError)
        for x0 in selEntries:
            typecheck.is_struct(x0, raritan.rpc.logging.LogEntry, AssertionError)

        self.logCreationTime = logCreationTime
        self.idFirst = idFirst
        self.allEntryCnt = allEntryCnt
        self.selEntries = selEntries
Beispiel #14
0
 def encode(webcam, start, count, direction):
     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)
     return args
Beispiel #15
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     oAddr = int(rsp['oAddr'])
     nAddr = int(rsp['nAddr'])
     oString = rsp['oString']
     more = rsp['more']
     typecheck.is_int(_ret_, DecodeException)
     typecheck.is_long(oAddr, DecodeException)
     typecheck.is_long(nAddr, DecodeException)
     typecheck.is_string(oString, DecodeException)
     typecheck.is_bool(more, DecodeException)
     return (_ret_, oAddr, nAddr, oString, more)
Beispiel #16
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     oAddr = int(rsp['oAddr'])
     nAddr = int(rsp['nAddr'])
     oString = rsp['oString']
     more = rsp['more']
     typecheck.is_int(_ret_, DecodeException)
     typecheck.is_long(oAddr, DecodeException)
     typecheck.is_long(nAddr, DecodeException)
     typecheck.is_string(oString, DecodeException)
     typecheck.is_bool(more, DecodeException)
     return (_ret_, oAddr, nAddr, oString, more)
 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)
Beispiel #18
0
        def __init__(self, id, value, thresholdValue, rawValue, powerOnHours, timeStampUTC):
            typecheck.is_string(id, AssertionError)
            typecheck.is_int(value, AssertionError)
            typecheck.is_int(thresholdValue, AssertionError)
            typecheck.is_long(rawValue, AssertionError)
            typecheck.is_int(powerOnHours, AssertionError)
            typecheck.is_time(timeStampUTC, AssertionError)

            self.id = id
            self.value = value
            self.thresholdValue = thresholdValue
            self.rawValue = rawValue
            self.powerOnHours = powerOnHours
            self.timeStampUTC = timeStampUTC
Beispiel #19
0
 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 = int(rsp["index"])
     typecheck.is_int(_ret_, DecodeException)
     typecheck.is_long(index, DecodeException)
     return (_ret_, index)
Beispiel #20
0
        def __init__(self, id, value, thresholdValue, rawValue, powerOnHours, timeStampUTC):
            typecheck.is_string(id, AssertionError)
            typecheck.is_int(value, AssertionError)
            typecheck.is_int(thresholdValue, AssertionError)
            typecheck.is_long(rawValue, AssertionError)
            typecheck.is_int(powerOnHours, AssertionError)
            typecheck.is_time(timeStampUTC, AssertionError)

            self.id = id
            self.value = value
            self.thresholdValue = thresholdValue
            self.rawValue = rawValue
            self.powerOnHours = powerOnHours
            self.timeStampUTC = timeStampUTC
 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_
Beispiel #22
0
        def __init__(self, id, value, maxValue, worstValue, thresholdValue, rawValue, flags):
            typecheck.is_string(id, AssertionError)
            typecheck.is_int(value, AssertionError)
            typecheck.is_int(maxValue, AssertionError)
            typecheck.is_int(worstValue, AssertionError)
            typecheck.is_int(thresholdValue, AssertionError)
            typecheck.is_long(rawValue, AssertionError)
            typecheck.is_int(flags, AssertionError)

            self.id = id
            self.value = value
            self.maxValue = maxValue
            self.worstValue = worstValue
            self.thresholdValue = thresholdValue
            self.rawValue = rawValue
            self.flags = flags
Beispiel #23
0
        def __init__(self, id, value, maxValue, worstValue, thresholdValue, rawValue, flags):
            typecheck.is_string(id, AssertionError)
            typecheck.is_int(value, AssertionError)
            typecheck.is_int(maxValue, AssertionError)
            typecheck.is_int(worstValue, AssertionError)
            typecheck.is_int(thresholdValue, AssertionError)
            typecheck.is_long(rawValue, AssertionError)
            typecheck.is_int(flags, AssertionError)

            self.id = id
            self.value = value
            self.maxValue = maxValue
            self.worstValue = worstValue
            self.thresholdValue = thresholdValue
            self.rawValue = rawValue
            self.flags = flags
 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)
Beispiel #25
0
        def __init__(self, index, webcam):
            typecheck.is_long(index, AssertionError)
            typecheck.is_interface(webcam, raritan.rpc.webcam.Webcam, AssertionError)

            self.index = index
            self.webcam = webcam
Beispiel #26
0
 def decode(rsp, agent):
     _ret_ = rsp['_ret_']
     index = int(rsp['index'])
     typecheck.is_int(_ret_, DecodeException)
     typecheck.is_long(index, DecodeException)
     return (_ret_, index)