18 lines
469 B
C++
18 lines
469 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);
|
|
LOG(info) << device->name;
|
|
|
|
auto devices = discovery.devices();
|
|
for (int i = 0; i < devices.size(); i++) {
|
|
LOG(info) << "device[" << i << "] " << devices.at(i);
|
|
}
|
|
|
|
discovery.enterOtaMode(device, error);
|
|
}
|