On Thu, 2005-04-21 at 11:31, Gemma Sánchez wrote:
> Dave's response has disorientated me in some way.

<grin>
Yes, I'm good at doing that!
Now if you'll just sit on this swivel chair and close
your eyes, we'll proceed to the next stage.....   :-)


>                                     Until now, when I had 
> to define a subhandler to give a special behaviour to the
> column of a table, I used to define global variables that
> contain the values assigned to the MIB columns

That's fair enough.
The agent isn't a magic box (however much it may feel
like one at times), and *something* has to keep track
of the various values.  Whether this is a series of
parallel arrays (as in your code), or a list of per-row
data structures, or whatever - there has to be something
that holds the values for each row, and each column.


But remember that we've been talking about the 'dataset'
helper.   The distinguishing feature of this particular
is that it's the *agent* (or strictly, the dataset helper)
that looks after holding all the table data.  The MIB
coder doesn't need to deal with this at all.

With some of the other helpers (e.g table_data/table_container),
the user will define a suitable data structure to hold one
row of the table, and the helper looks after holding the
table as a collection of such rows.  But the user still has
to deal with the whole of a row.

The dataset helper takes this a stage further, and looks
after each row as a collection of columns.



It's like having an assistant that sorts through your mail
first thing in the morning, throwing away all the junk and
sifting out the ones that are actually relevant.
  The table_data (and table_container) helpers will give you
each such letter to answer.  The table_dataset helper will
draft the response as well - all you have to do is sign it.


Neither approach is more *right* than the other - it all
depends on how much you can delegate to your assistant (/helper).

Dave



-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to