PowerSNMP for .NET
Create Method




A Segment containing the encoded SNMP message. Version 1/2/3 is supported.
IPEndPoint that indicates the source of the message. Used to initialize Origin. Can be null.
If creating a response, a reference to Request.Security. Can be null.
The Manager or Agent decoding the message.
Creates an instance of a class derived from MessageBase using the provided buffer.
Syntax
Public Shared Function Create( _
   ByVal encodedMessage As Segment, _
   ByVal origin As IPEndPoint, _
   ByVal requestSecurity As Security, _
   ByVal entity As SnmpBase _
) As MessageBase
Dim encodedMessage As Segment
Dim origin As IPEndPoint
Dim requestSecurity As Security
Dim entity As SnmpBase
Dim value As MessageBase
 
value = MessageBase.Create(encodedMessage, origin, requestSecurity, entity)

Parameters

encodedMessage
A Segment containing the encoded SNMP message. Version 1/2/3 is supported.
origin
IPEndPoint that indicates the source of the message. Used to initialize Origin. Can be null.
requestSecurity
If creating a response, a reference to Request.Security. Can be null.
entity
The Manager or Agent decoding the message.

Return Value

A newly created message.
Exceptions
ExceptionDescription
DecodingExceptionA decoding problem was experienced.
Remarks

The returned object will normally be cast to the appropriate type before use. If a version 3 message cannot be decrypted, a RequestMessage is created and null is returned if PDU values are referenced.

See Also

Reference

MessageBase Class
MessageBase Members


PowerSNMP for .NET Documentation Version 8.0
© 2024 Dart Communications. All Rights Reserved.
Send comments on this topic