15 #include <visiontransfer/deviceenumeration.h>
16 #include <visiontransfer/asynctransfer.h>
17 #include <visiontransfer/imageset.h>
24 #define snprintf _snprintf_s
27 using namespace visiontransfer;
33 DeviceEnumeration::DeviceList devices =
35 if(devices.size() == 0) {
36 std::cout <<
"No devices discovered!" << std::endl;
41 std::cout <<
"Discovered devices:" << std::endl;
42 for(
unsigned int i = 0; i< devices.size(); i++) {
43 std::cout << devices[i].toString() << std::endl;
45 std::cout << std::endl;
52 for(
int imgNum=0; imgNum<100; imgNum++) {
53 std::cout <<
"Receiving image set " << imgNum << std::endl;
57 while(!asyncTransfer.collectReceivedImageSet(imageSet,
66 snprintf(fileName,
sizeof(fileName),
"image%03d_%d.pgm", imgNum, i);
70 }
catch(
const std::exception& ex) {
71 std::cerr <<
"Exception occurred: " << ex.what() << std::endl;