[SNMP4J] AgenPro Scalar Class Generation

Prusi, Jesse R jesse.r.prusi at lmco.com
Thu Mar 23 23:32:49 CET 2006


Frank,

Thanks for the quick response.  I modified the java_code.vm file to
generate classes for all scalars.  Why are these classes not generated
for read-only scalars by default?  It seems to me that the classes are
needed for read-only scalars as well since we need to overload the get()
method to include our instrumentation code.  Is there another way of
doing things that I'm not seeing?

Thanks,
Jesse 

-----Original Message-----
From: Frank Fock [mailto:fock at agentpp.com] 
Sent: Thursday, March 23, 2006 3:57 PM
To: Prusi, Jesse R
Cc: snmp4j at agentpp.org
Subject: Re: [SNMP4J] AgenPro Scalar Class Generation

Hello,

By default the inner classes for scalars are created only if the scalar
is writable. If you want to let AgentPro create them even for read-only
scalars, you need to change the java_code.vm template. For example
replace

#if( $agenUtils.isWritable($leaf) )

by

#if( $leaf )

Hope this helps.

Best regards,
Frank

Prusi, Jesse R wrote:
> Hello,
> 
> I am using the snmp4j_by_selection.prj project template in AgenPro to 
> generate SNMP4J-Agent code for my custom MIB.  The generated code 
> includes an inner class which extends MOScalar for the first scalar 
> defined in my MIB.  However, there are no inner classes generated for 
> any of the other scalars.  Do I need to modify the selection template 
> so that the inner classes are generated for all scalars?  How is this
done?
> 
> Thanks,
> Jesse Prusi
> 
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

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






More information about the SNMP4J mailing list