Panda3D
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
OldClientRepository Class Reference
Inheritance diagram for OldClientRepository:
ClientRepositoryBase ConnectionRepository DoInterestManager DoCollectionManager

Public Member Functions

def __init__ (self, dcFileNames=None)
 
def createWithRequired (self, className, zoneId=0, optionalFields=None)
 
def generateWithRequiredFields (self, dclass, doId, di)
 
def handleDatagram (self, di)
 
def handleGenerateWithRequired (self, di)
 
def handleRequestGenerates (self, di)
 
def handleSetDOIDrange (self, di)
 
def haveCreateAuthority (self)
 
def isLocalId (self, id)
 
def sendDeleteMsg (self, doId)
 
def sendDisableMsg (self, doId)
 
def sendRemoveZoneMsg (self, zoneId, visibleZoneList=None)
 
def sendSetZoneMsg (self, zoneId, visibleZoneList=None)
 
def sendUpdateZone (self, obj, zoneId)
 
- Public Member Functions inherited from ClientRepositoryBase
def __init__ (self, dcFileNames=None, dcSuffix='', connectMethod=None, threadedNet=None)
 
def allocateContext (self)
 
def considerHeartbeat (self)
 
def disableDoId (self, doId, ownerView=False)
 
def doDeferredGenerate (self, task)
 
def doGenerate (self, parentId, zoneId, classId, doId, di)
 
def flushGenerates (self)
 
def generateWithRequiredFields (self, dclass, doId, di, parentId, zoneId)
 
def generateWithRequiredOtherFields (self, dclass, doId, di, parentId=None, zoneId=None)
 
def generateWithRequiredOtherFieldsOwner (self, dclass, doId, di)
 
def getObjectsOfClass (self, objClass)
 
def getObjectsOfExactClass (self, objClass)
 
def getServerDelta (self)
 
def getServerTimeOfDay (self)
 
def getTables (self, ownerView)
 
def getWorld (self, doId)
 
def handleDelete (self, di)
 
def handleGoGetLost (self, di)
 
def handleServerHeartbeat (self, di)
 
def handleSystemMessage (self, di)
 
def handleSystemMessageAknowledge (self, di)
 
def handleUpdateField (self, di)
 
def isLive (self)
 
def isLocalId (self, id)
 
def printDelayDeletes (self)
 
def replaceMethod (self, oldMethod, newFunction)
 
def replayDeferredGenerate (self, msgType, extra)
 
def sendHeartbeatTask (self, task)
 
def setDeferInterval (self, deferInterval)
 
def setServerDelta (self, delta)
 
