Package ckbot :: Module wixeltdma :: Class Hub
[hide private]
[frames] | no frames]

Class Hub

source code



Concrete MultiProtocol subclass for Wixel TDMA connections

TYPICAL USAGE:
  H = Hub()
  P1 = Dynamixel.Protocol( Dynamixel.Bus( 
      port = H.getNewNodeConnection( tid1 )
      ))
  H.addSubProtocol( P1 )
  P2 = Dynamixel.Protocol( Dynamixel.Bus( 
      port = H.getNewNodeConnection( tid2 )
      ))
  H.addSubProtocol( P2 )
  # start loop with H.update() called

Instance Methods [hide private]
 
__init__(self, wixelPort=None)
INPUT:
source code
 
getNewNodeConnection(self, tid)
INPUT:...
source code
 
_demuxIncoming(self)
(private) scan incoming messages and demultiplex them into the respective NodeConnection queues
source code
 
update(self)
Update all sub-protocols and collect heartbeats
source code
 
_emitTimeplan(self)
(private) emit timeplan, generating a default one of needed
source code

Inherited from multiprotocol.MultiProtocol: addSubProtocols, generatePNA, hintNodes, off, reset, scan

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]
  heartbeats
!!! if enough time has passed, self._emitTimeplan()
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, wixelPort=None)
(Constructor)

source code 

INPUT:

Overrides: object.__init__

getNewNodeConnection(self, tid)

source code 

INPUT:
   tid -- TDMA node ID
OUTPUT:
   a NodeConnection instance that sends data via that node
   This is registered in self.tdn

update(self)

source code 

Update all sub-protocols and collect heartbeats

Overrides: ckmodule.AbstractProtocol.update