PowerSNMP for .NET
Trap2Message Constructor(String,String,Int64)




The Oid that identifies the trap.
A description of the notification provided by the source MIB.
System uptime, usually taken from Agent.SysUpTime. An Int64 is used because UInt32 is not CLS-compliant.
Initializes a new instance of the Trap2Message class.
Syntax
Public Function New( _
   ByVal oid As String, _
   ByVal description As String, _
   ByVal sysUpTime As Long _
)
Dim oid As String
Dim description As String
Dim sysUpTime As Long
 
Dim instance As New Trap2Message(oid, description, sysUpTime)
public Trap2Message( 
   string oid,
   string description,
   long sysUpTime
)
public: Trap2Message( 
   string* oid,
   string* description,
   long sysUpTime
)
public:
Trap2Message( 
   String^ oid,
   String^ description,
   int64 sysUpTime
)

Parameters

oid
The Oid that identifies the trap.
description
A description of the notification provided by the source MIB.
sysUpTime
System uptime, usually taken from Agent.SysUpTime. An Int64 is used because UInt32 is not CLS-compliant.
Exceptions
ExceptionDescription
System.OverflowExceptionsysUpTime is less than UInt32.MinValue or greater than UInt32.MaxValue.
Remarks

This constructor will create a version 2 message. When the message is encoded the first variable is an instance of a sysUpTime Variable (with the value initialized to MessageBase.SysUpTime) and the second variable is an instance of an snmpTrapOID Variable with the parameter oid as its value.

sysUpTime and snmpTrapOID are exposed as properties, and are not presented in MessageBase.Variables. Additional variables can be included as variables accessed through MessageBase.Variables.

See Also

Reference

Trap2Message Class
Trap2Message Members
Overload List

6.1.1.2
PowerSNMP for .NET Documentation Version 7.0
© 2023 Dart Communications. All Rights Reserved.
Send comments on this topic