Panda3D
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
DistributedObjectAI Class Reference
Inheritance diagram for DistributedObjectAI:
DistributedObjectBase DirectObject DistributedCameraAI DistributedNodeAI DistributedObjectGlobalAI TimeManagerAI DistributedCartesianGridAI DistributedSmoothNodeAI

Public Member Functions

def __init__ (self, air)
 
def announceGenerate (self)
 
def b_setLocation (self, parentId, zoneId)
 
def beginBarrier (self, name, avIds, timeout, callback)
 
def d_setLocation (self, parentId, zoneId)
 
def delete (self)
 
def deleteOrDelay (self)
 
def execCommand (self, string, mwMgrId, avId, zoneId)
 
def generate (self)
 
def generateInit (self, repository=None)
 
def generateOtpObject (self, parentId, zoneId, optionalFields=[], doId=None)
 
def generateTargetChannel (self, repository)
 
def generateWithRequired (self, zoneId, optionalFields=[])
 
def generateWithRequiredAndId (self, doId, parentId, zoneId, optionalFields=[])
 
def GetAccountConnectionChannel (self, doId)
 
def GetAccountIDFromChannelCode (self, channel)
 
def GetAvatarIDFromChannelCode (self, channel)
 
def getBarrierData (self)
 
def getCacheable (self)
 
def getCollTrav (self, *args, **kArgs)
 
def getDelayDeleteCount (self)
 
def getDeleteEvent (self)
 
def getDoId (self)
 
def getLocation (self)
 
def getLogicalZoneChangeEvent (self)
 
def getNonCollidableParent (self)
 
def getParentMgr (self)
 
def GetPuppetConnectionChannel (self, doId)
 
def getRender (self)
 
def getZoneChangeEvent (self)
 
def getZoneData (self)
 
def handleLogicalZoneChange (self, newZoneId, oldZoneId)
 
def ignoreBarrier (self, context)
 
def initFromServerResponse (self, valDict)
 
def isDeleted (self)
 
def isGenerated (self)
 
def isGridParent (self)
 
def postGenerateMessage (self)
 
def preAllocateDoId (self)
 
def releaseZoneData (self)
 
def requestDelete (self)
 
def sendDeleteEvent (self)
 
def sendGenerateWithRequired (self, repository, parentId, zoneId, optionalFields=[])
 
def sendMessageBundle (self)
 
def sendUpdate (self, fieldName, args=[])
 
def sendUpdateToAccountId (self, accountId, fieldName, args)
 
def sendUpdateToAvatarId (self, avId, fieldName, args)
 
def sendUpdateToChannel (self, channelId, fieldName, args)
 
def setAI (self, aiChannel)
 
def setBarrierReady (self, context)
 
def setLocation (self, parentId, zoneId)
 
def startMessageBundle (self, name)
 
def status (self, indent=0)
 
def taskName (self, taskString)
 
def uniqueName (self, idString)
 
def updateAllRequiredFields (self, dclass, di)
 
def updateAllRequiredOtherFields (self, dclass, di)
 
def updateRequiredFields (self, dclass, di)
 
def updateRequiredOtherFields (self, dclass, di)
 
def validate (self, avId, bool, msg)
 
- Public Member Functions inherited from DistributedObjectBase
def getParentObj (self)
 
def handleChildArrive (self, childObj, zoneId)
 
def handleChildArriveZone (self, childObj, zoneId)
 
def handleChildLeave (self, childObj, zoneId)
 
def handleChildLeaveZone (self, childObj, zoneId)
 
def handleQueryObjectChildrenLocalDone (self, context)
 
def hasParentingRules (self)
 
- Public Member Functions inherited from DirectObject
def __init__ (self)
 
def accept (self, event, method, extraArgs=[])
 
def acceptOnce (self, event, method, extraArgs=[])
 
def addTask (self, *args, **kwargs)
 
def detectLeaks (self)
 
def doMethodLater (self, *args, **kwargs)
 
def getAllAccepting (self)
 
def ignore (self, event)
 
def ignoreAll (self)
 
def isAccepting (self, event)
 
def isIgnoring (self, event)
 
def removeAllTasks (self)
 
def removeTask (self, taskOrName)
 

Static Public Member Functions

def staticGetLogicalZoneChangeEvent (doId)
 
