[AGENT++] AgenPro merging capability.

Adluru, Krishna-p6018c (Perm Res) Krishna.Adluru at gdc4s.com
Thu May 15 17:56:20 CEST 2008


 Frank,
      It was unchecked and I tried again. The same issue persists.
Its a fully licensed software.

Thanks,
Krishna V

-----Original Message-----
From: Frank Fock [mailto:fock at snmp4j.org]
Sent: Wednesday, May 14, 2008 2:16 PM
To: Adluru, Krishna-p6018c (Perm Res)
Cc: agentpp at agentpp.org
Subject: Re: [AGENT++] AgenPro merging capability.

Krishna,

The errors are not relevant here (these are errors caused by a Velocity
bug which can be ignored).

If the input file is at the proper place the merge is successful. It
works for me however.

Have you unchecked the "Do not merge..."  option in step 1 of the
project wizard?

Best regards,
Frank

Adluru, Krishna-p6018c (Perm Res) wrote:
> Frank,
>    You are right. The merge does not work at all. I have the input 
> directory set correctly.
>
> I have a file called "MgmtMib.java" in c:\snmp and set the input 
> directory to : C:\snmp and output as : "..\snmp4j\src"
>
> I see that the file is loaded as per the logs :
>
> 2008-05-14 12:53:31:168 DEBUG Generator 	Using INPUT  filename:
> C:\snmp\MgmtMib.java
> 2008-05-14 12:53:31:168 DEBUG Generator 	Using OUTPUT filename:
> ..\snmp4j\src\MgmtMib.java
>
> and then the following errors follow:
>
> 2008-05-14 12:53:31:308 ERROR Velocity 	Left side
($method.length()) of
> '>' operation has null value. Operation not possible.
> templates\snmp4j-agent_1_2\java_code.vm [line 2, column 38]
> 2008-05-14 12:53:31:308 ERROR Velocity 	Left side
($method.length()) of
> '>' operation has null value. Operation not possible.
> templates\snmp4j-agent_1_2\java_code.vm [line 10, column 36]
>
> Thanks,
> Krishna V
>
> -----Original Message-----
> From: Frank Fock [mailto:fock at agentpp.com]
> Sent: Wednesday, May 14, 2008 1:25 PM
> To: Adluru, Krishna-p6018c (Perm Res)
> Cc: agentpp at agentpp.org
> Subject: Re: [AGENT++] AgenPro merging capability.
>
> The merge does not seem work at all.
> Have you checked that the input directory in the code generation 
> project is set properly?
>
> Is there any code merged into the new version?
>
> Best regards,
> Frank
>
> Adluru, Krishna-p6018c (Perm Res) wrote:
>   
>> Frank,
>>      Appreciate your help. Here is the section:
>>
>> Old Code :
>> ---------
>>
>>  public class EtiTLE extends MOScalar
>>    {
>>       EtiTLE(OID oid, MOAccess access)
>>       {
>>          super(oid, access, new OctetString());
>>          // --AgentGen BEGIN=etiTLE
>>          // --AgentGen END
>>       }
>>
>>       @Override
>>       public int setValue(Variable newValue)
>>       {
>>          // --AgentGen BEGIN=etiTLE::setValue
>>          VariableBinding [] vbs = new VariableBinding [1];
>>          vbs[0] = new VariableBinding(getID(), newValue);
>>          SnmpMessage msg = new
>> SnmpMessage(ConnectionEventTypes.SNMP_VALUE_CHANGED, vbs);
>>          sendAsyncInternalEvent(msg);
>>          // --AgentGen END
>>          return super.setValue(newValue);
>>       }
>>
>>       // --AgentGen BEGIN=etiTLE::_METHODS
>>       // --AgentGen END
>>
>>    }
>>
>>
>>
>>
>>
>> Merged Code:
>> ------------
>>
>>
>>   public class EtiTLE extends MOScalar {
>>     EtiTLE(OID oid, MOAccess access) {
>>       super(oid, access, new OctetString()); //--AgentGen 
>> BEGIN=etiTLE
>>     
>
>   
>> //--AgentGen END
>>     }
>>
>>     public int isValueOK(SubRequest request) {
>>       Variable newValue =
>>         request.getVariableBinding().getVariable();
>>       int valueOK = super.isValueOK(request);
>>       if (valueOK != SnmpConstants.SNMP_ERROR_SUCCESS) {
>>       	return valueOK;
>>       }
>>       OctetString os = (OctetString)newValue;
>>       if (!(((os.length() >= 0) && (os.length() <= 255)))) {
>>         valueOK = SnmpConstants.SNMP_ERROR_WRONG_LENGTH;
>>       }
>>      //--AgentGen BEGIN=etiTLE::isValueOK
>>      //--AgentGen END
>>       return valueOK; 
>>     }
>>
>>     public Variable getValue() {
>>      //--AgentGen BEGIN=etiTLE::getValue
>>      //--AgentGen END
>>       return super.getValue();    
>>     }
>>
>>     public int setValue(Variable newValue) {
>>      //--AgentGen BEGIN=etiTLE::setValue
>>      //--AgentGen END
>>       return super.setValue(newValue);    
>>     }
>>
>>      //--AgentGen BEGIN=etiTLE::_METHODS
>>      //--AgentGen END
>>
>>   }
>>
>> Thanks,
>> Krishna V
>>
>> -----Original Message-----
>> From: Frank Fock [mailto:fock at agentpp.com]
>> Sent: Wednesday, May 14, 2008 10:55 AM
>> To: Adluru, Krishna-p6018c (Perm Res)
>> Cc: agentpp at agentpp.org
>> Subject: Re: [AGENT++] AgenPro merging capability.
>>
>> Hi Krishna,
>>
>> The error message could be indicating that the tag signature used in 
>> the source is somehow invalid.
>>
>> Can be provide the tagged user code section that is in the source and

