Dart.Snmp Namespace > Trap2Message Class > Trap2Message Constructor : Trap2Message Constructor(String,String,Int64) |
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)
Exception | Description |
---|---|
System.OverflowException | sysUpTime is less than UInt32.MinValue or greater than UInt32.MaxValue. |
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.