Browse Source

*** empty log message ***

David Rose 25 years ago
parent
commit
f7b228cfd0

+ 2 - 2
direct/src/distributed/ClientDistClass.py

@@ -72,12 +72,12 @@ class ClientDistClass:
         cdu.updateField(self, do, di)
         cdu.updateField(self, do, di)
         return None
         return None
 
 
-    def sendUpdate(self, cr, do, fieldName, args):
+    def sendUpdate(self, cr, do, fieldName, args, sendToId = None):
         # Look up the cdu
         # Look up the cdu
         assert(self.name2CDU.has_key(fieldName))
         assert(self.name2CDU.has_key(fieldName))
         cdu = self.name2CDU[fieldName]
         cdu = self.name2CDU[fieldName]
         # Let the cdu finish the job
         # Let the cdu finish the job
-        cdu.sendUpdate(cr, do, args)
+        cdu.sendUpdate(cr, do, args, sendToId)
         
         
 
 
     
     

+ 5 - 2
direct/src/distributed/ClientDistUpdate.py

@@ -72,12 +72,15 @@ class ClientDistUpdate:
         for i in range(0, numElems):
         for i in range(0, numElems):
             datagram.putArg(args[i], self.types[i], self.divisors[i])
             datagram.putArg(args[i], self.types[i], self.divisors[i])
     
     
-    def sendUpdate(self, cr, do, args):
+    def sendUpdate(self, cr, do, args, sendToId = None):
         datagram = Datagram.Datagram()
         datagram = Datagram.Datagram()
         # Add message type
         # Add message type
         datagram.addUint16(CLIENT_OBJECT_UPDATE_FIELD)
         datagram.addUint16(CLIENT_OBJECT_UPDATE_FIELD)
         # Add the DO id
         # Add the DO id
-        datagram.addUint32(do.doId)
+        if sendToId == None:
+            datagram.addUint32(do.doId)
+        else:
+            datagram.addUint32(sendToId)
         # Add the field id
         # Add the field id
         datagram.addUint16(self.number)
         datagram.addUint16(self.number)
         # Add the arguments
         # Add the arguments

+ 2 - 2
direct/src/distributed/ClientRepository.py

@@ -291,14 +291,14 @@ class ClientRepository(DirectObject.DirectObject):
         self.send(datagram)
         self.send(datagram)
         return None
         return None
         
         
-    def sendUpdate(self, do, fieldName, args):
+    def sendUpdate(self, do, fieldName, args, sendToId = None):
         # Get the DO id
         # Get the DO id
         doId = do.doId
         doId = do.doId
         # Get the cdc
         # Get the cdc
         assert(self.doId2cdc.has_key(doId))
         assert(self.doId2cdc.has_key(doId))
         cdc = self.doId2cdc[doId]
         cdc = self.doId2cdc[doId]
         # Let the cdc finish the job
         # Let the cdc finish the job
-        cdc.sendUpdate(self, do, fieldName, args)
+        cdc.sendUpdate(self, do, fieldName, args, sendToId)
 
 
     def send(self, datagram):
     def send(self, datagram):
         #if self.notify.getDebug():
         #if self.notify.getDebug():

+ 2 - 2
direct/src/distributed/DistributedObject.py

@@ -117,8 +117,8 @@ class DistributedObject(PandaObject):
             cdc.updateField(self, di)
             cdc.updateField(self, di)
         return None
         return None
 
 
-    def sendUpdate(self, fieldName, args):
-        self.cr.sendUpdate(self, fieldName, args)
+    def sendUpdate(self, fieldName, args, sendToId = None):
+        self.cr.sendUpdate(self, fieldName, args, sendToId)
 
 
     def taskName(self, taskString):
     def taskName(self, taskString):
         return (taskString + "-" + str(self.getDoId()))
         return (taskString + "-" + str(self.getDoId()))