>> the corresponding section from the merged file?
>>
>> Best regards,
>> Frank
>>
>> Adluru, Krishna-p6018c (Perm Res) wrote:
>>     
>>> Hi,
>>>   I have 'customized' generated code which I would like to merge 
>>> with
>>>       
>
>   
>>> the 'generated' code from updated MIB.
>>> But, the capability does not work.
>>>
>>> Any help would be appreciated. Here is what I see in the logs:
>>>
>>> 2008-05-14 10:31:31:184 ERROR Velocity 	Left side
>>>       
>> ($method.length()) of
>>     
>>> '>' operation has null value. Operation not possible.
>>> templates\snmp4j-agent_1_2\java_code.vm [line 10, column 36]
>>> 2008-05-14 10:31:31:184 ERROR Velocity 	Left side
>>>       
>> ($method.length()) of
>>     
>>> '>' operation has null value. Operation not possible.
>>> templates\snmp4j-agent_1_2\java_code.vm [line 2, column 38]
>>>
>>> Thanks,
>>> Krishna
>>>
>>> -----Original Message-----
>>> From: agentpp-bounces at agentpp.org
>>> [mailto:agentpp-bounces at agentpp.org]
>>> On Behalf Of Frank Fock
>>> Sent: Monday, May 05, 2008 1:38 PM
>>> To: Saleem Ahmed Khan
>>> Cc: agentpp at agentpp.org
>>> Subject: Re: [AGENT++] Traps Generic and Specific Type values
>>>
>>> Hi Saleem,
>>>
>>> in SNMPv2c/v3 there are no "specific and enterprise trap types".
>>> Instead, there are notification IDs.
>>>
>>> Best regards,
>>> Frank
>>>
>>> Saleem Ahmed Khan wrote:
>>>       
>>>> Hi,
>>>>
>>>> The version used is SNMP++ V3.2.
>>>>
>>>> I am currently facing a problem extracting the generic and specific

>>>> trap type values from the trap messages of Enterprise type. Since 
>>>> in
>>>>         
>
>   
>>>> the snmpv1 type traps there is generic and specific fields are part

>>>> of the messages, this is being handled, but do need info how to do 
>>>> I
>>>>         
>
>   
>>>> get
>>>>         
>>>> these values for
>>>> snmpv2 traps, since there are no fields for this in the trap
>>>>         
>> messages.
>>     
>>>> Is there any Api supported by the SNMPv3 that would give me the 
>>>> generic and specific trap values. This is very much required since 
>>>> I
>>>>         
>
>   
>>>> am maintaing the table based on these values.
>>>> Regards
>>>> Saleem
>>>> _______________________________________________
>>>> AGENTPP mailing list
>>>> AGENTPP at agentpp.org
>>>> http://lists.agentpp.org/mailman/listinfo/agentpp
>>>>         
>
>   




More information about the AGENTPP mailing list