2 Copyright (C) 2012 Intel Corporation
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 #ifndef GPSNMEAPLUGIN_H
20 #define GPSNMEAPLUGIN_H
22 #include <abstractsource.h>
25 #include "abstractio.hpp"
31 class BluetoothDevice;
33 class GpsNmeaSource: public AbstractSource
37 GpsNmeaSource(AbstractRoutingEngine* re, map<string, string> config);
41 void getPropertyAsync(AsyncPropertyReply *reply);
42 void getRangePropertyAsync(AsyncRangePropertyReply *reply);
43 AsyncPropertyReply * setProperty(AsyncSetPropertyRequest request);
44 void subscribeToPropertyChanges(VehicleProperty::Property property);
45 void unsubscribeToPropertyChanges(VehicleProperty::Property property);
46 PropertyList supported();
48 int supportedOperations();
50 void supportedChanged(const PropertyList &) {}
52 PropertyInfo getPropertyInfo(VehicleProperty::Property property)
54 if(propertyInfoMap.find(property) != propertyInfoMap.end())
55 return propertyInfoMap[property];
57 return PropertyInfo::invalid();
65 bool tryParse(std::string data);
67 void addPropertySupport(VehicleProperty::Property property, Zone::Type zone);
69 bool checksum(string sentence);
71 std::map<VehicleProperty::Property, PropertyInfo> propertyInfoMap;
73 PropertyList mRequests;
74 PropertyList mSupported;
89 #endif // EXAMPLEPLUGIN_H