how to aggregate values for all columns in a table row
Frank Fock
Frank.Fock____t-online.de
Tue Aug 27 22:57:55 CEST 2002
Hi Dave,
I would recommend subclassing MibTable and overwriting
MibTable::update to populate the rows in the table from
your backing storage and at least
MibTable::commit_set_request. In that method you will
first call the super class' commit_set_request and then
you will check if you have processed the last subrequest
(of the SET request) related to the table. Then you can
encode/send the whole row to the backend server.
Hope this helps.
Best regards,
Frank
Dave Mason wrote:
> Hi,
> If anyone has a lot of experience with tables, I could use a bit of
> advice. Our system currently only has scalar data in the MIBs. The
> agent exhanges data with the backend server on a per-object basis. That
> is, each object is individually linked to another object in the backend.
> We are now considering the addition of tabular data to a MIB. To avoid
> adding a new interface to the backend to index into a table, I would
> like to aggregate all the object values of a row into one OCTET STRING
> and pass that to the backend. Each row could be treated as an
> individual object, and only the affected routine in the server would
> need to parse out the columnar values.
>
> My question - is there a "hook" or place in the agent++ classes where I
> can grab a whole row at once? If the manager does a Set, I need to set
> the columnar objects as before, but before I exit I need to gather all
> the columnar values, concatenate them into one octet string, and pass
> that to the backend. Likewise, for a Get, I need to read the row object
> from the server, parse and insert the values into the columnar objects,
> then process as usual. I implemented our existing scalars with a
> subclass of MibLeaf that interacts with the server. Maybe I can
> subclass MibTableRow? Even if I can, I'm not sure how I would have the
> toolkit use that class.
>
> Thanks in advance for any suggestions,
> Dave
>
>
>
More information about the AGENTPP
mailing list