Files | |
file | skinmon.h |
This header file defines functions for outputting messages from the skin. | |
Enumerations | |
enum | { MON_DEBUG_ASSERT = MON_CLASS_DEBUG + (3 << MON_SHIFT_SUBCLASS) } |
Sub-class of debug information for HQASSERT(). More... | |
Functions | |
void | SwLeSetMonitorFunction (SwLeMONITORCALLBACK *pfnMonitor) |
Set the default monitor information callback function for the SDK. More... | |
void | SkinMonitorl (int32 cbData, const uint8 *pszMonitorData) |
Display a message through the monitor callback, if provided. More... | |
void | RIPMonitorl (int32 cbData, const uint8 *pszMonitorData) |
Display a message through the monitor callback, if provided. More... | |
void | SkinMonitorf (const char *format,...) |
Display a formatted message through monitor events, or the monitor callback, if provided. More... | |
void | SkinEMonitorf (sw_tl_ref tl, sw_mon_channel channel, sw_mon_type type, const char *format,...) |
Display a formatted message through the event system. More... | |
void | SkinVEMonitorf (sw_tl_ref tl, sw_mon_channel channel, sw_mon_type type, const char *format, va_list vlist) |
Similar to SkinEMonitorf(), but with an explicit vararg list. More... | |
There are two routes for monitor information to be supplied to the skin:
%monitor%
device, which in turn uses the monitor function callbacks to output the message.anonymous enum |
Sub-class of debug information for HQASSERT().
Enumerator | |
---|---|
MON_DEBUG_ASSERT | Any message with class MON_CLASS_DEBUG and this subclass is routed directly to the monitor callback, and not through events. |
Display a message through the monitor callback, if provided.
cbData | The length, in bytes, of a monitor information string. |
pszMonitorData | The monitor information string. |
If the RIP is running, this function will output through the monitor function passed to SwLeStart(). If a NULL
monitor function was passed to SwLeStart(), then it uses the default monitor function installed by SwLeSetMonitorFunction().
void SkinEMonitorf | ( | sw_tl_ref | tl, |
sw_mon_channel | channel, | ||
sw_mon_type | type, | ||
const char * | format, | ||
... | |||
) |
Display a formatted message through the event system.
[in] | tl | A timeline associated with this message. The SkinTimeline() call can be used to supply the top-level skin timeline, if no other suitable timeline is available. It acceptable abbreviation to use 0 for the timeline reference: this is an invalid timeline reference which will be changed to SkinTimeline() by default. |
[in] | channel | A monitor channel to output the message to. |
[in] | type | A combined UID, message class, and error ID. See the file monevent.h for definitions of the type field. |
[in] | format | A swcopyf() format string. |
[in] | ... | A variable number of arguments, according to the format specification. |
If the event system is not started, this call will fall back to the monitor callback, if provided.
The semantics are similar to printf()
or fprintf()
, but with output sent to the event channel provided, with the timeline and type specified. This channel will usually be routed to the monitor callback.
Messages are formatted into a fixed-size buffer. The message will be truncated if it does not fit into the buffer. If this happens, an additional message will be sent to the monitor callback, warning about the truncation.
If no monitor callback has been supplied, this function does nothing.
void SkinMonitorf | ( | const char * | format, |
... | |||
) |
Display a formatted message through monitor events, or the monitor callback, if provided.
[in] | format | A swcopyf() format string. |
[in] | ... | A variable number of arguments, according to the format specification. |
This function calls SkinVEMonitorf() with an invalid timeline, channel MON_CHANNEL_STDOUT, and type MON_CLASS_INFO.
Display a message through the monitor callback, if provided.
cbData | The length, in bytes, of a monitor information string. |
pszMonitorData | The monitor information string. |
This function only outputs through the default monitor function installed by SwLeSetMonitorFunction().
void SkinVEMonitorf | ( | sw_tl_ref | tl, |
sw_mon_channel | channel, | ||
sw_mon_type | type, | ||
const char * | format, | ||
va_list | vlist | ||
) |
Similar to SkinEMonitorf(), but with an explicit vararg list.
[in] | tl | A timeline associated with this message. The SkinTimeline() call can be used to supply the top-level skin timeline, if no other suitable timeline is available. |
[in] | channel | A monitor channel to output the message to. |
[in] | type | A combined UID, message class, and error ID. See the file monevent.h for definitions of the type field. |
[in] | format | A swcopyf() format string. |
[in] | vlist | A variable argument list, according to the format specification. |
void SwLeSetMonitorFunction | ( | SwLeMONITORCALLBACK * | pfnMonitor | ) |
Set the default monitor information callback function for the SDK.
[in] | pfnMonitor | A pointer to a monitor callback function which the skin must implement if it wishes to receive monitor information from the SDK. The callback function should be thread-safe. |
Setting a default callback function allows the skin to receive monitor information provided by the SDK while the RIP is not running. If the RIP is running (i.e., between SwLeStart() and SwLeStop() calls), then monitor information will be sent to the callback function supplied to the RIP, or to this function if the SwLeStart() monitor function parameter was NULL
.
All monitor information from the SDK is routed through the RIP's monitor function (if running) or this function (if no RIP running).
This function must be called after SwLeInitRuntime().