-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmydb.h
44 lines (35 loc) · 1.08 KB
/
mydb.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Estructuras y funciones particulares de acceso a base de datos
#ifndef MYDB_H_
#define MYDB_H_
#include "lib/db.h"
// Estructuras para meter y sacar datdos de la BD
typedef struct tblRx {
long id;
long ts;
long ip;
int port;
long ns;
int status;
int len;
char *data;
}TBL_RX;
typedef struct tblGps {
long id;
long rx_id;
int cmd;
long lat;
long lon;
int bearing;
int speed;
int fix;
int hdop;
long time;
}TBL_GPS;
int mydb_insert_transport_frame(DB_T *db, long ip, int port,long sn, void *buf, size_t len);
int mydb_insert_trashed_transport_frame(DB_T *db, long ip, int port,long sn, void *buf, size_t len);
int mydb_insert_gps_subframe(DB_T *db, int rx_id, int loc_id, void *buf, size_t len);
RES_T * mydb_select_undecoded_transport_frames(DB_T *db);
int mydb_update_transport_frame_status(DB_T *db, int rx_id, int status);
int mydb_insert_old_gps_subframe(DB_T *db, int rx_id, int loc_id, int cmd, int len, int seq_l, int seq_s, void *buf, size_t bufLen);
int mydb_insert_rally_old_gps_frame(DB_T *db, int rx_id, int loc_id, void *buf, size_t bufLen);
#endif /* MYDB_H_ */