PowerSNMP for .NET CF
InformMessage Class
Members  Example  See Also  Send comments on this topic.
Dart.Snmp Namespace : InformMessage Class




The InformMessage class is used to send information between SNMP version 2/ 3 managers.

Object Model

InformMessage ClassSegment ClassVariableCollection ClassVariable Class

Syntax

Visual Basic (Declaration) 
Public Class InformMessage 
   Inherits RequestMessage
Visual Basic (Usage)Copy Code
Dim instance As InformMessage
C# 
public class InformMessage : RequestMessage 
Managed Extensions for C++ 
public __gc class InformMessage : public RequestMessage 
C++/CLI 
public ref class InformMessage : public RequestMessage 

Example

The following example demonstrates sending an inform message.
C#Copy Code
private void button1_Click(object sender, EventArgs e)
{
  //Send an Inform request on a worker thread
  manager1.Start(sendInformRequest, null);
}

private void sendInformRequest(ManagerSlave slave, object state)
{
  //Create an inform message and send it to a manager
  InformMessage inform = new InformMessage();
  inform.Version = SnmpVersion.Two;

  //The inform includes this manager's uptime
  inform.Variables.Add(manager1.Mib.CreateVariable(NodeName.sysUpTime, manager1.AuthoritativeEngine.Time.ToString()));
  slave.GetResponse(inform, myManagerAddress, 162);
}
Visual BasicCopy Code
Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles button1.Click
  'Send an Inform request on a worker thread
  manager1.Start(AddressOf sendInformRequest, Nothing)
End Sub

Private Sub sendInformRequest(ByVal slave As ManagerSlave, ByVal state As Object)
  'Create an inform message and send it to a manager
  Dim inform As InformMessage = New InformMessage()
  inform.Version = SnmpVersion.Two

  'The inform includes this manager's uptime
  inform.Variables.Add(manager1.Mib.CreateVariable(NodeName.sysUpTime, manager1.AuthoritativeEngine.Time.ToString()))
  slave.GetResponse(inform, myManagerAddress, 162)
End Sub

Remarks

This message is used to send variables from one manager to another. A ResponseMessage containing the same variables is used to acknowledge the receipt of the information.

Inheritance Hierarchy

System.Object
   Dart.Snmp.MessageBase
      Dart.Snmp.StandardMessage
         Dart.Snmp.RequestMessage
            Dart.Snmp.InformMessage

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 4.2
© 2010 Dart Communications. All Rights Reserved.