##// END OF EJS Templates
te_structs.h se cambio de directorio de util a timeEngine
aaguilar -
r176:177
parent child
Show More
@@ -0,0 +1,149
1 /*
2 * te_defs.h
3 *
4 * Created on: Nov 4, 2014
5 * Author: Alan Aguilar Sologuren
6 */
7
8 #ifndef UTILS_TE_STRUCTS_H_
9 #define UTILS_TE_STRUCTS_H_
10
11 #include <stdint.h>
12
13 /*mascaras disponibles para GPS 15xL*/
14 #define GPNON 0x0000 /**< Unknown packet type. */
15 #define GPGGA 0x0001 /**< GGA - Essential fix data which provide 3D location and accuracy data. */
16 #define GPGSA 0x0002 /**< GSA - GPS receiver operating mode, SVs used for navigation, and DOP values. */
17 #define GPGSV 0x0004 /**< GSV - Number of SVs in view, PRN numbers, elevation, azimuth & SNR values. */
18 #define GPRMC 0x0008 /**< RMC - Recommended Minimum Specific GPS/TRANSIT Data. */
19 #define GPVTG 0x0010 /**< VTG - Actual track made good and speed over ground. */
20 #define GPALM 0x0020
21 #define GPGLL 0x0040
22 #define PGRMI 0x0080
23 #define PGRMC 0x0100
24 #define PGRMC1 0x0200
25 #define PGRMO 0x0400
26
27 ///////////////////////////////////////////////////////////////////////////////
28 // ESTRUCTURAS PARA MODULO DE CONTROL DE RECEPTOR GNSS (GPS-15xL)
29 ///////////////////////////////////////////////////////////////////////////////
30
31 /*!
32 *
33 */
34 typedef struct gnss_config_struct_{
35 uint8_t baudrate;
36 uint16_t nmea_mask;
37 }gnss_config_struct;
38
39 /*!
40 * \struct gnss_precise_time
41 * \brief Estructura de tiempo de GNSS para almacenar tiempo preciso.
42 * Almacena tiempo con resolucion de microsegundos.
43 */
44 typedef struct gnss_precise_time_{
45 int year; /*!< Ahno de la data adquirida */
46 int doy; /*!< Dia del ahno de la data adqirida */
47 int hour; /*!< Hora de la data adquirida */
48 int minu; /*!< Minutos de la data adquirida */
49 int sec; /*!< Segundos de la data adquirida */
50 int usec; /*!< Microsegndos de la data adquirida */
51 gnss_precise_time_(): year(0), doy(0), hour(0), minu(0), sec(0), usec(0){}
52 }gnss_precise_time;
53
54 ///////////////////////////////////////////////////////////////////////////////
55 // ESTRUCTURAS PARA EL MODULO DE CONTROL DEL GENERADOR DE CLOCK
56 ///////////////////////////////////////////////////////////////////////////////
57
58 /*!
59 *
60 */
61 typedef struct clock_config_struct_{
62
63 }clock_config_struct;
64
65 /*!
66 *
67 */
68 typedef struct clock_state_struct_{
69
70 }clock_state_struct;
71
72 ///////////////////////////////////////////////////////////////////////////////
73 // ESTRUCTURAS PARA MODULO DE CONTROL DE RTC
74 ///////////////////////////////////////////////////////////////////////////////
75
76 /*!
77 * \struct ds1308_ctl_byte
78 * \brief Estructura para almacenar informacion de configuracion para
79 * el registro con direccion DS1308_CTL_ADD (0x07) del DS1308.
80 */
81 typedef struct ds1308_ctl_byte_ {
82 uint8_t rs0:1;
83 uint8_t rs1:1;
84 uint8_t bbclk:1;
85 uint8_t los:1;
86 uint8_t sqwe:1;
87 uint8_t osf:1;
88 uint8_t eclk:1;
89 uint8_t out:1;
90 ds1308_ctl_byte_(): rs0(0), rs1(0), bbclk(0), los(0), sqwe(0),
91 osf(0), eclk(1), out(0){}
92 }ds1308_ctl_byte;
93
94 /*!
95 * \struct ds1308_clock_halt
96 * \brief Estructura para configurar el arranque o parada de funciones
97 * timekeeping del DS1308
98 */
99 typedef struct ds1308_clock_halt_ {
100 uint8_t dummy_dont_use:7;
101 uint8_t ch:1;
102 ds1308_clock_halt_(): dummy_dont_use(0), ch(0){}
103 }ds1308_clock_halt;
104
105 /*!
106 * \struct rtc_config_struct
107 * \brief Almacena toda la informmacion necesaria para configurar el IC
108 * DS1308.
109 */
110 typedef struct rtc_config_struct_{
111 ds1308_clock_halt clk_halt;
112 ds1308_ctl_byte ctl_byte;
113 }rtc_config_struct;
114
115 ///////////////////////////////////////////////////////////////////////////////
116 //
117 ///////////////////////////////////////////////////////////////////////////////
118
119 /*!
120 *
121 */
122 typedef struct te_status_struct_{
123
124 }te_status_struct;
125
126 /*!
127 *
128 */
129 typedef struct te_time_pkg_{
130 gnss_precise_time time; /*!< Tiempo de adquisicion de un PPS de GNSS
131 especifico */
132 uint16_t pps_serial; /*!< Numero serial de un PPS desde que la linea de
133 enganche GNSS (LOCK) fue activada (max 1800) */
134 bool is_gnss_time; /*!< true si el tiempo dado proviene del un
135 receptor GNSS */
136 gnss_precise_time * pnext; /*!< Apunta al siguiente paquete de tiempo */
137 gnss_precise_time * previous; /*!< Apunta al paquete de tempo anterior. */
138 te_time_pkg_(): pps_serial(0), is_gnss_time(false), pnext(0), previous(0){}
139 }te_time_pkg;
140
141 /*!
142 *
143 */
144 typedef struct te_command_struct_{
145
146 }te_command_struct;
147
148
149 #endif /* UTILS_TE_STRUCTS_H_ */
@@ -15,18 +15,6
15 #include <map>
15 #include <map>
16 #include <string>
16 #include <string>
17
17
18 #define GPNON 0x0000 /**< Unknown packet type. */
19 #define GPGGA 0x0001 /**< GGA - Essential fix data which provide 3D location and accuracy data. */
20 #define GPGSA 0x0002 /**< GSA - GPS receiver operating mode, SVs used for navigation, and DOP values. */
21 #define GPGSV 0x0004 /**< GSV - Number of SVs in view, PRN numbers, elevation, azimuth & SNR values. */
22 #define GPRMC 0x0008 /**< RMC - Recommended Minimum Specific GPS/TRANSIT Data. */
23 #define GPVTG 0x0010 /**< VTG - Actual track made good and speed over ground. */
24 #define GPALM 0x0020
25 #define GPGLL 0x0040
26 #define PGRMI 0x0080
27 #define PGRMC 0x0100
28 #define PGRMC1 0x0200
29 #define PGRMO 0x0400
30
18
31 typedef int (*pnmea_parse)(nmea_code*, gnss_info*);
19 typedef int (*pnmea_parse)(nmea_code*, gnss_info*);
32 typedef std::map<std::string, pnmea_parse> code;
20 typedef std::map<std::string, pnmea_parse> code;
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now