Login  
Search All Forums
Dart Home | PowerSNMP for ActiveX | Custom Development Reply | PowerSNMP for ActiveX Topics | Forums   
AuthorForum: PowerSNMP for ActiveX
Topic: changing community
shon

From: haifa, ID Israel
Posts: 3
Member Since: 01/24/06
posted September 1, 2010 2:49 AM

hello,

i'm writing an agent application using power SNMP active X.
the manager i'm talking to is using the get commands as public and the set commands as private.

how can i change my code to set the different community to the two commands types?
using auto=true, set both of them to public.
(that way the set commands aren't working).

Thanks in advance
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted September 1, 2010 1:19 PM

Hi,
Even when Auto is true, the Response event will fire, providing access to the response message to be sent.
You can change the Community at this time.

Hope it helps,
-ken

------
-Non-current subscribers must contact sales@dart.com to update subscription and receive continued support as needed.
------

shon

From: haifa, ID Israel
Posts: 3
Member Since: 01/24/06
posted September 2, 2010 7:34 AM

Hello,

Thanks for all the help.
my problem is that after i changed my code to:
Pagent->Message->Reset();
Pagent->Community="private";

the get commands aren't working any more (they only work in public community).

if i leave just auto=true, the set commands aren't working, only the get commands are working correctly.
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted September 2, 2010 9:20 AM

Hi,
Let me provide a better answer.

Option 1:
You could set Auto to false, giving you full control over handling and responding.
If you do, you will have to check the request and then create and send the appropriate response message in the Request event handler.

Option 2:
If you keep Auto true, you could try setting the Agent.Community property with each request.
When the Request event fires, check the type of message, and set Community appropriately.
The auto handling takes place after the event, so when it is checked, Community will be "private" for Sets.
This way you should not have to alter the message in the Response event handler.

Hope this works for you,
-ken

------
-Non-current subscribers must contact sales@dart.com to update subscription and receive continued support as needed.
------

Reply | PowerSNMP for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX