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.
31 lines
885 B
31 lines
885 B
#pragma once
|
|
#include <string>
|
|
#include <vector>
|
|
#include <cstdint>
|
|
|
|
class TriggerController {
|
|
public:
|
|
TriggerController();
|
|
~TriggerController();
|
|
|
|
// 初始化:注册所有摄像头设备路径
|
|
bool init(const std::vector<std::string>& device_paths,
|
|
unsigned int fps, bool internal_pps = false);
|
|
|
|
// 启用/禁用硬件触发
|
|
bool enable();
|
|
bool disable();
|
|
|
|
// 配置触发延迟与曝光时间(单位:微秒)
|
|
bool setDelayAndExposure(unsigned int delay_us, unsigned int exposure_us);
|
|
|
|
// 状态查询
|
|
bool isHardwareReady() const { return hw_ready_; }
|
|
const std::vector<std::string>& getDevices() const { return devices_; }
|
|
|
|
private:
|
|
std::vector<std::string> devices_;
|
|
unsigned int fps_ = 30;
|
|
bool internal_pps_ = false;
|
|
bool hw_ready_ = false; // 硬件触发是否成功初始化
|
|
}; |