29 unsigned long nConectedDevices;
38 nConectedDevices = (
unsigned long)lstDevs.size();
40 cout <<
"There are " << nConectedDevices <<
" USB devices - " 44 for (
size_t i = 0; i < nConectedDevices; i++)
45 cout << lstDevs[i] << endl;
47 printf(
"\nPRESS ANY KEY TO END THE PROGRAM...\n\n");
49 std::this_thread::sleep_for(500ms);
60 catch (
const std::exception& e)
67 printf(
"Another exception!!");
mrpt::system::TTimeStamp getCurrentTime()
Returns the current (UTC) system time.
std::deque< TFTDIDevice > TFTDIDeviceList
Used in CInterfaceFTDI::ListAllDevices.
void ListAllDevices(TFTDIDeviceList &outList)
Generates a list with all FTDI devices connected right now.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A definition of a CStream actually representing a USB connection to a FTDI chip.
std::string dateTimeToString(const mrpt::system::TTimeStamp t)
Convert a timestamp into this textual form (UTC time): YEAR/MONTH/DAY,HH:MM:SS.MMM.
bool kbhit() noexcept
An OS-independent version of kbhit, which returns true if a key has been pushed.
std::string exception_to_str(const std::exception &e)
Builds a nice textual representation of a nested exception, which if generated using MRPT macros (THR...
void Test_EnumerateDevices()
Serial and networking devices and utilities.