Integrating agenPro generated code with agent++

Henning Eggers henning.eggers____plath.de
Thu Apr 17 09:20:29 CEST 2003


----- Original Message -----
> All you need to integrate your generated code
> with AGENT++ is to generate or copy it into
> the agent++/agentgen/agent/["src"|"include"]
> directories and run "make -f Makefile.<system>"

If you are not developing on Linux or Solaris or if you just want to know a
little more about the internals:
1. Take one of the sample-agents (like static_table) and find the "void
init(Mib& mib)" function definitions.
2. Your generated code should contain a top-level class for your mib called
"quantumbeam_mlink_mib" or whatever your MIB module is called. This class
has a constructor (of course ;-).
3. Chose a place in the "init" function to add you mib, probably right after
the other "add" calls. You might want to comment out the calls that add the
StaticTable example mibs...
4. Put your add call in there, something like:
mib.add( new quantumbeam_mlink_mib(...) );
I do not remember if there where any parameters to the constructor.
5. Place your generated .cpp and .h files into the soure directory with
agent.cpp and add them to the project.
6. Of course, you will have to fill the generated files with useful code to
actually get the agent to report what you want it to report. Have a look at
the "get_request" and "set" methods for starters.
7. Compile and run.

That's a micro-HowTo ... ;-)

Cheers,
Henning





More information about the AGENTPP mailing list