Exemplo n.º 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()
Exemplo n.º 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'))
Exemplo n.º 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()
Exemplo n.º 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'))
Exemplo n.º 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'))
Exemplo n.º 6
0
 def state_def(self, callback):
     super(Receiver, self).state_def(callback)
     # TODO decoratorify
     callback(BlockCell(self, 'demodulator'))
Exemplo n.º 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'))
Exemplo n.º 8
0
 def state_def(self, callback):
     super(RTTYDemodulator, self).state_def(callback)
     # TODO decoratorify
     callback(BlockCell(self, 'fsk_demod'))
Exemplo n.º 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'))
Exemplo n.º 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'))
Exemplo n.º 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'))