This example lists all connected devices and prints their manufacturer device name.
#include <thread>
#include <chrono>
#include <cstdint>
#include "master.h"
#include "logger.h"
int main() {
const std::string busname = "slcan0";
const std::string baudrate = "500K";
PRINT("List devices");
if (!master.
start(busname, baudrate)) {
ERROR("Starting master failed.");
return EXIT_FAILURE;
}
std::this_thread::sleep_for(std::chrono::seconds(1));
DUMP(num_devices);
for (size_t i=0; i<num_devices; ++i) {
PRINT("Starting");
PRINT("Loading EDS from library...")
PRINT("Loaded the following EDS file from the library: " << loaded_eds_file);
PRINT("Dictionary:");
}
}