#ifndef CAMERA_HELPER_H #define CAMERA_HELPER_H #ifndef _WIN32 #include "livox_sdk.h" extern "C" { typedef void (*FuncGetLidarData)(uint8_t handle, LivoxEthPacket* data, uint32_t data_num, void* client_data); //#ifndef _WIN32 //typedef int (*PFuccamera_init)(); //typedef int (*PFuccamera_start)(int epx_time); //typedef int (*PFuccamera_stop)(); //typedef int (*PFuccamera_cap)(void** data, int& w, int& h, int time_out); #define LIDAR_BASE 5000 #define LIDAR_OK 0 #define LIDAR_INIT_SDK_FAILED 1 - LIDAR_BASE #define LIDAR_DLL_INIT_ERROR 2 - LIDAR_BASE #define LIDAR_START_DISCOVERY_FAILD 3- LIDAR_BASE #define LIDAR_START_SAMPLING_FAILD 5- LIDAR_BASE #define LIDAR_STOP_SAMPLING_FAILD 6- LIDAR_BASE class CLidarHelper { public: static CLidarHelper* Get(); static CLidarHelper* m_instance; public: CLidarHelper(); ~CLidarHelper(); public: //PFuccamera_init pfuccamera_init = nullptr; //PFuccamera_start pFuccamera_start = nullptr; //PFuccamera_stop pFuccamera_stop = nullptr; //PFuccamera_cap pfuccamera_cap = nullptr; public: int Init(void* pfunGetdate); int Start(int epx_time = 12 * 10000); int Stop(); int Cap(); int GetState() { return 0; }; }; } // extern "C" { #else class CLidarHelper { public: static CLidarHelper* Get() { if (CLidarHelper::m_instance == nullptr) { CLidarHelper::m_instance = new CLidarHelper(); // 待优化 } return CLidarHelper::m_instance; }; static CLidarHelper* m_instance; public: CLidarHelper() {}; ~CLidarHelper() {}; public: //PFuccamera_init pfuccamera_init = nullptr; //PFuccamera_start pFuccamera_start = nullptr; //PFuccamera_stop pFuccamera_stop = nullptr; //PFuccamera_cap pfuccamera_cap = nullptr; public: int Init(void* pfunGetdate) { return 0; }; int Start(int epx_time = 12 * 10000) { return 0; }; int Stop() { return 0; }; int Cap() { return 0; }; int GetState() { return 0; }; }; #endif #endif