完成框架目录和模块重构;新增核心、单例、工具、加密及框架 SDK;统一任务、相机和 RPC 接口,并增加离线检测、相机标定、备份恢复、版本管理、崩溃守护和心跳监控功能。
41 lines
911 B
C++
41 lines
911 B
C++
#pragma once
|
|
|
|
#include <qserialport.h>
|
|
#include <qthread.h>
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
#include <unordered_map>
|
|
|
|
enum lightSourceChannel
|
|
{
|
|
AChannel, BChannel, CChannel, DChannel
|
|
};
|
|
|
|
class lightSource
|
|
{
|
|
public:
|
|
QSerialPort* serialPort = new QSerialPort();
|
|
|
|
lightSource(std::string comName, int baudRate, std::string initStr);
|
|
~lightSource();
|
|
lightSource(const lightSource&) = delete;
|
|
lightSource& operator=(const lightSource&) = delete;
|
|
|
|
void setValue(lightSourceChannel channelIn, unsigned char value);
|
|
};
|
|
|
|
class lightSourceManager : public QThread
|
|
{
|
|
public:
|
|
lightSourceManager();
|
|
~lightSourceManager() override;
|
|
|
|
void run() override;
|
|
void init();
|
|
void insertLightSource(std::string comName, int baudRate, std::string initStr);
|
|
lightSource* getLightSourcePtr(std::string comName);
|
|
|
|
std::unordered_map<std::string, lightSource*> lightSources;
|
|
};
|