1 /******************************************************************** 2 ** @source JEEPS command functions 3 ** 4 ** @author Copyright (C) 1999 Alan Bleasby 5 ** @version 1.0 6 ** @modified Dec 28 1999 Alan Bleasby. First version 7 ** @modified Copyright (C) 2005, 2006 Robert Lipe 8 ** @modified Copyright (C) 2007 Achim Schumacher 9 ** @modified Copyright (C) 2010 Martin Buck 10 ** @@ 11 ** 12 ** This library is free software; you can redistribute it and/or 13 ** modify it under the terms of the GNU Library General Public 14 ** License as published by the Free Software Foundation; either 15 ** version 2 of the License, or (at your option) any later version. 16 ** 17 ** This library is distributed in the hope that it will be useful, 18 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 19 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 ** Library General Public License for more details. 21 ** 22 ** You should have received a copy of the GNU Library General Public 23 ** License along with this library; if not, write to the 24 ** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 25 ** Boston, MA 02110-1301, USA. 26 ********************************************************************/ 27 #ifdef __cplusplus 28 extern "C" 29 { 30 #endif 31 32 #ifndef gpscom_h 33 #define gpscom_h 34 35 36 #include "garmin_gps.h" 37 #include <time.h> 38 39 int32 GPS_Command_Off(const char *port); 40 41 time_t GPS_Command_Get_Time(const char *port); 42 int32 GPS_Command_Send_Time(const char *port, time_t Time); 43 44 int32 GPS_Command_Get_Position(const char *port, double *lat, double *lon); 45 int32 GPS_Command_Send_Position(const char *port, double lat, double lon); 46 47 int32 GPS_Command_Pvt_On(const char *port, gpsdevh **fd); 48 int32 GPS_Command_Pvt_Off(const char *port, gpsdevh **fd); 49 int32 GPS_Command_Pvt_Get(gpsdevh **fd, GPS_PPvt_Data *pvt); 50 51 int32 GPS_Command_Get_Almanac(const char *port, GPS_PAlmanac **alm); 52 int32 GPS_Command_Send_Almanac(const char *port, GPS_PAlmanac *alm, int32 n); 53 54 int32 GPS_Command_Get_Track(const char *port, GPS_PTrack **trk, int (*cb)(int, struct GPS_SWay **)); 55 int32 GPS_Command_Send_Track(const char *port, GPS_PTrack *trk, int32 n); 56 57 int32 GPS_Command_Get_Waypoint(const char *port, GPS_PWay **way,int (*cb)(int, struct GPS_SWay **)); 58 int32 GPS_Command_Send_Waypoint(const char *port, GPS_PWay *way, int32 n, int (*cb)(struct GPS_SWay **)); 59 60 int32 GPS_Command_Get_Proximity(const char *port, GPS_PWay **way); 61 int32 GPS_Command_Send_Proximity(const char *port, GPS_PWay *way, int32 n); 62 63 int32 GPS_Command_Get_Route(const char *port, GPS_PWay **way); 64 int32 GPS_Command_Send_Route(const char *port, GPS_PWay *way, int32 n); 65 66 int32 GPS_Command_Get_Lap(const char *port, GPS_PLap **lap, int (*cb)(int, struct GPS_SWay **)); 67 68 int32 GPS_Command_Send_Course(const char *port, GPS_PCourse *crs, GPS_PCourse_Lap *clp, 69 GPS_PTrack *trk, GPS_PCourse_Point *cpt, 70 int32 n_crs, int32 n_clp, int32 n_trk, int32 n_cpt); 71 int32 GPS_Command_Send_Track_As_Course(const char *port, GPS_PTrack *trk, int32 n_trk, 72 GPS_PWay *wpt, int32 n_wpt); 73 74 int32 GPS_Command_Get_Workout(const char *port, void **lap, int (*cb)(int, struct GPS_SWay **)); 75 int32 GPS_Command_Get_Fitness_User_Profile(const char *port, void **lap, int (*cb)(int, struct GPS_SWay **)); 76 int32 GPS_Command_Get_Workout_Limits(const char *port, void **lap, int (*cb)(int, struct GPS_SWay **)); 77 int32 GPS_Command_Get_Course_Limits(const char *port, void **lap, int (*cb)(int, struct GPS_SWay **)); 78 #endif 79 80 #ifdef __cplusplus 81 } 82 #endif 83