[AGENT++] Nice to meet you, all.
wancheng82
wancheng82 at gmail.com
Tue Jan 12 01:53:21 CET 2010
Sorry for my unclear description.
Thank you for telling me the info:
>On the agent side you use agent++. agent++ receives the request of the
>manager and the request goes through agent++ until (for snmp get
>requests) the MibLeaf::get_request() function is called. You can
>override this function to get the value through whatever desired
>mechanism (e.g. contact a database).
But I still have a question, look this pseudo-code:
class A : public MibLeaf
{
public:
get_request();
get_request_callback(Response);
};
MibLeaf::get_request()
{
/* send msg to MSTP protocol process, to get the runtime info from
MSTP process.
It just send the request, and we will get the info from MSTP by
get_request_callback() */
send_to_mstp_process(SendToMsg, get_request_callback);
}
get_request_callback(Response)
{
//The info from MSTP is in Response
}
Because I should get info from different process, and it is by
asynchronized I/O(my system is using asynchronized I/O to do the IPC, and I should follow this rule).
The question is:
When leaving MibLeaf::get_request() member function, I still not get the info I want, how should I resolve this question?
Thank you.
Robin
2010-01-12
wancheng82
发件人: Jochen Katz
发送时间: 2010-01-12 05:00:25
收件人: agentpp
抄送:
主题: Re: [AGENT++] Nice to meet you, all.
Hi,
either you are mixing agent and manager functionality or I just don't
understand your question.
For the manager you only use snmp++ and there you can use async requests
(Snmp::get() with callback param) and your callback is called with the
response of the agent.
On the agent side you use agent++. agent++ receives the request of the
manager and the request goes through agent++ until (for snmp get
requests) the MibLeaf::get_request() function is called. You can
override this function to get the value through whatever desired
mechanism (e.g. contact a database).
Regards,
Jochen
Am 11.01.2010 11:04, schrieb wancheng82:
> All,
> Nice to meet you.
> I want to integrate agent++ to our system.
> But our system is architected on asynchronized I/O, and it is a multi-process system.
> That means if I want to gather info from other process, the steps are
> 1)SNMP agent send an TCP packet to other process (we use TCP and 127.0.0.1 to do the IPC), and register
> callback function
> 2)If SNMP agent receives the corresponding response, the callback function will be called.
>
> I am new to agent++.
> Is it easy to implement based on libsnmp++ & libagent++?
>
> Thank you.
>
> Robin
>
>
>
> 2010-01-11
>
>
>
> wancheng82
> _______________________________________________
> AGENTPP mailing list
> AGENTPP at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/agentpp
>
_______________________________________________
AGENTPP mailing list
AGENTPP at agentpp.org
http://lists.agentpp.org/mailman/listinfo/agentpp
More information about the AGENTPP
mailing list