RtdbgSendMessageIsr

RtdbgSendMessageIsr sends a Standard or Trace message from an Interrupt Service Routine (ISR).

Syntax

Copy
DWORD RtdbgSendMessageIsr(
  [in]    RTDBG_CHANNEL Channel,
  [in]    ULONG ApplicationInstance,
  [in]    ULONG MessageType,
  [in]    ULONG MessageFormat,
  [in]    ULONG Source,
  [in]    ULONG SourceIndex,
  [in]    wchar_t* pText,
  [in]    ULONG DataLength,
  [in]    byte* pData,
  [in]    ULONG SpinCount
);

Parameters

[in] Channel

The handle of the channel to get the message from.

[in] ApplicationInstance

The instance of the application in case it supports multiple instances.

[in] MessageType

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.

[in] MessageFormat

The message format. You can define the message format and corresponding data structures using the Channel Editor in the Message Viewer. This enables the console to parse the messages.

[in] Source

The source type 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.

[in] SourceIndex

The index of the source that sends the message.

[in] pText

The text of the message. You can insert data values into messages using .NET's string.Format rules for standard channels. See Format String.

[in] DataLength

The length of the data to be copied.

[in] pData

The buffer with the data to be copied. To ensure correct parsing by the Message Viewer, ensure the data aligns with the message format's data entries.

[in] SpinCount

The number of times the function should retry acquiring the channel lock before failing.

Remarks

RtdbgSendMessageIsr is only available for real-time interfaces.

This API is for sending a Standard or Trace message channel. To send the Basic message channel, use RtdbgSendBasicMessageIsr.

The RtdbgSendMessageIsr function is deterministic.

Return Values

Error code Meaning

ERROR_SUCCESS

The function succeeded.

ERROR_DISCARDED

The message is skipped by one of the message filters.

ERROR_INVALID_HANDLE

Parameter Channel has been closed or is invalid.

ERROR_INVALID_PARAMETER

One of the following conditions occurred:

  • The value of parameter Channel is NULL.
  • The value of parameter MessageType is outside the acceptable range (0-31).
  • The value of parameter Source is outside the acceptable range (0-31).
  • The value of parameter DataLength is above 0 and pData is NULL.

ERROR_ABANDONED_WAIT_0

Failed to acquire the channel synchronization lock.

ERROR_NOT_ENOUGH_MEMORY

The message buffer is full.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

RtdbgApi.h

RtdbgApi.lib (RTSS)

See Also: