Search in sources :

Example 1 with SnmpVarBind

use of org.opennms.protocols.snmp.SnmpVarBind in project opennms by OpenNMS.

the class JoeSnmpV1TrapBuilder method addVarBind.

@Override
public void addVarBind(SnmpObjId name, SnmpValue value) {
    SnmpSyntax val = ((JoeSnmpValue) value).getSnmpSyntax();
    trap.addVarBind(new SnmpVarBind(new SnmpObjectId(name.getIds()), val));
}
Also used : SnmpSyntax(org.opennms.protocols.snmp.SnmpSyntax) SnmpVarBind(org.opennms.protocols.snmp.SnmpVarBind) SnmpObjectId(org.opennms.protocols.snmp.SnmpObjectId)

Example 2 with SnmpVarBind

use of org.opennms.protocols.snmp.SnmpVarBind in project opennms by OpenNMS.

the class JoeSnmpV2TrapBuilder method addVarBind.

@Override
public void addVarBind(SnmpObjId name, SnmpValue value) {
    SnmpSyntax val = ((JoeSnmpValue) value).getSnmpSyntax();
    m_pdu.addVarBind(new SnmpVarBind(new SnmpObjectId(name.getIds()), val));
}
Also used : SnmpSyntax(org.opennms.protocols.snmp.SnmpSyntax) SnmpVarBind(org.opennms.protocols.snmp.SnmpVarBind) SnmpObjectId(org.opennms.protocols.snmp.SnmpObjectId)

Aggregations

SnmpObjectId (org.opennms.protocols.snmp.SnmpObjectId)2 SnmpSyntax (org.opennms.protocols.snmp.SnmpSyntax)2 SnmpVarBind (org.opennms.protocols.snmp.SnmpVarBind)2