def specialName (self, label)
 def queryObjectAll(self, doID, context=0): """ Get a one-time snapshot look at the object. More...
 
def startHeartbeat (self)
 
def stopHeartbeat (self)
 
def waitForNextHeartBeat (self)
 
- Public Member Functions inherited from ConnectionRepository
def __init__ (self, connectMethod, config, hasOwnerView=False, threadedNet=None)
 
def checkHttp (self)
 
def connect (self, serverList, successCallback=None, successArgs=[], failureCallback=None, failureArgs=[])
 
def disconnect (self)
 
def generateGlobalObject (self, doId, dcname, values=None)
 
def getServerAddress (self)
 
def handleDatagram (self, di)
 
def handleReaderOverflow (self)
 
def httpConnectCallback (self, ch, serverList, serverIndex, successCallback, successArgs, failureCallback, failureArgs)
 
def importModule (self, dcImports, moduleName, importSymbols)
 
def lostConnection (self)
 
def readDCFile (self, dcFileNames=None)
 
def readerPollOnce (self)
 
def readerPollUntilEmpty (self, task)
 
def send (self, datagram)
 
def shutdown (self)
 
def startReaderPollTask (self)
 
def stopReaderPollTask (self)
 
- Public Member Functions inherited from DoInterestManager
def __init__ (self)
 
def addAutoInterest (self, parentId, zoneIdList, description)
 
def addInterest (self, parentId, zoneIdList, description, event=None)
 
def alterInterest (self, handle, parentId, zoneIdList, description=None, event=None)
 
def cleanupWaitAllInterestsComplete (self)
 
def closeAutoInterests (self, obj)
 
def getAllInterestsCompleteEvent (self)
 
def handleInterestDoneMessage (self, di)
 
def isValidInterestHandle (self, handle)
 
def noNewInterests (self)
 
def openAutoInterests (self, obj)
 
def printInterestHistory (self)
 
def printInterests (self)
 
def printInterestSets (self)
 
def printInterestsIfDebug (self)
 
def queueAllInterestsCompleteEvent (self, frames=5)
 
def removeAIInterest (self, handle)
 
def removeAutoInterest (self, handle)
 
def removeInterest (self, handle, event=None)
 
def resetInterestStateForConnectionLoss (self)
 
def setAllInterestsCompleteCallback (self, callback)
 
def setNoNewInterests (self, flag)
 
def updateInterestDescription (self, handle, desc)
 
- Public Member Functions inherited from DoCollectionManager
def __init__ (self)
 
def addDOToTables (self, do, location=None, ownerView=False)
 
def callbackWithDo (self, doId, callback)
 
def callbackWithOwnerView (self, doId, callback)
 
def countObjects (self, classType)
 
def deleteDistributedObjects (self)
 
def deleteObjectLocation (self, object, parentId, zoneId)
 
def doByDistance (self)
 
def doFind (self, str)
 
def doFindAll (self, str)
 
def doFindAllInstances (self, cls)
 
def doFindAllMatching (self, str)
 
def doFindAllOfType (self, query)
 
def dosByDistance (self)
 
def findAnyOfType (self, type)
 
def getAllOfType (self, type)
 
def getDo (self, doId)
 
def getDoIdList (self, parentId, zoneId=None, classType=None)
 
def getDoList (self, parentId, zoneId=None, classType=None)
 
def getDoTable (self, ownerView)
 
def getGameDoId (self)
 
def getObjectsInZone (self, parentId, zoneId)
 def changeDOZoneInTables(self, do, newParentId, newZoneId, oldParentId, oldZoneId): if 1: self.storeObjectLocation(do.doId, newParentId, newZoneId) else: #assert not hasattr(do, "isQueryAllResponse") or not do.isQueryAllResponse oldLocation = (oldParentId, oldZoneId) newLocation = (newParentId, newZoneId)

HACK: DistributedGuildMemberUD starts in -1, -1, which isnt ever put in the

zoneId2doIds table

if self.isValidLocationTuple(oldLocation): assert self.notify.debugStateCall(self) assert oldLocation in self.zoneId2doIds assert do.doId in self.zoneId2doIds[oldLocation] assert do.doId not in self.zoneId2doIds.get(newLocation, {})

remove from old zone

del(self.zoneId2doIds[oldLocation][do.doId]) if len(self.zoneId2doIds[oldLocation]) == 0: del self.zoneId2doIds[oldLocation] if self.isValidLocationTuple(newLocation):

add to new zone

self.zoneId2doIds.setdefault(newLocation, {}) self.zoneId2doIds[newLocation][do.doId]=do More...
 
def getObjectsOfClassInZone (self, parentId, zoneId, objClass)
 
def getOwnerView (self, doId)
 
def getOwnerViewDoIdList (self, classType)
 
def getOwnerViewDoList (self, classType)
 
def handleObjectLocation (self, di)
 
def handleSetLocation (self, di)
 
def hasOwnerViewDoId (self, doId)
 
def isInDoTables (self, doId)
 
def isValidLocationTuple (self, location)
 
def printObjectCount (self)
 
def printObjects (self)
 
def removeDOFromTables (self, do)
 
def storeObjectLocation (self, object, parentId, zoneId)
 
def webPrintObjectCount (self)
 

Public Attributes

 DOIDbase
 
 DOIDlast
 
 DOIDnext
 
- Public Attributes inherited from ClientRepositoryBase
 bootedIndex
 
 bootedText
 
 cache
 
 cacheOwner
 
 context
 
 dcSuffix
 
 deferInterval
 
 deferredDoIds
 
 deferredGenerates
 
 doDataCache
 
 heartbeatInterval
 
 heartbeatStarted
 
 lastGenerate
 
 lastHeartbeat
 
 noDefer
 
 parentMgr
 
 recorder
 
 relatedObjectMgr
 
 serverDelta
 
 specialNameNumber
 
 timeManager
 
- Public Attributes inherited from ConnectionRepository
 bootedIndex
 if self.recorder and self.recorder.isPlaying(): More...
 
 bootedText
 
 config
 
 connectHttp
 
 connectMethod
 
 dclassesByName
 
 dclassesByNumber
 
 dcSuffix
 
 hashVal
 
 http
 
 private__di
 
 readerPollTaskObj
 
 recorder
 
 uniqueId
 
- Public Attributes inherited from DoCollectionManager
 doId2do
 
 doId2ownerView
 self.zoneId2doIds={} More...
 

Static Public Attributes

 notify = DirectNotifyGlobal.directNotify.newCategory("ClientRepository")
 
- Static Public Attributes inherited from ClientRepositoryBase
 notify = DirectNotifyGlobal.directNotify.newCategory("ClientRepositoryBase")
 
- Static Public Attributes inherited from ConnectionRepository
int CM_HTTP = 0
 
int CM_NATIVE = 2
 
int CM_NET = 1
 
string GarbageCollectTaskName = "allowGarbageCollect"
 
string GarbageThresholdTaskName = "adjustGarbageCollectThreshold"
 
 gcNotify = directNotify.newCategory("GarbageCollect")
 
 notify = DirectNotifyGlobal.directNotify.newCategory("ConnectionRepository")
 
 taskChain = None
 
int taskPriority = -30
 
- Static Public Attributes inherited from DoInterestManager
 dConfigParam
 
 InterestDebug = tempbase.config.GetBool('interest-debug', False)
 
 notify = directNotify.newCategory("DoInterestManager")
 
 tempbase = base
 
 types
 

Detailed Description

This is the open-source ClientRepository as provided by CMU.  It
communicates with the ServerRepository in this same directory.

If you are looking for the VR Studio's implementation of the
client repository, look to OTPClientRepository (elsewhere).

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  dcFileNames = None 
)

Member Function Documentation

◆ createWithRequired()

def createWithRequired (   self,
  className,
  zoneId = 0,
  optionalFields = None 
)

◆ generateWithRequiredFields()

def generateWithRequiredFields (   self,
  dclass,
  doId,
  di 
)

◆ handleDatagram()

def handleDatagram (   self,
  di 
)

◆ handleGenerateWithRequired()

def handleGenerateWithRequired (   self,
  di 
)

◆ handleRequestGenerates()

def handleRequestGenerates (   self,
  di 
)

◆ handleSetDOIDrange()

def handleSetDOIDrange (   self,
  di 
)

◆ haveCreateAuthority()

def haveCreateAuthority (   self)

◆ isLocalId()

def isLocalId (   self,
  id 
)

◆ sendDeleteMsg()

def sendDeleteMsg (   self,
  doId 
)

◆ sendDisableMsg()

def sendDisableMsg (   self,
  doId 
)

◆ sendRemoveZoneMsg()

def sendRemoveZoneMsg (   self,
  zoneId,
  visibleZoneList = None 
)

◆ sendSetZoneMsg()

def sendSetZoneMsg (   self,
  zoneId,
  visibleZoneList = None 
)

◆ sendUpdateZone()

def sendUpdateZone (   self,
  obj,
  zoneId 
)

Member Data Documentation

◆ DOIDbase

DOIDbase

◆ DOIDlast

DOIDlast

◆ DOIDnext

DOIDnext

◆ notify

notify = DirectNotifyGlobal.directNotify.newCategory("ClientRepository")
static