19 const auto*
const it = std::lower_bound(begin, end, vendorId,
20 [](
const auto& entry, std::uint16_t
id)
21 {
return entry.first < id; });
22 if (it != end && it->first == vendorId)
24 return std::string(it->second);
36 return std::format(
"Unknown (0x{:04X})", vendorId);
constexpr std::pair< std::uint16_t, std::string_view > kVendorTable[]
constexpr std::size_t kVendorTableSize
std::optional< std::string > LookupVendor(std::uint16_t vendorId)
Look up a vendor name without a fallback string.
std::string GetVendorName(std::uint16_t vendorId)
Get the vendor name for a 16-bit PROFINET vendor ID.
Auto-generated PROFINET Vendor ID to vendor-name lookup table.
Declares PROFINET Vendor ID lookup utilities. The lookup table itself lives in vendors_data....