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.
85 lines
2.1 KiB
85 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"
|
|
|
|
#define MAX_RECORD_PAYLOAD 4095
|
|
|
|
typedef struct S_BLOG_RECORD{
|
|
uint8_t type;
|
|
uint64_t ts;
|
|
uint8_t payload[MAX_RECORD_PAYLOAD];
|
|
} BLOG_RECORD;
|
|
|
|
typedef struct S_BNO_DATA{
|
|
uint8_t temperature;
|
|
int16_t gravity_z;
|
|
int16_t gravity_y;
|
|
int16_t gravity_x;
|
|
int16_t lacc_z;
|
|
int16_t lacc_y;
|
|
int16_t lacc_x;
|
|
int16_t quaterion_z;
|
|
int16_t quaterion_y;
|
|
int16_t quaterion_x;
|
|
int16_t quaterion_w;
|
|
int16_t pitch;
|
|
int16_t roll;
|
|
int16_t yaw;
|
|
int16_t gyro_z;
|
|
int16_t gyro_y;
|
|
int16_t gyro_x;
|
|
int16_t mag_z;
|
|
int16_t mag_y;
|
|
int16_t mag_x;
|
|
int16_t acc_z;
|
|
int16_t acc_y;
|
|
int16_t acc_x;
|
|
} BNO_DATA;//45 bytes
|
|
|
|
#define LRF_MAX_ANGLES 6000
|
|
|
|
typedef struct S_LRF_DATA{
|
|
uint64_t start_ts;
|
|
uint16_t range[LRF_MAX_ANGLES];
|
|
} LRF_DATA;
|
|
|
|
class objectPathfinderBinaryLog{
|
|
protected:
|
|
char m_sUUID[42];
|
|
public:
|
|
objectPathfinderBinaryLog * getInstance();
|
|
private:
|
|
basicLogCollection * m_pLog;
|
|
static objectPathfinderBinaryLog * _instance;
|
|
objectPathfinderBinaryLog();
|
|
virtual ~objectPathfinderBinaryLog();
|
|
void uuidgen(void);
|
|
BLOG_RECORD m_sRecBuffer;
|
|
FILE * m_pFID;
|
|
};
|
|
|
|
|
|
#endif
|