Panda3D

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
ClusterServer Class Reference
Inheritance diagram for ClusterServer:

## Public Member Functions
| __init__ (self, cameraJig, camera)
| addControlMapping (self, objectName, controlledName, offset=None, priority=0)
| addNamedObjectMapping (self, object, name, hasColor=True, priority=0)
| controlObjectTask (self, task)
| handleCamFrustum (self, dgi)
| handleCamMovement (self, dgi)
| handleCamOffset (self, dgi)
| handleCommandString (self, dgi)
| handleDatagram (self, dgi, type)
| handleMessageQueue (self)
| handleNamedMovement (self, data)
| handleSelectedMovement (self, dgi)
| handleTimeData (self, dgi)
| listenerPollTask (self, task)
| moveObject (self, nodePath, object, offset, hasColor)
| redoSortedPriorities (self)
| removeControlMapping (self, name)
| removeObjectMapping (self, name)
| sendNamedMovementDone (self)
| sendSwapReady (self)
| setControlMappingOffset (self, objectName, offset)
| startControlObjectTask (self)
| startListenerPollTask (self)
| startReaderPollTask (self)
| startSwapCoordinator (self)
| swapCoordinatorTask (self, task)
Public Member Functions inherited from DirectObject
| __init__ (self)
| accept (self, event, method, extraArgs=[])
| acceptOnce (self, event, method, extraArgs=[])
| addTask (self, *args, **kwargs)
| detectLeaks (self)
| doMethodLater (self, *args, **kwargs)
| getAllAccepting (self)
| ignore (self, event)
| ignoreAll (self)
| isAccepting (self, event)
| isIgnoring (self, event)
| removeAllTasks (self)
| removeTask (self, taskOrName)

## Public Attributes
| camera = camera
| cameraJig = cameraJig
dict | controlMappings = {}
| controlObjectTask
dict | controlOffsets = {}
dict | controlPriorities = {}
| cw = ConnectionWriter(self.qcm, 0)
| daemon = DirectD()
int | fPosReceived = 0
| lastConnection = None
| lens = camera.node().getLens()
| listenerPollTask
list | messageQueue = []
| msgHandler = ClusterMsgHandler(ClusterServer.MSG_NUM, self.notify)
dict | objectHasColor = {}
dict | objectMappings = {}
| qcl = QueuedConnectionListener(self.qcm, 0)
| qcm = QueuedConnectionManager()
| qcr = QueuedConnectionReader(self.qcm, 0)
list | sortedControlMappings = []
| sortedControlPriorities
| swapCoordinatorTask
| tcpRendezvous = self.qcm.openTCPServerRendezvous(port, 1)

## Static Public Attributes
int | MSG_NUM = 2000000
| notify = DirectNotifyGlobal.directNotify.newCategory("ClusterServer")
Static Public Attributes inherited from DirectObject
| accept_once = acceptOnce
| add_task = addTask
| detect_leaks = detectLeaks
| do_method_later = doMethodLater
| get_all_accepting = getAllAccepting
| ignore_all = ignoreAll
| is_accepting = isAccepting
| is_ignoring = isIgnoring
| remove_all_tasks = removeAllTasks
| remove_task = removeTask

## Protected Member Functions
| _readerPollTask (self, state)
| _syncReaderPollTask (self, task)
Protected Member Functions inherited from DirectObject
| _addTask (self, task)
| _clearTask (self, task)

## Protected Attributes
| _readerPollTask
| _syncReaderPollTask
Protected Attributes inherited from DirectObject
dict | _taskList = {}

## Constructor & Destructor Documentation

## ◆ __init__()

__init__ | ( |  | self,
|  |  | cameraJig,
|  |  | camera )

## Member Function Documentation

## ◆ _readerPollTask()

_readerPollTask | ( |  | self,
|  |  | state )
| protected

     Non blocking task to read all available datagrams

## ◆ _syncReaderPollTask()

_syncReaderPollTask | ( |  | self,
|  |  | task )
| protected

## ◆ addControlMapping()

addControlMapping | ( |  | self,
|  |  | objectName,
|  |  | controlledName,
|  |  | offset = None,
|  |  | priority = 0 )

## ◆ addNamedObjectMapping()

addNamedObjectMapping | ( |  | self,
|  |  | object,
|  |  | name,
|  |  | hasColor = True,
|  |  | priority = 0 )

## ◆ controlObjectTask()

controlObjectTask | ( |  | self,
|  |  | task )

