19 if (!rResourceManager.Initialize())
24 if (!rResourceManager.FindResources(l_InstrumentList, IEEE4888_TEST_RESOURCE_FILTER) || l_InstrumentList.empty())
28 rInstrumentName = l_InstrumentList.front();
32 std::cout <<
"l_CManagerException: " << rE.
what() << std::endl;
40 bool ConnectToIEEE488Instrument (IEEE4888_TEST_RESOURCE_MANAGER_CLASS * & rpResourceManager, IEEE4888_TEST_INSTRUMENT_CLASS * & rpInstrument)
45 rpResourceManager =
new IEEE4888_TEST_RESOURCE_MANAGER_CLASS;
53 rpInstrument =
new IEEE4888_TEST_INSTRUMENT_CLASS(*rpResourceManager, l_InstrumentName);
54 if (
nullptr == rpInstrument)
58 if (!rpInstrument->Open())
63 std::cout <<
"l_CManagerException: " << rE.
what() << std::endl;
64 rpInstrument =
nullptr;
72 std::string l_ID = std::string(rBuffer.
begin(), rBuffer.
end());
73 std::regex l_Regex(
"([^,]+),([^,]+),([^,]+),([^,]+)");
75 if (!std::regex_match(l_ID, l_Match, l_Regex))
78 std::string l_Manufacturer = l_Match[1].str();
79 std::string l_Model = l_Match[2].str();
80 std::string l_SerialNumber = l_Match[3].str();
81 std::string l_Versions = l_Match[4].str();
83 l_Regex =
"Metrolab.*";
84 if (!std::regex_match(l_Manufacturer, l_Match, l_Regex))
88 if (!std::regex_match(l_SerialNumber, l_Match, l_Regex))
91 l_Regex =
"((THM1176)|(TFM1186)|(PT2026)|>(FDI2056)).*";
92 if (!std::regex_match(l_Model, l_Match, l_Regex))
95 if (l_Match[1] ==
"THM1176")
96 l_Regex =
"el(([A-Z])([0-9]+))-pr(([A-Z])([0-9]+))-fw(([0-9]+)\\.([0-9]+))\\n";
99 if (!std::regex_match(l_Versions, l_Match, l_Regex))