[AGENT++] Fwd: bind variables to OID

Jochen Katz katz at agentpp.com
Thu Jan 28 22:09:43 CET 2016


Hi,

> The idea is that when I modify my variables they also modify in SNMP,
> so when one of the MIB variables is updated, it also updates my
> variables within the code.
> mib.add(newMibLeaf("1.3.6.1.4.1.12807.3.1.2.1.0",READWRITE,newSnmpInt32(MyVar)));

you cannot get this "feature" automatically, as there are no SnmpSyntax
classes that use a pointer to remote data and additionally agent++
classes will replace the SnmpSyntax object when processing a set request.

So the normal way to connect the mib values with your data values is to
subclass MibLeaf and MibTable and override the necessary functions to
update the mib value before processing a get request and to set the new
values also to your application after processing a set request.

Regards,
  Jochen



More information about the AGENTPP mailing list