mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Add Keysight branding where applicable
Because there is now more than one "product name" per device type, we have a concept of a "generic product name" which singularly maps onto a device type. This change comes with a few small breaking changes within the C++ API: DeviceType::GetDeviceTypeString has been renamed to DeviceType::GetGenericProductName to denote that the returned value is not device specific and device->getProductName() is preferable. The member function DeviceType::toString has been renamed to DeviceType::getGenericProductName for the same reason. The DeviceType std::ostream& operator<< has been removed to avoid accidental use of the generic product name.
This commit is contained in:
@@ -11,7 +11,7 @@ int main() {
|
||||
|
||||
std::cout<< "Supported devices:" << std::endl;
|
||||
for(auto& dev : icsneo::GetSupportedDevices())
|
||||
std::cout << '\t' << dev << std::endl;
|
||||
std::cout << '\t' << dev.getGenericProductName() << std::endl;
|
||||
|
||||
std::cout << "\nFinding devices... " << std::flush;
|
||||
auto devices = icsneo::FindAllDevices(); // This is type std::vector<std::shared_ptr<icsneo::Device>>
|
||||
@@ -20,11 +20,11 @@ int main() {
|
||||
|
||||
// List off the devices
|
||||
for(auto& device : devices)
|
||||
std::cout << '\t' << device->getType() << " - " << device->getSerial() << " @ Handle " << device->getNeoDevice().handle << std::endl;
|
||||
std::cout << '\t' << device->describe() << " @ Handle " << device->getNeoDevice().handle << std::endl;
|
||||
std::cout << std::endl;
|
||||
|
||||
for(auto& device : devices) {
|
||||
std::cout << "Connecting to " << device->getType() << ' ' << device->getSerial() << "... ";
|
||||
std::cout << "Connecting to " << device->describe() << "... ";
|
||||
bool ret = device->open();
|
||||
if(!ret) { // Failed to open
|
||||
std::cout << "FAIL" << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user