## ◆ handleCamFrustum()

handleCamFrustum | ( |  | self,
|  |  | dgi )

     Adjust camera frustum based on parameters sent by client

## ◆ handleCamMovement()

handleCamMovement | ( |  | self,
|  |  | dgi )

     Update cameraJig position to reflect latest position

## ◆ handleCamOffset()

handleCamOffset | ( |  | self,
|  |  | dgi )

     Set offset of camera from cameraJig

## ◆ handleCommandString()

handleCommandString | ( |  | self,
|  |  | dgi )

     Handle arbitrary command string from client

## ◆ handleDatagram()

handleDatagram | ( |  | self,
|  |  | dgi,
|  |  | type )

     Process a datagram depending upon type flag

## ◆ handleMessageQueue()

handleMessageQueue | ( |  | self | ) |

## ◆ handleNamedMovement()

handleNamedMovement | ( |  | self,
|  |  | data )

     Update cameraJig position to reflect latest position

## ◆ handleSelectedMovement()

handleSelectedMovement | ( |  | self,
|  |  | dgi )

     Update cameraJig position to reflect latest position

## ◆ handleTimeData()

handleTimeData | ( |  | self,
|  |  | dgi )

     Update cameraJig position to reflect latest position

## ◆ listenerPollTask()

listenerPollTask | ( |  | self,
|  |  | task )

     Task to listen for a new connection from the client

## ◆ moveObject()

moveObject | ( |  | self,
|  |  | nodePath,
|  |  | object,
|  |  | offset,
|  |  | hasColor )

## ◆ redoSortedPriorities()

redoSortedPriorities | ( |  | self | ) |

## ◆ removeControlMapping()

removeControlMapping | ( |  | self,
|  |  | name )

## ◆ removeObjectMapping()

removeObjectMapping | ( |  | self,
|  |  | name )

## ◆ sendNamedMovementDone()

sendNamedMovementDone | ( |  | self | ) |

## ◆ sendSwapReady()

sendSwapReady | ( |  | self | ) |

## ◆ setControlMappingOffset()

setControlMappingOffset | ( |  | self,
|  |  | objectName,
|  |  | offset )

## ◆ startControlObjectTask()

startControlObjectTask | ( |  | self | ) |

## ◆ startListenerPollTask()

startListenerPollTask | ( |  | self | ) |

## ◆ startReaderPollTask()

startReaderPollTask | ( |  | self | ) |

     Task to handle datagrams from client

## ◆ startSwapCoordinator()

startSwapCoordinator | ( |  | self | ) |

## ◆ swapCoordinatorTask()

swapCoordinatorTask | ( |  | self,
|  |  | task )

## Member Data Documentation

## ◆ _readerPollTask

_readerPollTask
| protected

## ◆ _syncReaderPollTask

_syncReaderPollTask
| protected

## ◆ camera

camera = camera

## ◆ cameraJig

cameraJig = cameraJig

## ◆ controlMappings

controlMappings = {}

## ◆ controlObjectTask

controlObjectTask

## ◆ controlOffsets

dict controlOffsets = {}

## ◆ controlPriorities

dict controlPriorities = {}

## ◆ cw

cw = ConnectionWriter(self.qcm, 0)

## ◆ daemon

daemon = DirectD()

## ◆ fPosReceived

int fPosReceived = 0

## ◆ lastConnection

lastConnection = None

## ◆ lens

lens = camera.node().getLens()

## ◆ listenerPollTask

listenerPollTask

## ◆ messageQueue

list messageQueue = []

## ◆ MSG_NUM

int MSG_NUM = 2000000
| static

## ◆ msgHandler

msgHandler = ClusterMsgHandler(ClusterServer.MSG_NUM, self.notify)

## ◆ notify

notify = DirectNotifyGlobal.directNotify.newCategory("ClusterServer")
| static

## ◆ objectHasColor

dict objectHasColor = {}

## ◆ objectMappings

objectMappings = {}

## ◆ qcl

qcl = QueuedConnectionListener(self.qcm, 0)

## ◆ qcm

qcm = QueuedConnectionManager()

## ◆ qcr

qcr = QueuedConnectionReader(self.qcm, 0)

## ◆ sortedControlMappings

list sortedControlMappings = []

## ◆ sortedControlPriorities

sortedControlPriorities

## ◆ swapCoordinatorTask

swapCoordinatorTask

## ◆ tcpRendezvous

tcpRendezvous = self.qcm.openTCPServerRendezvous(port, 1)