[AGENT++] How to use register_for_notifications() at different context?

Claus Klein claus.klein at arcormail.de
Thu Mar 10 22:13:48 CET 2011


Hi all,

I want to use register_for_notifications() but there is no usage  
example?

It seems, that I have to add a callback function
	void change_notification(const Oidx&, mib_change);
  at my MibEntry?

I need to know if something is changed at another MibTable at the same  
context.
But it seems that the function is called for every change event.

Too I have the Problem, that need to registered the same MIB more than  
one times with different context.
So I need to know the context and the OID which was changed.

Is there any suggestion to solve my problem?

With regards,

Claus

claus-kleins-macbook-pro:AgentPro clausklein$ tcgrep.pl -rHw  
'(change_notification|notify_change|register_for_notifications)' */src  
*/examples */include
agent++/src/mib.cpp:	notify_change(get_oid(), CHANGE);
agent++/src/mib.cpp:				notify_change(ind, REMOVE);
agent++/src/mib.cpp:		notify_change(index(tmpoid), CHANGE);
agent++/src/mib.cpp:		notify_change(ind, CREATE);
agent++/src/mib_entry.cpp:void  
MibEntry::register_for_notifications(MibEntry* entry)
agent++/src/mib_entry.cpp:void MibEntry::notify_change(const Oidx& o,  
mib_change change)
agent++/src/mib_entry.cpp:		cur.get()->change_notification(o, change);
agent++/include/agent_pp/mib_entry.h:	virtual void		 
notify_change(const Oidx&, mib_change);
agent++/include/agent_pp/mib_entry.h:	virtual void		 
register_for_notifications(MibEntry*);
agent++/include/agent_pp/mib_entry.h:	 * Wrapper function for  
register_for_notifications.
agent++/include/agent_pp/mib_entry.h:					 
{ register_for_notifications(e); }
agent++/include/agent_pp/mib_entry.h:	 * that called notify_change().
agent++/include/agent_pp/mib_entry.h:	virtual void		 
change_notification(const Oidx&, mib_change) {}
claus-kleins-macbook-pro:AgentPro clausklein$




More information about the AGENTPP mailing list