optimized telemetry handling on AI

This commit is contained in:
Joe Shochet 2004-08-24 06:39:27 +00:00
parent 39422e3fe5
commit 138daf587b

View File

@ -3,8 +3,8 @@ import DistributedNodeAI
import DistributedSmoothNodeBase import DistributedSmoothNodeBase
class DistributedSmoothNodeAI(DistributedNodeAI.DistributedNodeAI, class DistributedSmoothNodeAI(DistributedNodeAI.DistributedNodeAI,
DistributedSmoothNodeBase.\ DistributedSmoothNodeBase.DistributedSmoothNodeBase):
DistributedSmoothNodeBase):
def __init__(self, air, name=None): def __init__(self, air, name=None):
DistributedNodeAI.DistributedNodeAI.__init__(self, air, name) DistributedNodeAI.DistributedNodeAI.__init__(self, air, name)
DistributedSmoothNodeBase.DistributedSmoothNodeBase.__init__(self) DistributedSmoothNodeBase.DistributedSmoothNodeBase.__init__(self)
@ -17,68 +17,54 @@ class DistributedSmoothNodeAI(DistributedNodeAI.DistributedNodeAI,
# these are invoked by the DC system # these are invoked by the DC system
# 'send' (d_set*) versions are inherited from DistributedSmoothNodeBase # 'send' (d_set*) versions are inherited from DistributedSmoothNodeBase
def setSmStop(self, t): def setSmStop(self, t):
self.setComponentT(t) pass
# These have their FFI functions exposed for efficiency
def setSmH(self, h, t): def setSmH(self, h, t):
self.setComponentH(h) self._NodePath__overloaded_setH_ptrNodePath_float(h)
self.setComponentT(t)
def setSmXY(self, x, y, t): def setSmXY(self, x, y, t):
self.setComponentX(x) self._NodePath__overloaded_setX_ptrNodePath_float(x)
self.setComponentY(y) self._NodePath__overloaded_setY_ptrNodePath_float(y)
self.setComponentT(t)
def setSmXZ(self, x, z, t): def setSmXZ(self, x, z, t):
self.setComponentX(x) self._NodePath__overloaded_setX_ptrNodePath_float(x)
self.setComponentZ(z) self._NodePath__overloaded_setZ_ptrNodePath_float(z)
self.setComponentT(t)
def setSmPos(self, x, y, z, t): def setSmPos(self, x, y, z, t):
self.setComponentX(x) self._NodePath__overloaded_setPos_ptrNodePath_float_float_float(x,y,z)
self.setComponentY(y)
self.setComponentZ(z)
self.setComponentT(t)
def setSmHpr(self, h, p, r, t): def setSmHpr(self, h, p, r, t):
self.setComponentH(h) self._NodePath__overloaded_setHpr_ptrNodePath_float_float_float(h,p,r)
self.setComponentP(p)
self.setComponentR(r)
self.setComponentT(t)
def setSmXYH(self, x, y, h, t): def setSmXYH(self, x, y, h, t):
self.setComponentX(x) self._NodePath__overloaded_setX_ptrNodePath_float(x)
self.setComponentY(y) self._NodePath__overloaded_setY_ptrNodePath_float(y)
self.setComponentH(h) self._NodePath__overloaded_setH_ptrNodePath_float(h)
self.setComponentT(t)
def setSmXYZH(self, x, y, z, h, t): def setSmXYZH(self, x, y, z, h, t):
self.setComponentX(x) self._NodePath__overloaded_setPos_ptrNodePath_float_float_float(x,y,z)
self.setComponentY(y) self._NodePath__overloaded_setH_ptrNodePath_float(h)
self.setComponentZ(z)
self.setComponentH(h)
self.setComponentT(t)
def setSmPosHpr(self, x, y, z, h, p, r, t): def setSmPosHpr(self, x, y, z, h, p, r, t):
self.setComponentX(x) self._NodePath__overloaded_setPosHpr_ptrNodePath_float_float_float_float_float_float(x,y,z,h,p,r)
self.setComponentY(y)
self.setComponentZ(z)
self.setComponentH(h)
self.setComponentP(p)
self.setComponentR(r)
self.setComponentT(t)
def clearSmoothing(self, bogus = None): def clearSmoothing(self, bogus = None):
pass pass
### component set pos and hpr functions ###
### These are the component functions that are invoked # Do we use these on the AIx?
### remotely by the above composite functions.
# on the AI, the components are assigned immediately
def setComponentX(self, x): def setComponentX(self, x):
self.setX(x) self._NodePath__overloaded_setX_ptrNodePath_float(x)
def setComponentY(self, y): def setComponentY(self, y):
self.setY(y) self._NodePath__overloaded_setY_ptrNodePath_float(y)
def setComponentZ(self, z): def setComponentZ(self, z):
self.setZ(z) self._NodePath__overloaded_setZ_ptrNodePath_float(z)
def setComponentH(self, h): def setComponentH(self, h):
self.setH(h) self._NodePath__overloaded_setH_ptrNodePath_float(h)
def setComponentP(self, p): def setComponentP(self, p):
self.setP(p) self._NodePath__overloaded_setP_ptrNodePath_float(p)
def setComponentR(self, r): def setComponentR(self, r):
self.setR(r) self._NodePath__overloaded_setR_ptrNodePath_float(r)
def setComponentT(self, t): def setComponentT(self, t):
pass pass