SmartLockerTools/UnitTest/LinuxDeviceEnums.cpp

16 lines
437 B
C++
Raw Permalink Normal View History

2024-10-02 03:01:37 +08:00
#include "BoostLog.h"
#include "DeviceDiscovery.h"
#include <boost/test/unit_test.hpp>
BOOST_AUTO_TEST_CASE(EnumDevice) {
std::error_code error;
DeviceDiscovery discovery;
auto device = discovery.find("UVC Camera", error);
auto devices = discovery.devices();
for (int i = 0; i < devices.size(); i++) {
LOG(info) << "device[" << i << "] " << devices.at(i);
}
discovery.enterOtaMode(device, error);
}