![JAR search and dependency download from the Maven repository](/logo.png)
joynr.vehicle.DefaultGpsProvider Maven / Gradle / Ivy
The newest version!
/*
*
* Copyright (C) 2011 - 2013 BMW Car IT GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// #####################################################
//#######################################################
//### ###
//## WARNING: This file is generated. DO NOT EDIT ##
//## All changes will be lost! ##
//### ###
//#######################################################
// #####################################################
package joynr.vehicle;
import java.util.List;
import java.util.ArrayList;
import java.util.UUID;
import com.google.inject.Singleton;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import joynr.types.ProviderQos;
import joynr.types.GpsLocation;
//The current generator is not able to check wether some of the imports are acutally necessary for this specific interface.
//Therefore some imports migth be unused in this version of the interface.
//To prevent warnings @SuppressWarnings("unused") is being used.
//To prevent warnings about an unnecessary SuppressWarnings we have to import something that is not used. (e.g. TreeSet)
import java.util.TreeSet;
@SuppressWarnings("unused")
@Singleton
public class DefaultGpsProvider extends GpsAbstractProvider {
private static final Logger logger = LoggerFactory.getLogger(DefaultGpsProvider.class);
public DefaultGpsProvider() {
// default uses a priority that is the current time, causing arbitration to the last started instance
//providerQos.put(ArbitrationConstants.PRIORITY_PARAMETER, "" + System.currentTimeMillis());
providerQos.setPriority(System.currentTimeMillis());
}
@Override
public GpsLocation getLocation() {
return location;
}
@Override
public void restartWithRetries(Integer gpsfix) {
logger.warn("**********************************************");
logger.warn("* Gps.restartWithRetries called");
logger.warn("**********************************************");
}
@Override
public Integer calculateAvailableSatellites() {
logger.warn("**********************************************");
logger.warn("* Gps.calculateAvailableSatellites called");
logger.warn("**********************************************");
return 42;
}
@Override
public ProviderQos getProviderQos() {
return providerQos;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy