109 lines
2.0 KiB
C++
109 lines
2.0 KiB
C++
#ifndef APP_COMMON_H
|
|
#define APP_COMMON_H
|
|
|
|
#include <algorithm>
|
|
#include <atomic>
|
|
#include <chrono>
|
|
#include <cmath>
|
|
#include <cstdint>
|
|
#include <fstream>
|
|
#include <functional>
|
|
#include <iostream>
|
|
#include <map>
|
|
#include <memory>
|
|
#include <mutex>
|
|
#include <numeric>
|
|
#include <queue>
|
|
#include <stack>
|
|
#include <sstream>
|
|
#include <string>
|
|
#include <thread>
|
|
#include <utility>
|
|
#include <unordered_map>
|
|
#include <vector>
|
|
|
|
#include <dirent.h>
|
|
#include <fcntl.h>
|
|
#include <linux/fb.h>
|
|
#include <semaphore.h>
|
|
#include <signal.h>
|
|
#include <stdarg.h>
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <sys/mman.h>
|
|
#include <sys/ioctl.h>
|
|
#include <sys/stat.h>
|
|
#include <sys/time.h>
|
|
#include <sys/types.h>
|
|
#include <time.h>
|
|
#include <unistd.h>
|
|
#include "Log.h"
|
|
//#include <opencv2/opencv.hpp>
|
|
//#include <opencv2/core/core.hpp>
|
|
//#include <opencv2/highgui/highgui.hpp>
|
|
//#include <opencv2/imgproc/imgproc.hpp>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
#include <libavcodec/avcodec.h>
|
|
#include <libavutil/samplefmt.h>
|
|
#include <libavformat/avformat.h>
|
|
#ifdef __cplusplus
|
|
};
|
|
#endif
|
|
|
|
#include "CommonDataType.h"
|
|
#include "nvidia_acl_datatype.h"
|
|
|
|
#define AEI_COMM_BUFFER_SIZE 2048
|
|
|
|
typedef struct
|
|
{
|
|
// 数据网络状态
|
|
std::string strNetworkStatus;
|
|
// 设备名
|
|
std::string strDeviceName;
|
|
// 设备编码
|
|
std::string strDeviceSn;
|
|
// 设备/程序 运行状态
|
|
std::string strDeviceRunningStatus;
|
|
// 提示信息
|
|
std::string strDeviceWarnInfo;
|
|
} DeviceStatus;
|
|
|
|
typedef struct
|
|
{
|
|
std::string strRfid;
|
|
std::string strTime;
|
|
std::string strTrainTime;
|
|
} RfidInfo;
|
|
|
|
typedef struct
|
|
{
|
|
std::string strCarriageType;
|
|
std::string strCarriageNum;
|
|
std::string strOrder;
|
|
std::string strTrainTime;
|
|
std::string strRfidInfo;
|
|
std::string strNowTime;
|
|
} TrainInfo;
|
|
|
|
typedef struct
|
|
{
|
|
std::string strComeTime;
|
|
int iDirection;
|
|
bool bComeTrain;
|
|
} ComeTrainInfo;
|
|
|
|
// 定义日期结构体
|
|
typedef struct Date
|
|
{
|
|
int year;
|
|
int month;
|
|
int day;
|
|
} Date;
|
|
|
|
#endif |