Visual Basic (Declaration) | |
---|---|
Public Function New( _ ByVal genericTrap As Integer, _ ByVal specificTrap As Integer, _ ByVal enterprise As String _ ) |
Visual Basic (Usage) | ![]() |
---|---|
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.
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.
Target Platforms: Microsoft .NET Framework 2.0