def staticGetZoneChangeEvent (doId)
 

Public Attributes

 accountName
 
 air
 Asad: As per Roger's suggestion, turn off the following block until a solution is thought out of how to prevent this delete message or to handle this message better TODO: do we still need this check? More...
 
 dclass
 
 DistributedObjectAI_initialized
 
 doId
 
 lastNonQuietZone
 
 parentId
 
 zoneId
 
- Public Attributes inherited from DistributedObjectBase
 cr
 
 parentId
 
 zoneId
 

Static Public Attributes

 notify = directNotify.newCategory("DistributedObjectAI")
 
int QuietZone = 1
 
- Static Public Attributes inherited from DistributedObjectBase
 notify = directNotify.newCategory("DistributedObjectBase")
 
- Static Public Attributes inherited from DirectObject
def accept_once = acceptOnce
 
def add_task = addTask
 
def detect_leaks = detectLeaks
 
def do_method_later = doMethodLater
 
def get_all_accepting = getAllAccepting
 
def ignore_all = ignoreAll
 
def is_accepting = isAccepting
 
def is_ignoring = isIgnoring
 
def remove_all_tasks = removeAllTasks
 
def remove_task = removeTask
 

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  air 
)

Member Function Documentation

◆ announceGenerate()

def announceGenerate (   self)
Called after the object has been generated and all
of its required fields filled in. Overwrite when needed.

Reimplemented in DistributedObjectGlobalAI.

◆ b_setLocation()

def b_setLocation (   self,
  parentId,
  zoneId 
)

◆ beginBarrier()

def beginBarrier (   self,
  name,
  avIds,
  timeout,
  callback 
)

◆ d_setLocation()

def d_setLocation (   self,
  parentId,
  zoneId 
)

◆ delete()

def delete (   self)
Inheritors should redefine this to take appropriate action on delete
Note that this may be called multiple times if a class inherits
from DistributedObjectAI more than once.

Reimplemented from DistributedObjectBase.

Reimplemented in DistributedCartesianGridAI, DistributedObjectGlobalAI, DistributedSmoothNodeAI, and DistributedNodeAI.

◆ deleteOrDelay()

def deleteOrDelay (   self)
This method exists only to mirror the similar method on
DistributedObject.  AI objects don't have delayDelete, they
just get deleted immediately. 

◆ execCommand()

def execCommand (   self,
  string,
  mwMgrId,
  avId,
  zoneId 
)

◆ generate()

def generate (   self)
Inheritors should put functions that require self.zoneId or
other networked info in this function.

Reimplemented in DistributedSmoothNodeAI.

◆ generateInit()

def generateInit (   self,
  repository = None 
)
First generate (not from cache).

◆ generateOtpObject()

def generateOtpObject (   self,
  parentId,
  zoneId,
  optionalFields = [],
  doId = None 
)

◆ generateTargetChannel()

def generateTargetChannel (   self,
  repository 
)
Who to send this to for generate messages

◆ generateWithRequired()

def generateWithRequired (   self,
  zoneId,
  optionalFields = [] 
)

◆ generateWithRequiredAndId()

def generateWithRequiredAndId (   self,
  doId,
  parentId,
  zoneId,
  optionalFields = [] 
)

◆ GetAccountConnectionChannel()

def GetAccountConnectionChannel (   self,
  doId 
)

◆ GetAccountIDFromChannelCode()

def GetAccountIDFromChannelCode (   self,
  channel 
)

◆ GetAvatarIDFromChannelCode()

def GetAvatarIDFromChannelCode (   self,
  channel 
)

◆ getBarrierData()

def getBarrierData (   self)

◆ getCacheable()

def getCacheable (   self)
This method exists only to mirror the similar method on
DistributedObject.  AI objects aren't cacheable. 

◆ getCollTrav()

def getCollTrav (   self,
args,
**  kArgs 
)

◆ getDelayDeleteCount()

def getDelayDeleteCount (   self)

◆ getDeleteEvent()

def getDeleteEvent (   self)

◆ getDoId()

def getDoId (   self)
Return the distributed object id

◆ getLocation()

def getLocation (   self)

Reimplemented from DistributedObjectBase.

◆ getLogicalZoneChangeEvent()

def getLogicalZoneChangeEvent (   self)

