I am trying to point the addReadWriteStringHandler() to a char array within a global structure to allow a GET and SET to be performed on it and I am having real problems getting to work.
I have tried creating a pointer to the structure and dereferencing the structure like this:
SNMPAgent * snmp;
snmp = new SNMPAgent("public", "private");
CONFIG_REG conf = new CONFIG_REG();
snmp->addReadWriteStringHandler(".1.3.6.1.4.1.38218.1.3.1.0", (char*) (*conf).sensor_name, 40, true);
But get a SNMP not such object reply in iReasoning MIB browser.
The snmp->addReadOnlyStaticStringHandler() works okay so I am at a loss as to why it will not work ?