示例#1
0
 def __init__(self,
              send,
              root_object,
              root_url,
              noteDirty,
              poller=the_poller):
     self.__poller = poller
     self._send = send
     self.__root_object = root_object
     self._cell = BlockCell(self, '_root_object')
     self._lastSerial = 0
     root_registration = _StateStreamObjectRegistration(
         ssi=self,
         poller=self.__poller,
         obj=self._cell,
         serial=0,
         url=root_url,
         refcount=0)
     self._registered_objs = {self._cell: root_registration}
     self.__registered_serials = {
         root_registration.serial: root_registration
     }
     self._send_batch = []
     self.__batch_delay = None
     self.__root_url = root_url
     self.__noteDirty = noteDirty
     root_registration.send_now_if_needed()
示例#2
0
 def state_def(self, callback):
     super(Top, self).state_def(callback)
     # TODO make this possible to be decorator style
     callback(BlockCell(self, 'monitor'))
     callback(BlockCell(self, 'sources'))
     callback(BlockCell(self, 'source', persists=False))
     callback(BlockCell(self, 'receivers'))
     callback(BlockCell(self, 'accessories', persists=False))
     callback(BlockCell(self, 'shared_objects'))
示例#3
0
 def __init__(self, send, block, root_url, poller=the_poller):
     self.__poller = poller
     self._send = send
     self._block = block
     self._cell = BlockCell(self, '_block')
     self._lastSerial = 0
     root_registration = _StateStreamObjectRegistration(
         ssi=self,
         poller=self.__poller,
         obj=self._cell,
         serial=0,
         url=root_url,
         refcount=0)
     self._registered = {self._cell: root_registration}
     self._send_batch = []
     self.__batch_delay = None
     self.__root_url = root_url
     root_registration.initial_nudge()
示例#4
0
 def state_def(self, callback):
     super(FMAPRSDemodulator, self).state_def(callback)
     # TODO make this possible to be decorator style
     callback(BlockCell(self, 'mm_demod'))
示例#5
0
 def state_def(self, callback):
     super(Device, self).state_def(callback)
     callback(self.__vfo_cell)
     callback(BlockCell(self, 'rx_driver'))
     callback(BlockCell(self, 'tx_driver'))
     callback(BlockCell(self, 'components'))
示例#6
0
 def state_def(self, callback):
     super(Receiver, self).state_def(callback)
     # TODO decoratorify
     callback(BlockCell(self, 'demodulator'))
示例#7
0
 def state_def(self, callback):
     super(_OsmoSDRRXDriver, self).state_def(callback)
     # TODO make this possible to be decorator style
     callback(BlockCell(self, 'gains'))
示例#8
0
 def state_def(self, callback):
     super(RTTYDemodulator, self).state_def(callback)
     # TODO decoratorify
     callback(BlockCell(self, 'fsk_demod'))
示例#9
0
 def state_def(self, callback):
     super(_SimulatedTransmitter, self).state_def(callback)
     # TODO make this possible to be decorator style
     callback(BlockCell(self, 'modulator'))
示例#10
0
 def state_def(self, callback):
     super(DuplicateReferenceSpecimen, self).state_def(callback)
     # TODO make this possible to be decorator style
     callback(BlockCell(self, 'foo'))
     callback(BlockCell(self, 'bar'))
示例#11
0
 def state_def(self, callback):
     super(ValueAndBlockSpecimen, self).state_def(callback)
     # TODO make this possible to be decorator style
     callback(BlockCell(self, 'block'))