Panda3D
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
DoInterestManager Class Reference
Inheritance diagram for DoInterestManager:
ConnectionRepository ClientRepositoryBase ClientRepository

Public Member Functions

 __init__ (self)
 
 addAutoInterest (self, parentId, zoneIdList, description)
 
 addInterest (self, parentId, zoneIdList, description, event=None)
 
 alterInterest (self, handle, parentId, zoneIdList, description=None, event=None)
 
 cleanupWaitAllInterestsComplete (self)
 
 closeAutoInterests (self, obj)
 
 getAllInterestsCompleteEvent (self)
 
 handleInterestDoneMessage (self, di)
 
 isValidInterestHandle (self, handle)
 
 noNewInterests (self)
 
 openAutoInterests (self, obj)
 
 printInterestHistory (self)
 
 printInterests (self)
 
 printInterestSets (self)
 
 printInterestsIfDebug (self)
 
 queueAllInterestsCompleteEvent (self, frames=5)
 
 removeAIInterest (self, handle)
 
 removeAutoInterest (self, handle)
 
 removeInterest (self, handle, event=None)
 
 resetInterestStateForConnectionLoss (self)
 
 setAllInterestsCompleteCallback (self, callback)
 
 setNoNewInterests (self, flag)
 
 updateInterestDescription (self, handle, desc)
 

Static Public Attributes

 InterestDebug = ConfigVariableBool('interest-debug', False)
 
 notify = directNotify.newCategory("DoInterestManager")
 

Protected Member Functions

 _addDebugInterestHistory (self, action, description, handle, contextId, parentId, zoneIdList)
 
 _considerRemoveInterest (self, handle)
 
 _getAddInterestEvent (self)
 
 _getAnonymousEvent (self, desc)
 
 _getInterestState (self, handle)
 
 _getNextContextId (self)
 
 _getNextHandle (self)
 
 _getRemoveInterestEvent (self)
 
 _sendAddInterest (self, handle, contextId, parentId, zoneIdList, description, action=None)
 
 _sendRemoveAIInterest (self, handle)
 
 _sendRemoveInterest (self, handle, contextId)
 

Protected Attributes

 _addInterestEvent
 
 _allInterestsCompleteCallbacks
 
 _completeDelayedCallback
 
 _completeEventCount
 
 _noNewInterests
 
 _removeInterestEvent
 

Static Protected Attributes

int _ContextIdMask = 0x3FFFFFFF
 
int _ContextIdSerialNum = 100
 
list _debug_interestHistory = []
 
int _debug_maxDescriptionLen = 40
 
int _HandleMask = 0x7FFF
 
int _HandleSerialNum = 0
 
dict _interests = {}
 
 _SerialGen = SerialNumGen()
 
 _SerialNum = serialNum()
 

Detailed Description

Top level Interest Manager

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self)

Member Function Documentation

◆ _addDebugInterestHistory()

_addDebugInterestHistory ( self,
action,
description,
handle,
contextId,
parentId,
zoneIdList )
protected

◆ _considerRemoveInterest()

_considerRemoveInterest ( self,
handle )
protected
Consider whether we should cull the interest set.

◆ _getAddInterestEvent()

_getAddInterestEvent ( self)
protected

◆ _getAnonymousEvent()

_getAnonymousEvent ( self,
desc )
protected

◆ _getInterestState()

_getInterestState ( self,
handle )
protected

◆ _getNextContextId()

_getNextContextId ( self)
protected

◆ _getNextHandle()

_getNextHandle ( self)
protected

◆ _getRemoveInterestEvent()

_getRemoveInterestEvent ( self)
protected

◆ _sendAddInterest()

_sendAddInterest ( self,
handle,
contextId,
parentId,
zoneIdList,
description,
action = None )
protected
Part of the new otp-server code.

handle is a client-side created number that refers to
        a set of interests.  The same handle number doesn't
        necessarily have any relationship to the same handle
        on another client.

◆ _sendRemoveAIInterest()

_sendRemoveAIInterest ( self,
handle )
protected
handle is a bare int, NOT an InterestHandle.  Use this to
close an AI opened interest.

