Portability, Application interface to output debug messages – Rockwell Automation 6182 SDK User Manual
Page 97

RAC6182-Specific Extensions to the CE API
4–57
Publication 6182-UM002B-EN-P
Macro
Description
IOCTL_SERIAL_GET
_CABLE_STATUS
Do not use. Not supported on RAC6182.
Portability
The arguments to this function are specific to the RAC6182 hardware
The RAC6182 provides support for an external debug monitor connected
at the second serial port (COM2). Normally, the second serial port is
configured as a standard communications port; in this case, it does not
handle system debug messages, which, if generated, are discarded.
However, this port can be specially set up to pass system debug
messages to an external device; in this case, the second serial port
becomes unavailable to applications for normal communications use.
Details for the setup of the port are given in an appendix to this manual.
A debug monitor can be very useful for Windows CE operating system
developers, since it can capture debug messages emitted by the operating
system by way of a serial port, even before all Windows CE services,
including display services, are operational.
Application developers can also make use of these facilities, provided
their programs written to produce debug output via the NKDbgPrintfW()
function described below. However, since the use of an external debug
monitor requires a special configuration of the RAC6182, it is
recommended that the use of external debug output be limited to logging
fatal or unusual error conditions. If an application developer believes a
fatal error is occurring, the RAC6182 can be set up to pass error
messages that might allow him or her to diagnose the problem more
easily.
When debug mode is enabled, applications should not open COM2 or
they will interfere with debug output messages. When debug mode is
not enabled, all debug output is silently ignored and COM2 is available
for general application use.
Application Interface to
Output Debug Messages