コード例 #1
0
ファイル: simulator.py プロジェクト: fengsiyu/client
    def send_configuration(self):
        logging.getLogger("simulator").info(
            'Sending simulator configuration ip:{0}:{1}'.format(
                self.configuration.server_ip, self.configuration.server_port))

        msg = messaging.JSONConfigurationCommand(
            self.configuration.configuration, SIMULATOR_CONFIG_COMMAND_UUID)
        simulator_response = self.request(msg)
        if simulator_response is None:
            logging.getLogger("network").error(
                'Failed to send the simulator configuration')
コード例 #2
0
ファイル: simulator.py プロジェクト: fengsiyu/client
    def send_vehicle_configuration(self, vehicle_configuration):
        logging.getLogger("simulator").info(
            'Sending vehicle configuration {0}'.format(
                vehicle_configuration.name))
        vehicle_response = self.request(
            messaging.JSONConfigurationCommand(
                vehicle_configuration.configuration,
                VEHICLE_CONFIG_COMMAND_UUID))

        if vehicle_response is None:
            logging.getLogger("network").error(
                'Failed to send the vehicle configuration')

        #else:
        #    logging.getLogger("simulator").debug('{0}'.format(vehicle_response))
        return vehicle_response