Beispiel #1
0
 def __init__(self):
     '''
     Constructor
     '''
     self.store = {}
     self.address = "http://localhost:12000/"
     for t in schema.sets:
         self.store[t] = {}
     self.encoder = CADISEncoder()
Beispiel #2
0
 def __init__(self, address="http://localhost:12000"):
     '''
     address: includes port. e.g. http://localhost:9000
     sim: identifier name for the simulator using this store
     '''
     self.encoder = CADISEncoder()
     if not address.endswith('/'):
         address += '/'
     self.address = address
Beispiel #3
0
    def __init__(self, store=None):
        '''
        Constructor
        '''
        self.app = None
        self.timer = None
        self.interval = None
        self.track_changes = False
        self.step = 0
        self.curtime = time.time()
        self.__Logger = logger

        # Local storage for thread
        self.tlocal = None

        # Stores objects from store
        self.storebuffer = {}

        # Stores new objects since last pull
        self.new_storebuffer = {}
        # Stores modified objects since last pull
        self.mod_storebuffer = {}
        # Store removed objects since last pull
        self.del_storebuffer = {}

        # Types that are being observed (read) by this application
        self.observed = set()
        # Stores the types that can be updated (read/write) by app
        self.updated = set()
        # Stores the types that can be produced by app
        self.produced = set()
        # Stores the types that can be retrieved by app
        self.newlyproduced = {}

        # Properties that changed during this iteration
        self.changedproperties = {}

        # List of objects to be pushed to the store (no subsets)
        self.pushlist = {}

        # List of objects marked for deletion
        self.deletelist = {}

        # Holds a k,v storage of foreign keys (e.g. name -> id)
        self.fkdict = {}

        # Disables fetching of subsets
        self.subset_disable = set()

        self.timer = None
        self.step = 0
        self.thread = None
        self.encoder = CADISEncoder()
        if store:
            logger.debug("%s received store %s", LOG_HEADER, store)
            Frame.Store = store
Beispiel #4
0
 def __init__(self):
     '''
     Constructor
     '''
     self.address = "http://localhost:12000/"
     self.encoder = CADISEncoder()