예제 #1
0
    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
    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