[AGENT++] How to use the snmpRowStatus class

Hawk Hu hawk at looptech.com.cn
Fri May 25 11:17:37 CEST 2012


Dear Frank Fock,

	Thanks for your reply. When I used the function ready_for_service, the commit_set_request() can work now. Thanks a lot.
And I have a new question for you. I want to send a trap from my agent, and I use the class NotificationOriginator, but when my program runs to NotificationOriginator::generate(), it raise a exception of "Access Violation".
	Could you tell me how to use the class and its member functions, or send trap by other method?
Look forward to your reply, Thanks a lot.

Best regards

Hawk Hu
hawk at looptech.com.cn
2012-05-25        
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Chongqing Loop Technology Co., Ltd.
Tel : +86-23-86171369 ext.102
Fax: +86-23-86171368
          
= = = = = = = = = = = = = = = = = = = =


Hi,

I am not sure if I understand the problem.
Do you want to instrument a write operation
on a columnar object?

Then you should overwrite the commit_set_request
method (see MibEntry for the other methods).

The set method should not be overwritten for
instrumentation. It should simply change an
MibLeaf's value directly (no side effects).

Best regards,
Frank

On 23.05.2012 13:13, Hawk Hu wrote:
> Dear Friends,
> 	   I'm writing a snmp agent recently, and I can catch the set request by the MibLeaf::set().
> But when I want to catch a set request of a MibTableRow, I failed a whole day. I noticed the
> snmpRowStatus class, and I tried to add a columnar class of snmpRowStatus in the constructor,
> and do I need to add a instance of it when I create a new row? I tried the two ways (add or not),
> but it didn't call the snmpRowStatus::set().
> 	   I don't know where I'm wrong, could you tell me some correct ways? Or I only can process
> the set request in MibTable::update(), I don't think that's a good way.
> 	   Look forward to your reply, Thanks a lot.
>
> Best regards
>
> Hawk Hu
> hawk at looptech.com.cn
> 2012-05-23
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Chongqing Loop Technology Co., Ltd.
> Tel : +86-23-86171369 ext.102
> Fax: +86-23-86171368
>
>
> _______________________________________________
> AGENTPP mailing list
> AGENTPP at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/agentpp

-- 
AGENT++
http://www.agentpp.com
http://www.snmp4j.com
http://www.mibexplorer.com
http://www.mibdesigner.com

_______________________________________________
AGENTPP mailing list
AGENTPP at agentpp.org
http://lists.agentpp.org/mailman/listinfo/agentpp


= = = = = = = = = = = = = = = = = = = =


More information about the AGENTPP mailing list