1 #ifdef __cplusplus 2 extern "C" 3 { 4 #endif 5 6 #ifndef gpsapp_h 7 #define gpsapp_h 8 9 10 #include "gps.h" 11 12 int32 GPS_Init(const char* port); 13 14 int32 GPS_A100_Get(const char* port, GPS_PWay** way, int (*cb)(int ct, GPS_PWay*)); 15 int32 GPS_A101_Get(const char* port); 16 int32 GPS_A100_Send(const char* port, GPS_PWay* way, int32 n, int (*cb)(GPS_PWay*)); 17 18 int32 GPS_A200_Get(const char* port, GPS_PWay** way); 19 int32 GPS_A201_Get(const char* port, GPS_PWay** way); 20 int32 GPS_A200_Send(const char* port, GPS_PWay* way, int32 n); 21 int32 GPS_A201_Send(const char* port, GPS_PWay* way, int32 n); 22 23 int32 GPS_A300_Get(const char* port, GPS_PTrack** trk, pcb_fn cb); 24 int32 GPS_A301_Get(const char* port, GPS_PTrack** trk, pcb_fn cb, int protoid); 25 int32 GPS_A300_Send(const char* port, GPS_PTrack* trk, int32 n); 26 int32 GPS_A301_Send(const char* port, GPS_PTrack* trk, int32 n, int protoid, 27 gpsdevh* fd); 28 29 int32 GPS_D300_Get(GPS_PTrack* trk, int32 entries, gpsdevh* h); 30 void GPS_D300b_Get(GPS_PTrack* trk, UC* data); 31 void GPS_D301b_Get(GPS_PTrack* trk, UC* data); 32 void GPS_D302b_Get(GPS_PTrack* trk, UC* data); 33 void GPS_D303b_Get(GPS_PTrack* trk, UC* data); /*D304*/ 34 void GPS_D310_Get(GPS_PTrack* trk, UC* s); 35 void GPS_D311_Get(GPS_PTrack* trk, UC* s); 36 void GPS_D300_Send(UC* data, GPS_PTrack trk, int32* len); 37 void GPS_D301_Send(UC* data, GPS_PTrack trk, int32* len, int type); 38 void GPS_D303_Send(UC* data, GPS_PTrack trk, int32* len, int protoid); 39 void GPS_D310_Send(UC* data, GPS_PTrack trk, int32* len); 40 void GPS_D311_Send(UC* data, GPS_PTrack trk, int32* len); 41 42 int32 GPS_A400_Get(const char* port, GPS_PWay** way); 43 int32 GPS_A400_Send(const char* port, GPS_PWay* way, int32 n); 44 45 int32 GPS_A500_Get(const char* port, GPS_PAlmanac** alm); 46 int32 GPS_A500_Send(const char* port, GPS_PAlmanac* alm, int32 n); 47 48 time_t GPS_A600_Get(const char* port); 49 time_t GPS_D600_Get(GPS_PPacket packet); 50 int32 GPS_A600_Send(const char* port, time_t Time); 51 void GPS_D600_Send(GPS_PPacket* packet, time_t Time); 52 53 int32 GPS_A700_Get(const char* port, double* lat, double* lon); 54 int32 GPS_A700_Send(const char* port, double lat, double lon); 55 void GPS_D700_Get(GPS_PPacket packet, double* lat, double* lon); 56 void GPS_D700_Send(GPS_PPacket* packet, double lat, double lon); 57 58 int32 GPS_A800_On(const char* port, gpsdevh** fd); 59 int32 GPS_A800_Off(const char* port, gpsdevh** fd); 60 int32 GPS_A800_Get(gpsdevh** fd, GPS_PPvt_Data* packet); 61 void GPS_D800_Get(GPS_PPacket packet, GPS_PPvt_Data* pvt); 62 63 int32 GPS_A906_Get(const char* port, GPS_PLap** lap, pcb_fn cb); 64 void GPS_D1011b_Get(GPS_PLap* Lap,UC* data); /*D906 D1001 D1015*/ 65 66 int32 GPS_A1006_Get(const char* port, GPS_PCourse** crs, pcb_fn cb); 67 int32 GPS_A1006_Send(const char* port, GPS_PCourse* crs, int32 n_crs, 68 gpsdevh* fd); 69 void GPS_D1006_Get(GPS_PCourse* crs, UC* p); 70 void GPS_D1006_Send(UC* data, GPS_PCourse crs, int32* len); 71 72 int32 GPS_A1007_Get(const char* port, GPS_PCourse_Lap** clp, pcb_fn cb); 73 int32 GPS_A1007_Send(const char* port, GPS_PCourse_Lap* clp, int32 n_clp, 74 gpsdevh* fd); 75 void GPS_D1007_Get(GPS_PCourse_Lap* clp, UC* p); 76 void GPS_D1007_Send(UC* data, GPS_PCourse_Lap clp, int32* len); 77 78 int32 GPS_A1008_Get(const char* port, GPS_PCourse_Point** cpt, pcb_fn cb); 79 int32 GPS_A1008_Send(const char* port, GPS_PCourse_Point* cpt, int32 n_cpt, 80 gpsdevh* fd); 81 void GPS_D1012_Get(GPS_PCourse_Point* cpt, UC* p); 82 void GPS_D1012_Send(UC* data, GPS_PCourse_Point cpt, int32* len); 83 84 int32 GPS_A1009_Get(const char* port, GPS_PCourse_Limits limits); 85 void GPS_D1013_Get(GPS_PCourse_Limits limits, UC* p); 86 87 /* Unhandled documented protocols, as of: 88 Garmin Device Interface Specification, May 19, 2006, Drawing Number: 001-00063-00 Rev. C 89 A650 FlightBook Transfer Protocol 90 A1000 Run Transfer Protocol 91 Capability A1000: D1009 92 D1000 D1010 93 A1002 Workout Transfer Protocol 94 Capability A1002: D1008 95 D1002 96 Capability A1003: D1003 97 A1004 Fitness User Profile Transfer Protocol 98 Capability A1004: D1004 99 A1005 Workout Limits Transfer Protocol 100 Capability A1005: D1005 101 */ 102 /* Unimplemted and Undocumented, as listed from the following device/sw: 103 GF305 3.70 104 105 Capability A601: D601 106 Capability A801: D801 107 108 Capability A902: 109 Capability A903: 110 Capability A907: D907 D908 D909 D910 111 Capability A918: D918 112 Capability A1013: D1014 113 */ 114 115 const char* Get_Pkt_Type(US p, US d0, const char** xinfo); 116 117 void GPS_Prepare_Track_For_Device(GPS_PTrack** trk, int32* n); 118 119 #endif 120 121 #ifdef __cplusplus 122 } 123 #endif 124