◆ _sendRemoveInterest()

_sendRemoveInterest ( self,
handle,
contextId )
protected
handle is a client-side created number that refers to
        a set of interests.  The same handle number doesn't
        necessarily have any relationship to the same handle
        on another client.

◆ addAutoInterest()

addAutoInterest ( self,
parentId,
zoneIdList,
description )
Look into a (set of) zone(s).

◆ addInterest()

addInterest ( self,
parentId,
zoneIdList,
description,
event = None )
Look into a (set of) zone(s).

◆ alterInterest()

alterInterest ( self,
handle,
parentId,
zoneIdList,
description = None,
event = None )
Removes old interests and adds new interests.

Note that when an interest is changed, only the most recent
change's event will be triggered. Previous events are abandoned.
If this is a problem, consider opening multiple interests.

◆ cleanupWaitAllInterestsComplete()

cleanupWaitAllInterestsComplete ( self)

◆ closeAutoInterests()

closeAutoInterests ( self,
obj )

◆ getAllInterestsCompleteEvent()

getAllInterestsCompleteEvent ( self)

◆ handleInterestDoneMessage()

handleInterestDoneMessage ( self,
di )
This handles the interest done messages and may dispatch an event

◆ isValidInterestHandle()

isValidInterestHandle ( self,
handle )

◆ noNewInterests()

noNewInterests ( self)

◆ openAutoInterests()

openAutoInterests ( self,
obj )

◆ printInterestHistory()

printInterestHistory ( self)

◆ printInterests()

printInterests ( self)

◆ printInterestSets()

printInterestSets ( self)

◆ printInterestsIfDebug()

printInterestsIfDebug ( self)

◆ queueAllInterestsCompleteEvent()

queueAllInterestsCompleteEvent ( self,
frames = 5 )

◆ removeAIInterest()

removeAIInterest ( self,
handle )
handle is NOT an InterestHandle.  It's just a bare integer representing an
AI opened interest. We're making the client close down this interest since
the AI has trouble removing interests(that its opened) when the avatar goes
offline.  See GuildManager(UD) for how it's being used.

◆ removeAutoInterest()

removeAutoInterest ( self,
handle )
Stop looking in a (set of) zone(s)

◆ removeInterest()

removeInterest ( self,
handle,
event = None )
Stop looking in a (set of) zone(s)

◆ resetInterestStateForConnectionLoss()

resetInterestStateForConnectionLoss ( self)

◆ setAllInterestsCompleteCallback()

setAllInterestsCompleteCallback ( self,
callback )

◆ setNoNewInterests()

setNoNewInterests ( self,
flag )

◆ updateInterestDescription()

updateInterestDescription ( self,
handle,
desc )

Member Data Documentation

◆ _addInterestEvent

_addInterestEvent
protected

◆ _allInterestsCompleteCallbacks

_allInterestsCompleteCallbacks
protected

◆ _completeDelayedCallback

_completeDelayedCallback
protected

◆ _completeEventCount

_completeEventCount
protected

◆ _ContextIdMask

int _ContextIdMask = 0x3FFFFFFF
staticprotected

◆ _ContextIdSerialNum

int _ContextIdSerialNum = 100
staticprotected

◆ _debug_interestHistory

list _debug_interestHistory = []
staticprotected

◆ _debug_maxDescriptionLen

int _debug_maxDescriptionLen = 40
staticprotected

◆ _HandleMask

int _HandleMask = 0x7FFF
staticprotected

◆ _HandleSerialNum

int _HandleSerialNum = 0
staticprotected

◆ _interests

dict _interests = {}
staticprotected

◆ _noNewInterests

_noNewInterests
protected

◆ _removeInterestEvent

_removeInterestEvent
protected

◆ _SerialGen

_SerialGen = SerialNumGen()
staticprotected

◆ _SerialNum

_SerialNum = serialNum()
staticprotected

◆ InterestDebug

InterestDebug = ConfigVariableBool('interest-debug', False)
static

◆ notify

notify = directNotify.newCategory("DoInterestManager")
static