◆ getNonCollidableParent()

def getNonCollidableParent (   self)

◆ getParentMgr()

def getParentMgr (   self)

◆ GetPuppetConnectionChannel()

def GetPuppetConnectionChannel (   self,
  doId 
)

◆ getRender()

def getRender (   self)

◆ getZoneChangeEvent()

def getZoneChangeEvent (   self)

◆ getZoneData()

def getZoneData (   self)

◆ handleLogicalZoneChange()

def handleLogicalZoneChange (   self,
  newZoneId,
  oldZoneId 
)
this function gets called as if we never go through the
quiet zone. Note that it is called once you reach the newZone,
and not at the time that you leave the oldZone.

◆ ignoreBarrier()

def ignoreBarrier (   self,
  context 
)

◆ initFromServerResponse()

def initFromServerResponse (   self,
  valDict 
)

◆ isDeleted()

def isDeleted (   self)
Returns true if the object has been deleted,
or if it is brand new and hasnt yet been generated.

◆ isGenerated()

def isGenerated (   self)
Returns true if the object has been generated

◆ isGridParent()

def isGridParent (   self)

Reimplemented in DistributedCartesianGridAI.

◆ postGenerateMessage()

def postGenerateMessage (   self)

◆ preAllocateDoId()

def preAllocateDoId (   self)
objects that need to have a doId before they are generated
can call this to pre-allocate a doId for the object

◆ releaseZoneData()

def releaseZoneData (   self)

◆ requestDelete()

def requestDelete (   self)

◆ sendDeleteEvent()

def sendDeleteEvent (   self)

◆ sendGenerateWithRequired()

def sendGenerateWithRequired (   self,
  repository,
  parentId,
  zoneId,
  optionalFields = [] 
)

◆ sendMessageBundle()

def sendMessageBundle (   self)

◆ sendUpdate()

def sendUpdate (   self,
  fieldName,
  args = [] 
)

◆ sendUpdateToAccountId()

def sendUpdateToAccountId (   self,
  accountId,
  fieldName,
  args 
)

◆ sendUpdateToAvatarId()

def sendUpdateToAvatarId (   self,
  avId,
  fieldName,
  args 
)

◆ sendUpdateToChannel()

def sendUpdateToChannel (   self,
  channelId,
  fieldName,
  args 
)

◆ setAI()

def setAI (   self,
  aiChannel 
)

◆ setBarrierReady()

def setBarrierReady (   self,
  context 
)

◆ setLocation()

def setLocation (   self,
  parentId,
  zoneId 
)

◆ startMessageBundle()

def startMessageBundle (   self,
  name 
)

◆ staticGetLogicalZoneChangeEvent()

def staticGetLogicalZoneChangeEvent (   doId)
static

◆ staticGetZoneChangeEvent()

def staticGetZoneChangeEvent (   doId)
static

◆ status()

def status (   self,
  indent = 0 
)
print out doId(parentId, zoneId) className
    and conditionally show generated or deleted

Reimplemented from DistributedObjectBase.

◆ taskName()

def taskName (   self,
  taskString 
)

◆ uniqueName()

def uniqueName (   self,
  idString 
)

◆ updateAllRequiredFields()

def updateAllRequiredFields (   self,
  dclass,
  di 
)

◆ updateAllRequiredOtherFields()

def updateAllRequiredOtherFields (   self,
  dclass,
  di 
)

◆ updateRequiredFields()

def updateRequiredFields (   self,
  dclass,
  di 
)

◆ updateRequiredOtherFields()

def updateRequiredOtherFields (   self,
  dclass,
  di 
)

◆ validate()

def validate (   self,
  avId,
  bool,
  msg 
)

Member Data Documentation

◆ accountName

accountName

◆ air

air

Asad: As per Roger's suggestion, turn off the following block until a solution is thought out of how to prevent this delete message or to handle this message better TODO: do we still need this check?

◆ dclass

dclass

◆ DistributedObjectAI_initialized

DistributedObjectAI_initialized

◆ doId

doId

◆ lastNonQuietZone

lastNonQuietZone

◆ notify

notify = directNotify.newCategory("DistributedObjectAI")
static

◆ parentId

parentId

◆ QuietZone

int QuietZone = 1
static

◆ zoneId

zoneId