No subject

David Duville duville____ipanematech.com
Fri Sep 22 12:31:42 CEST 2000


Hi Franck,

Thank you for your precision upon MIB, I correct it to become a SNMPv2 full compliant MIB ( see attachement ), I succed in parse it, but when I generate mys classes with AgentGen I remark that if in an Entry have MibLeafs of Counter64's type, in the generated method  named set_row  is defined like that :


void ipmMeasureDataEntry::set_row(MibTableRow* r, char* p0, char* p1, char* p2, char* p3, char* p4, char* p5, char* p6, int p7, int p8, int p9
  , int p10, int p11, int p12, int p13, int p14, int p15)
{
 r->get_nth(0)->replace_value(new OctetStr(p0));
 r->get_nth(1)->replace_value(new OctetStr(p1));
 r->get_nth(2)->replace_value(new OctetStr(p2));
 r->get_nth(3)->replace_value(new OctetStr(p3));
 r->get_nth(4)->replace_value(new OctetStr(p4));
 r->get_nth(5)->replace_value(new OctetStr(p5));
 r->get_nth(6)->replace_value(new OctetStr(p6));
 r->get_nth(7)->replace_value(new Counter64(p7));
 r->get_nth(8)->replace_value(new Counter64(p8));
 r->get_nth(9)->replace_value(new Counter64(p9));
 r->get_nth(10)->replace_value(new Counter64(p10));
 r->get_nth(11)->replace_value(new Counter64(p11));
 r->get_nth(12)->replace_value(new Gauge32(p12));
 r->get_nth(13)->replace_value(new Gauge32(p13));
 r->get_nth(14)->replace_value(new Gauge32(p14));
 r->get_nth(15)->replace_value(new SnmpInt32(p15));
}


But that I need is to  put in the new Counter64 the real value of it (the real  64 bits value) , so I need the following constructor for my Counter64 :  new Counter64(p71, p72)) where p71 and p72 are  unsigned long 

My problem is to do it, I need to modify the .h and .cpp generated from my MIB file. like that:

void ipmMeasureDataEntry::set_row(MibTableRow* r, char* p0, char* p1, char* p2, char* p3, char* p4, char* p5, char* p6,
                                  unsigned long  p71,unsigned long  p72, unsigned long  p81, unsigned long  p82,
                                  unsigned long  p91, unsigned long  p92, unsigned long  p101, unsigned long  p102,
                                  unsigned long  p111, unsigned long  p112, int p12, int p13, int p14, int p15)
{
 r->get_nth(0)->replace_value(new OctetStr(p0));
 r->get_nth(1)->replace_value(new OctetStr(p1));
 r->get_nth(2)->replace_value(new OctetStr(p2));
 r->get_nth(3)->replace_value(new OctetStr(p3));
 r->get_nth(4)->replace_value(new OctetStr(p4));
 r->get_nth(5)->replace_value(new OctetStr(p5));
 r->get_nth(6)->replace_value(new OctetStr(p6));
 r->get_nth(7)->replace_value(new Counter64(p71, p72));
 r->get_nth(8)->replace_value(new Counter64(p81, p82));
 r->get_nth(9)->replace_value(new Counter64(p91, p92));
 r->get_nth(10)->replace_value(new Counter64(p101, p102));
 r->get_nth(11)->replace_value(new Counter64(p111, p112));
 r->get_nth(12)->replace_value(new Gauge32(p12));
 r->get_nth(13)->replace_value(new Gauge32(p13));
 r->get_nth(14)->replace_value(new Gauge32(p14));
 r->get_nth(15)->replace_value(new SnmpInt32(p15));
}



My question is : does it exists an other  way put in a Counter64 the real value of it  without modify the .h and .cpp files generated by AgentGen ? Do you have any advise to avoid to modify these files or make any devived class. because it may be totaly impossible i n the case of a great number of entries containing Counter64. 



David.





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.agentpp.org/pipermail/agentpp/attachments/20000922/d424d9ce/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipm_v2.mib
Type: application/octet-stream
Size: 6275 bytes
Desc: not available
Url : http://lists.agentpp.org/pipermail/agentpp/attachments/20000922/d424d9ce/attachment.dll 


More information about the AGENTPP mailing list