[AGENT++] MibLeaf subclassing

Robert Kapeller robert.kapeller at siemens.com
Tue Jun 8 16:26:37 CEST 2004


Please forget this posting!
I don't exactly know what mistake I (or my devlopment environment) made, but now it works.

-robert.
On Tuesday 08 June 2004 11:25, Robert Kapeller wrote:
> Hi!
>
> I want to intercept certain SET-requests to scalar objects.
> I tried this by creating a subclass of MibLeaf:
>
> class calmMibLeaf : public MibLeaf  {
>    // Constructor...
>    virtual void set_value(...);
> }
>
> and override all the set_value(...) - methods:
>
> void calmMibLeaf::set_value(...) {
> 	// Do something
> 	LOG(calmMibLeaf set_value() called);
> 	MibLeaf::set_value();
> }
>
>
> The calmMibLeaf-objects are created and added to my mib-object:
>
>   calmCurrNotifyID = new calmMibLeaf(CALM_CURR_NOTIFY_ID, READWRITE, new
> Gauge32(0));
>
>   mib->add(calmCurrNotifyID);
>
> When I set the value from the command linde via snmpSet ... I can see,
> that the derived methods
> in calmMibLeaf are never called.
>
> How can I intercept SNMP SET-requests? Or did I just make a programming
> fault?
>
> I use agent++ V3.5.14
>
> thank you in advance - robert.
>
> _______________________________________________
> AGENTPP mailing list
> AGENTPP at agentpp.org
> http://agentpp.org/mailman/listinfo/agentpp

-- 
----------------------------------
Robert Kapeller
Siemens ICN CN TS
Erdberger Lände 26 , A-1030 Wien
+43 51707-34394
mailto:robert.kapeller at siemens.com
----------------------------------




More information about the AGENTPP mailing list