[AGENT++] A few questions on shared tables

Frank Fock fock at agentpp.com
Fri Apr 20 21:35:38 CEST 2007


Hi Mike,

You can create a single subclass of the generated AgentXSharedTable
that serves for all sub-agents. Since the row_added method provides
the index OID of the registered row, you can use that information
to fetch the values from an internal cache that has been filled
from the previously by calling a method of your subclass.

Hope this helps.

Best regards,
Frank

michael.carr at bt.com wrote:
> Hi all,
> 
> I've used MIB Designer to create a simple table, then used AgenPro 2 to
> generate some subagent code.
> 
> I assume that the agent.cpp file located in the
> agentX++\agen\subagent\src is skeleton subagent code and so should be
> used with the code generated by AgenPro2, is this correct?
> 
> Similarly, the agent.cpp file located in the agentX++\agen\master\src is
> skeleton master code?
> 
> On page 28 of the AgentX document it says that for shared tables the
> 'row_added' method has to be overridden in order to set (or initialise)
> the values of the new row.  Since I'll be running several subagents that
> register a single row in my shared table, they will be using different
> data in their rows.  Given what the document says, it would mean that I
> would have to override the function for each subagent which would lead
> me down the route of deriving a new class for each subagent based on the
> class generated by AgenPro 2 for my table, which seems a bit overkill.
> Is that correct or is there another way it should be done?
> 
> Once the row has been added to the table, one or two of the values it
> contains (the columns?) may change within the subagent.  How do I
> actually change those values?  (Some simple example code would be
> appreciated :-)
> 
> Cheers,
> Mike
> 
> 
> _______________________________________________
> AGENTPP mailing list
> AGENTPP at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/agentpp

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the AGENTPP mailing list