PowerSNMP for .NET CF
TrapMessage Constructor
See Also  Send comments on this topic.
Dart.Snmp Namespace > TrapMessage Class : TrapMessage Constructor




genericTrap
Indicates the generic trap number to use when building the message.
specificTrap
If genericTrap is 6, then specificTrap indicates more detailed information.
enterprise
A string that initializes the enterprise field.
Initializes a new instance of the TrapMessage class.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal genericTrap As Integer, _
   ByVal specificTrap As Integer, _
   ByVal enterprise As String _
)
Visual Basic (Usage)Copy Code
Dim genericTrap As Integer
Dim specificTrap As Integer
Dim enterprise As String
 
Dim instance As New TrapMessage(genericTrap, specificTrap, enterprise)
C# 
public TrapMessage( 
   int genericTrap,
   int specificTrap,
   string enterprise
)
Managed Extensions for C++ 
public: TrapMessage( 
   int genericTrap,
   int specificTrap,
   string* enterprise
)
C++/CLI 
public:
TrapMessage( 
   int genericTrap,
   int specificTrap,
   String^ enterprise
)

Parameters

genericTrap
Indicates the generic trap number to use when building the message.
specificTrap
If genericTrap is 6, then specificTrap indicates more detailed information.
enterprise
A string that initializes the enterprise field.

Remarks

This constructor will create an empty version 1 message. The TrapMessage.SysUpTime property is initialized to 0 and is updated to the value found in MessageBase.SysUpTime when TrapMessage.Encode is used.

The agent initiating the trap should initialize AgentAddress.

The application can add additional information by adding variables to MessageBase.Variables.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

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