예제 #1
0
 def add(self, clientID, path, value, label):
     try:
         model = self._clients[clientID].model
     except KeyError:
         model = ipc_core.DataModel()
         self._clients[clientID] = self.Client(clientID, model)
     model.add(path, value, label)
예제 #2
0
 def __init__(self, element=None):
     super(ContentClientID, self).__init__(None)
     self._clients = {}
     if element is not None:
         e_content = element.find("Content")
         if e_content is not None:
             e_clients = e_content.find("Clients")
             if e_clients is not None:
                 client_nodes = e_clients.findall("Client")
                 for e_client in client_nodes:
                     ID = e_client.find("ID").text
                     self._clients[ID] = self.Client(ID, ipc_core.DataModel(e_client))