SmartLockerTools/UnitTest/LinuxDeviceEnums.cpp
amass 943fb6fb4b
All checks were successful
Build Applications / Build (push) Successful in 3m3s
Windows CI / build (push) Successful in 3m4s
adapt for linux.
2024-11-21 13:12:45 +00:00

16 lines
450 B
C++

#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).friendlyName;
}
discovery.enterOtaMode(device, error);
}