Source code for direct.distributed.DistributedSmoothNodeAI

from . import DistributedNodeAI
from . import DistributedSmoothNodeBase

[docs]class DistributedSmoothNodeAI(DistributedNodeAI.DistributedNodeAI, DistributedSmoothNodeBase.DistributedSmoothNodeBase):
[docs] def __init__(self, air, name=None): DistributedNodeAI.DistributedNodeAI.__init__(self, air, name) DistributedSmoothNodeBase.DistributedSmoothNodeBase.__init__(self)
[docs] def generate(self): DistributedNodeAI.DistributedNodeAI.generate(self) DistributedSmoothNodeBase.DistributedSmoothNodeBase.generate(self) self.cnode.setRepository(self.air, 1, self.air.ourChannel)
[docs] def disable(self): DistributedSmoothNodeBase.DistributedSmoothNodeBase.disable(self) DistributedNodeAI.DistributedNodeAI.disable(self)
[docs] def delete(self): DistributedSmoothNodeBase.DistributedSmoothNodeBase.delete(self) DistributedNodeAI.DistributedNodeAI.delete(self)
# distributed set pos and hpr functions # these are invoked by the DC system # 'send' (d_set*) versions are inherited from DistributedSmoothNodeBase
[docs] def setSmStop(self, t=None): pass
# These have their FFI functions exposed for efficiency
[docs] def setSmH(self, h, t=None): self.setH(h)
[docs] def setSmZ(self, z, t=None): self.setZ(z)
[docs] def setSmXY(self, x, y, t=None): self.setX(x) self.setY(y)
[docs] def setSmXZ(self, x, z, t=None): self.setX(x) self.setZ(z)
[docs] def setSmPos(self, x, y, z, t=None): self.setPos(x, y, z)
[docs] def setSmHpr(self, h, p, r, t=None): self.setHpr(h, p, r)
[docs] def setSmXYH(self, x, y, h, t=None): self.setX(x) self.setY(y) self.setH(h)
[docs] def setSmXYZH(self, x, y, z, h, t=None): self.setPos(x, y, z) self.setH(h)
[docs] def setSmPosHpr(self, x, y, z, h, p, r, t=None): self.setPosHpr(x, y, z, h, p, r)
[docs] def setSmPosHprL(self, l, x, y, z, h, p, r, t=None): self.setPosHpr(x, y, z, h, p, r)
[docs] def clearSmoothing(self, bogus = None): pass
# Do we use these on the AIx?
[docs] def setComponentX(self, x): self.setX(x)
[docs] def setComponentY(self, y): self.setY(y)
[docs] def setComponentZ(self, z): self.setZ(z)
[docs] def setComponentH(self, h): self.setH(h)
[docs] def setComponentP(self, p): self.setP(p)
[docs] def setComponentR(self, r): self.setR(r)
[docs] def setComponentL(self, l): pass
[docs] def setComponentT(self, t): pass
[docs] def getComponentX(self): return self.getX()
[docs] def getComponentY(self): return self.getY()
[docs] def getComponentZ(self): return self.getZ()
[docs] def getComponentH(self): return self.getH()
[docs] def getComponentP(self): return self.getP()
[docs] def getComponentR(self): return self.getR()
[docs] def getComponentL(self): if self.zoneId: return self.zoneId else: # we can't send None over the wire which self.zoneId can sometimes be return 0
[docs] def getComponentT(self): return 0