def __init__(self, mac_address=None): self.running = 0 self._children_have_been_discovered = 0 Port.__init__(self) AutoDiscoveredNode.__init__(self) EventProducerMixin.__init__(self) if mac_address: self.mac_address = mac_address else: self.mac_address = REQUIRED self.in_range = None self.debug = debug self.transceiver_state = TransceiverState[0] self.cov = ChangeOfValueEvent(self, None, self.transceiver_state) self.from_discovery = 0 # 1: remote xcvr assoc'd with this node was discovered by Aerocomm Protocol code self.from_config = 0 # 1: remote xcvr assocd with this node was specified in config recvd from Client App
def configure(self,config): set_attribute(self, 'mac_address', self.mac_address, config) #mac address of client self.mac_address = aero.MacAddress(self.mac_address) self.dev = self.mac_address.value Port.configure(self,config) set_attribute(self, 'parity', parity_to_int('none'), config, parity_to_int) set_attribute(self, 'baud', 9600, config, str) if self.baud == 'Custom': self.baud = -1 # flag for later processing of custom_baud else: self.baud = int(self.baud) # normal path set_attributes(self, (('bits',8), ('stop_bits',1), ('dump_cpl',16)), config, int) set_attribute(self, 'custom_baud', 76800, config, int) set_attribute(self, 'flow_control', flowctl_to_int('none'), config, flowctl_to_int) set_attribute(self, 'lock_directory', properties.get('VAR_LOCK'), config, str) set_attribute(self, 'debug', self.parent.debug, config, int)
def start(self): Port.start(self) self._msglog('Started internal modem %s' % self.dev)
def configuration(self): return Modem.configuration(self, Port.configuration(self))
def configure(self, config_dict): Port.configure(self, config_dict) Modem.configure(self, config_dict) self._msglog('Configured internal modem %s' % self.dev)
def __init__(self): Port.__init__(self) Modem.__init__(self, self)
def start(self): Port.start(self) self.running = 1
def __init__( self ): Port.__init__( self ) Modem.__init__( self, self )
def start( self ): Port.start( self ) self._msglog( 'Started internal modem %s' % self.dev )
def configuration( self ): return Modem.configuration( self, Port.configuration( self ) )
def configure( self, config_dict ): Port.configure( self, config_dict ) Modem.configure( self, config_dict ) self._msglog( 'Configured internal modem %s' % self.dev )