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()
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'))
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()
def state_def(self, callback): super(FMAPRSDemodulator, self).state_def(callback) # TODO make this possible to be decorator style callback(BlockCell(self, 'mm_demod'))
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'))
def state_def(self, callback): super(Receiver, self).state_def(callback) # TODO decoratorify callback(BlockCell(self, 'demodulator'))
def state_def(self, callback): super(_OsmoSDRRXDriver, self).state_def(callback) # TODO make this possible to be decorator style callback(BlockCell(self, 'gains'))
def state_def(self, callback): super(RTTYDemodulator, self).state_def(callback) # TODO decoratorify callback(BlockCell(self, 'fsk_demod'))
def state_def(self, callback): super(_SimulatedTransmitter, self).state_def(callback) # TODO make this possible to be decorator style callback(BlockCell(self, 'modulator'))
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'))
def state_def(self, callback): super(ValueAndBlockSpecimen, self).state_def(callback) # TODO make this possible to be decorator style callback(BlockCell(self, 'block'))