use of org.opennms.netmgt.snmp.SnmpInstId in project opennms by OpenNMS.
the class InstanceStrategy method getInstanceFromPhysAddr.
public static SnmpInstId getInstanceFromPhysAddr(String physAddr) {
String[] elm;
elm = physAddr.split(":");
if (elm.length != 6) {
return null;
}
StringBuilder sb = new StringBuilder();
for (int i = 0; i < 6; i++) {
sb.append(".");
sb.append(Integer.parseInt(elm[i], 16));
}
return new SnmpInstId(sb.toString());
}
Aggregations