I need to provide a read-only changing integer so i think i need to use the addDynamicIntegerHandler.
The challenge for me is that the SNMPAgent instance is a class member and i dont know what i've to pass as GETINT_FUNC.
class MyClass
{
private:
int myChangingInt;
SNMPAgent * snmp;
int callback_test() {return myChangingInt};
void Init()
{
snmp = new SNMPAgent("public", "private");
.
.
.
// the following line returns an invalid use of non-static member function 'int MyClass::callback_test()'
snmp->addDynamicIntegerHandler(".1.3.6.1.4.1.14.1", callback_test, true);
.
.
.
};
};
I need to provide a read-only changing integer so i think i need to use the addDynamicIntegerHandler. The challenge for me is that the SNMPAgent instance is a class member and i dont know what i've to pass as GETINT_FUNC.
Anyone that knows how to solve it?