> My guess is that xxxxxx_get_first_data_point should return the 
> objectID (in the netsnmp_variable_list) of the first element table 
> element (1 (column),1 (row)) for a 2 dimensional table and that given 
> a object id in the "netsnmp_variable_list * put_index_data",
> xxxxxx_get_next_data_point(....) should return the object id of the 
> next element (for example passing in the oid (1 (column),1 (row)) 
> should possibly return the oid (1 (column),2 (row)).

Good guess, but not quite right.

These two routines are just concerned with determining the appropriate
*row* to use.  They're not interested in columns at all.
The 'get_first' routine should return some sort of pointer to the first
row of the table (and will only be called once). The 'get_next' routine
should take this pointer, and return the equivalent pointer for the next
row.  This will be called repeatedly until the agent
has walked through the full table.   At which point, the internal
iterator helper will decide which was the correct row, and call the
handler routine.  See my response to Emmanuel for a slightly fuller
description of this.

In my case the table data does not actually exist in a table.  All the
snmpget/getnext requests result in calls to external entities (usually
via CORBA to a CORBA Server or via Pro-C to an Oracle Database).  In
this situation, I would think the concept of returning a pointer to the
first row or to the next row is meaningless.   A get to (column 1, row
1) might result in a corba request  "getTemperatureOfLeadingEdge(....)",
where a get to  (column 1, row 2) might result in a corba request
"getTemperatureOfTrailingEdge(...)"  

My intention is that in the xxx_handler, the "switch
(table_info->colnum)" will use the colnum and the row to determine which
corba/pro-c method to call to get the data:

switch (table_info->colnum){ 
    case COLUMN_TEMPERATURES:
      switch(rowNumber){
        case 1:
          getTemperatureOfLeadingEdge(....)
        case 2:
          getTemperatureOfTrailingEdge(....)

In this case where do I get the rowNumber? Is it
table_info->oid[index_oid_len]?



-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id5hix
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to