1 #ifdef __cplusplus 2 extern "C" 3 { 4 #endif 5 6 #ifndef gpscom_h 7 #define gpscom_h 8 9 10 #include "gps.h" 11 #include <time.h> 12 13 int32 GPS_Command_Off(const char* port); 14 15 time_t GPS_Command_Get_Time(const char* port); 16 int32 GPS_Command_Send_Time(const char* port, time_t Time); 17 18 int32 GPS_Command_Get_Position(const char* port, double* lat, double* lon); 19 int32 GPS_Command_Send_Position(const char* port, double lat, double lon); 20 21 int32 GPS_Command_Pvt_On(const char* port, gpsdevh** fd); 22 int32 GPS_Command_Pvt_Off(const char* port, gpsdevh** fd); 23 int32 GPS_Command_Pvt_Get(gpsdevh** fd, GPS_PPvt_Data* pvt); 24 25 int32 GPS_Command_Get_Almanac(const char* port, GPS_PAlmanac** alm); 26 int32 GPS_Command_Send_Almanac(const char* port, GPS_PAlmanac* alm, int32 n); 27 28 int32 GPS_Command_Get_Track(const char* port, GPS_PTrack** trk, int (*cb)(int, struct GPS_SWay**)); 29 int32 GPS_Command_Send_Track(const char* port, GPS_PTrack* trk, int32 n, int eraset); 30 31 int32 GPS_Command_Get_Waypoint(const char* port, GPS_PWay** way,int (*cb)(int, struct GPS_SWay**)); 32 int32 GPS_Command_Send_Waypoint(const char* port, GPS_PWay* way, int32 n, int (*cb)(struct GPS_SWay**)); 33 34 int32 GPS_Command_Get_Proximity(const char* port, GPS_PWay** way); 35 int32 GPS_Command_Send_Proximity(const char* port, GPS_PWay* way, int32 n); 36 37 int32 GPS_Command_Get_Route(const char* port, GPS_PWay** way); 38 int32 GPS_Command_Send_Route(const char* port, GPS_PWay* way, int32 n); 39 40 int32 GPS_Command_Get_Lap(const char* port, GPS_PLap** lap, int (*cb)(int, struct GPS_SWay**)); 41 42 int32 GPS_Command_Send_Course(const char* port, GPS_PCourse* crs, GPS_PCourse_Lap* clp, 43 GPS_PTrack* trk, GPS_PCourse_Point* cpt, 44 int32 n_crs, int32 n_clp, int32 n_trk, int32 n_cpt); 45 int32 GPS_Command_Send_Track_As_Course(const char* port, GPS_PTrack* trk, int32 n_trk, 46 GPS_PWay* wpt, int32 n_wpt, int eraset); 47 48 int32 GPS_Command_Get_Workout(const char* port, void** lap, int (*cb)(int, struct GPS_SWay**)); 49 int32 GPS_Command_Get_Fitness_User_Profile(const char* port, void** lap, int (*cb)(int, struct GPS_SWay**)); 50 int32 GPS_Command_Get_Workout_Limits(const char* port, void** lap, int (*cb)(int, struct GPS_SWay**)); 51 int32 GPS_Command_Get_Course_Limits(const char* port, void** lap, int (*cb)(int, struct GPS_SWay**)); 52 #endif 53 54 #ifdef __cplusplus 55 } 56 #endif 57