TraceChannel.SendMessage Method
This method sends a message to the channel.
Namespace:
IntervalZero.MaxRT.Libraries.DebugMessage
Assembly:
IntervalZero.MaxRT.Libraries (in IntervalZero.MaxRT.Libraries.dll) Version: 1.0.0.0 (File version: 1.0.1)
Syntax
public void SendMessage(
uint ApplicationInstance,
uint MessageType,
uint MessageFormat,
uint Source,
uint SourceIndex,
string Text,
byte[] Data
)
Parameters
ApplicationInstance
Type: UInt32
The instance of the application in case it supports multiple instances.
MessageType
Type: UInt32
The message type. You can define the message types and corresponding data structures using the Channel Editor in the Message Viewer. This enables the console to parse the messages. This value is between 0 and 31.
MessageFormat
Type: UInt32
The message sub-type. You can define the message sub-types and corresponding data structures using the Channel Editor in the Message Viewer. This enables the console to parse the messages.
Source
Type: UInt32
The type of the source that sends the message. You can define the source types and their corresponding display text using the Channel Editor in the Message Viewer. This enables the console to parse the messages. This value is between 0 and 31.
SourceIndex
Type: UInt32
The index of the source that sends the message.
Text
Type: String
The text of the message.
Data
Type: Byte[]
The buffer with the data to be copied.
Return Value
Type: void
InvalidOperationException is thrown when the channel is not open.
ArgumentNullException is thrown when parameter Text is null.
MaxRTNativeException is thrown when these errors occur:
| Error code | Meaning |
|---|---|
|
ERROR_INVALID_PARAMETER |
One of the following conditions occurred:
|
|
ERROR_NOT_ENOUGH_MEMORY |
The message buffer is full. |
|
ERROR_ABANDONED_WAIT_0 |
Failed to acquire the synchronization lock for the channel. |
See Also: