You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
2.1 KiB
58 lines
2.1 KiB
#ifndef __PATHFINDER_BINARY_LOG_HEADER__
|
|
#define __PATHFINDER_BINARY_LOG_HEADER__
|
|
|
|
#include <ctype.h>
|
|
#include <err.h>
|
|
#include <errno.h>
|
|
#include <getopt.h>
|
|
#include <ifaddrs.h>
|
|
#include <netdb.h>
|
|
#include <paths.h>
|
|
#include <poll.h>
|
|
#include <stdio.h>
|
|
#include <signal.h>
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <time.h>
|
|
#include <unistd.h>
|
|
#include <arpa/inet.h>
|
|
#include <netinet/ip.h>
|
|
#include <netinet/udp.h>
|
|
#include <sys/param.h> /* MIN() */
|
|
#include <sys/socket.h>
|
|
|
|
#include "../base/basicSettingsProvider.h"
|
|
#include "../base/basicFunctionality.h"
|
|
#include "../base/basicMutex.h"
|
|
#include "../../pathfinder/pathfinderDBConnector.h"
|
|
|
|
class objectPathfinderBinaryLog{
|
|
protected:
|
|
char m_sUUID[42];
|
|
PATHFINDER_DBC * m_pDBC;
|
|
public:
|
|
static objectPathfinderBinaryLog * getInstance();
|
|
void attachDBC( PATHFINDER_DBC *DBC );
|
|
bool activate();
|
|
bool finish();
|
|
bool deleteDataFile( CSTR name );
|
|
void registerGPS( GPS_EVTREC *ptr );
|
|
void registerBNO( BNO_EVTREC *ptr );
|
|
void registerOPF( OPF_EVTREC *ptr );
|
|
void registerPIC( PF_TIMESTAMP *ts, CSTR name );
|
|
void registerLFS( LRF_EVTREC *ptr );
|
|
private:
|
|
basicLogCollection * m_pLog;
|
|
static objectPathfinderBinaryLog * _instance;
|
|
basicMutex m_mProtector;
|
|
objectPathfinderBinaryLog();
|
|
virtual ~objectPathfinderBinaryLog();
|
|
uint32_t m_nDBID;
|
|
bool m_bActive;
|
|
void uuidgen( bool gen = true );
|
|
FILE * m_pFID;
|
|
};
|
|
|
|
|
|
#endif
|