def __init__(self, config, ident): print "SoloSBP launching as '%s'" % ident self.ident = ident self.config = config self.modules = ModuleHandler(self, 'solo_sbp_pump') self.dying = False self.init_death()
def __init__(self, config, ident): print "GROUNDSTATION launching as '%s'" % ident self.ident = ident self.config = config self.modules = ModuleHandler(self, 'groundstation') self.dying = False self.init_death() self.command_map = { 'exit': (self.cmd_stop, 'exit gracefully'), 'status': (self.cmd_status, 'show status'), 'module': (self.modules.cmd_module, 'manage modules'), 'config': (self.config.cmd_config, 'manage configuration'), 'reinit': (self.cmd_reinit, 'reconfigures network from config'), 'trigger': (self.cmd_trigger, 'triggers a message across modules'), 'psim': (self.cmd_piksisim, 'toggles the piksi simulator on connected piksis'), 'preset': (self.cmd_piksireset, 'sends a reset message to a connected piksi (optionally specify an IP)' ), 'shutdown': (self.cmd_shutdown, '(IP) shuts down a single or all nodes in network'), 'restart': (self.cmd_restart, '(IP) restart a single or all nodes in network (specify an IP to restart a specific node)' ), 'update': (self.cmd_update, '(IP) does a git pull and restart on a single or all nodes in network' ), 'record': (self.cmd_record, 'start or stop recording data for a session') } CommandLineHandler.__init__(self, self.command_map)
def __init__(self, config, ident): self.ident = ident self.dying = False self.config = config self.send_id = 0 print "ODRIOD launching as '%s'" % ident self.modules = ModuleHandler(self, 'odroidperson') self.bind_ip = self.config.get_my("my-ip") self.server_id = self.config.get_network("server") self.server_ip = self.config.get_foreign(self.server_id, "my-ip") self.cc_local_port = self.config.get_my("cc-local-port") self.cc_server_port = self.config.get_my("cc-server-port") self.sbp_server_port = self.config.get_my("sbp-server-port") self.sbp_bind_port = self.config.get_my("sbp-bind-port") self.mav_server_port = self.config.get_my("mav-server-port") logger.info("Launching with Config:") logger.info(self.config) self.init_death()