线程与定时器
HAL 层的线程和定时器功能由具体设备驱动实现。控制逻辑应在 registerCustomeAppWorkpd 回调中每周期执行。
Device 基类
所有设备的抽象基类:
cpp
class Device {
public:
Device(DeviceType device_type, const std::string& device_name);
virtual ~Device() = default;
bool valid() const;
DeviceType get_device_type() const;
std::string get_device_name() const;
};成员函数
| 函数 | 说明 |
|---|---|
valid() | 设备是否有效 |
get_device_type() | 获取设备类型 |
get_device_name() | 获取设备名称 |