[AGENT++] Trap implemantation puzzles
Jochen Katz
katz at agentpp.com
Wed Jul 12 21:31:28 CEST 2006
Hi,
> And what about notify mechanism on agent, Do I implement notify in
> the from object derived from MibLeaf or this is done somewhere else?
You're free to implement it where you want: agent++ does not define an
API for sending traps (beside the implementation of the notification
originator mib).
> Say I got my RoomTemperature : MibLeaf object with some value of
> temperature that is subdue to changes. And now I want to set a trap
> on value of temperature to fire a notification whenever value
> changes. Or to set trap when Value exceeds 30 degrees or when is less
> then 0. Where do I Implement that.
I would do the following:
- add a function check_trap() that checks for the temperature and sends
the trap if needed.
- From the main loop periodically call the check_trap() function.
Regards,
Jochen
More information about the AGENTPP
mailing list