| |
Tracing Overview
Debug CCOs from release 1.8.000 onward support significant tracing. The
Common Control Object Debug Runtime ZIP file contains the
debug versions of the CCOs, plus two helper COM objects (RCSTraceOut.exe and
RCSTraceOutPS.dll).
As pre-built, the trace information is written to a file with the name yyyymmdd-OposCCO_DeviceName.log,
where yyyymmdd is the current date and DeviceName is the OPOS
device name. Up to five days of trace information is retained, with days
prior to the current day compressed into a ZIP file. Each day's ZIP file
is named yyyymmdd-OposCCO_DeviceName.zip.
See the
installed file OPOS_CCO_ReadMe_1_xx_xxx.txt for details on
tracing and configuration, including how to specify the directory in which the
trace files are placed.
If you choose to modify and/or rebuild the debug CCOs from the sources, then
you will need to uncomment the line containing
#define
_FILETRACE
in the file DeviceNameImpl.h. The rebuilt
CCO will use simple file I/O for the trace information, rather than the high
performance tracing in the pre-built CCOs. Also, some trace information
will not appear -- specifically that generated by the "DODUMPV"
macro.
Security ImplicationsWarning! The debug CCOs trace all data sent between the application and Service Object. Therefore, they must not be used in live customer environments where sensitive information may be exposed. For example: - The MSR debug CCO traces full card information including account numbers, names, and CVV.
- The PINPad debug CCO traces the card account number, encrypted PIN, and key serial number.
- The MICR debug CCO traces the bank transit number, checking account number, and check (serial) number.
Failure to heed this warning will violate
PCI / PADSS compliance, and perhaps other industry or government rules or laws.
Sample Debug Control Object Output
The following debug traces are excerpts for POSPrinter. They show the
trace lines added to C:\20150207-OposCCO_POSPrinter.log for several APIs.
(Some line wrapping was added to format for display on this page.)
Create the CCO.
Get the properties State, ResultCode, ResultCodeExtended.
02/07 22:40:59.119 P0E1C T01E4
02/07 22:40:59.119 P0E1C T01E4 *Constructing: OPOS POSPrinter Control
1.14.001
[Public, by CRM/MCS] [With Tracing]
02/07 22:40:59.129 P0E1C T01E4 *State [Get] -- Closed
02/07 22:40:59.129 P0E1C T01E4 *ResultCode [Get] -- Closed
02/07 22:40:59.129 P0E1C T01E4 +ResultCodeExtended [Get]
02/07 22:40:59.129 P0E1C T01E4 -ResultCodeExtended [Get]: 0 (0x0) -- Closed
Call: Open("7167").
Get the properties ResultCode, ResultCodeExtended, State, OpenResult.
02/07 22:41:03.636 P0E1C T01E4 *Open [Function]: DeviceName <7167>
02/07 22:41:03.636 P0E1C T01E4 Opened registry key HKLM\SOFTWARE\
OLEforRetail\ServiceOPOS\POSPrinter
02/07 22:41:03.636 P0E1C T01E4 DeviceName is not a LogicalName; treating
as PhysicalName
02/07 22:41:03.636 P0E1C T01E4 Opened DeviceName subkey
02/07 22:41:03.636 P0E1C T01E4 DeviceName mapped to ProgID
<NCRPrinter.POSPrinter>
02/07 22:41:03.636 P0E1C T01E4 ProgID mapped to ClassID
02/07 22:41:03.696 P0E1C T01E4 Created Service Object
02/07 22:41:03.696 P0E1C T01E4 Acquired Service Object's dispatch pointer
02/07 22:41:03.696 P0E1C T01E4 +Open-OpenService [Function] 3 parameters
02/07 22:41:03.696 P0E1C T01E4 #1: STRING; Length 10 <POSPrinter>
02/07 22:41:03.696 P0E1C T01E4 #2: STRING; Length 4 <7167>
02/07 22:41:03.696 P0E1C T01E4 #3: DISPATCH 0xFF1F58
02/07 22:41:03.716 P0E1C T01E4 *ControlObjectDescription [Get]: <OPOS
POSPrinter
Control 1.14.001 [Public, by CRM/MCS] [With Tracing]>
02/07 22:41:03.716 P0E1C T01E4 *ControlObjectVersion [Get]: 1014001
02/07 22:41:03.756 P0E1C T01E4 -Open-OpenService [Function] RC=0 -- Closed
02/07 22:41:03.756 P0E1C T01E4 Service Object's OpenService succeeded
02/07 22:41:03.756 P0E1C T01E4 <Start> Service Object Properties.
02/07 22:41:03.756 P0E1C T01E4 +Open-ServiceObjectDescription [Get]
02/07 22:41:03.756 P0E1C T01E4 -Open-ServiceObjectDescription [Get]. Length 47
<NCR 71xx Printer/MICR/CD/ChkScan Service Object>
02/07 22:41:03.756 P0E1C T01E4 +Open-DeviceDescription [Get]
02/07 22:41:03.756 P0E1C T01E4 -Open-DeviceDescription [Get]. Length 46
<NCR 7167 Printer: Thermal Receipt, Impact Slip>
02/07 22:41:03.756 P0E1C T01E4 +Open-DeviceName [Get]
02/07 22:41:03.756 P0E1C T01E4 -Open-DeviceName [Get]. Length 16
<NCR 7167 Printer>
02/07 22:41:03.756 P0E1C T01E4 <End> Service Object Properties.
02/07 22:41:03.756 P0E1C T01E4 +Open-ServiceObjectVersion [Get]
02/07 22:41:03.756 P0E1C T01E4 -Open-ServiceObjectVersion [Get]: 1007000 0xF5D98)
02/07 22:41:03.756 P0E1C T01E4 - Success (0/0)
02/07 22:41:03.756 P0E1C T01E4 +ResultCode [Get]
02/07 22:41:03.756 P0E1C T01E4 -ResultCode [Get]: 0 (0x0)
02/07 22:41:03.756 P0E1C T01E4 +ResultCodeExtended [Get]
02/07 22:41:03.756 P0E1C T01E4 -ResultCodeExtended [Get]: 3 (0x3)
02/07 22:41:03.756 P0E1C T01E4 +State [Get]
02/07 22:41:03.756 P0E1C T01E4 -State [Get]: 2 (0x2)
02/07 22:41:03.756 P0E1C T01E4 *OpenResult [Get]: 0
Call: PrintNormal( PTR_S_RECEIPT, "ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n" )
This fails, as expected, because the printer has not been claimed
or enabled.
Get the properties ResultCode, ResultCodeExtended.
02/07 22:41:12.278 P0E1C T01E4 +PrintNormal [Function] 2 parameters
02/07 22:41:12.278 P0E1C T01E4 #1: LONG 2 (0x2)
02/07 22:41:12.278 P0E1C T01E4 #2: STRING; Length 28 [Contains non-ASCII]
000: 41 00 42 00 43 00 44 00 45 00 46 00 47 00 48 00 !A.B.C.D.E.F.G.H.!
010: 49 00 4a 00 4b 00 4c 00 4d 00 4e 00 4f 00 50 00 !I.J.K.L.M.N.O.P.!
020: 51 00 52 00 53 00 54 00 55 00 56 00 57 00 58 00 !Q.R.S.T.U.V.W.X.!
030: 59 00 5a 00 0d 00 0a 00 !Y.Z.....!
02/07 22:41:12.288 P0E1C T01E4 -PrintNormal [Function] RC=103
02/07 22:41:12.288 P0E1C T01E4 +ResultCode [Get]
02/07 22:41:12.288 P0E1C T01E4 -ResultCode [Get]: 103 (0x67)
02/07 22:41:12.288 P0E1C T01E4 +ResultCodeExtended [Get]
02/07 22:41:12.288 P0E1C T01E4 -ResultCodeExtended [Get]: 3 (0x3)
Call: Close()
Get the properties ResultCode, ResultCodeExtended, State.
02/07 22:41:14.792 P0E1C T01E4 *EventPreCloseRelease
02/07 22:41:14.792 P0E1C T01E4 +Close-CloseService [Function] 0 parameters
02/07 22:41:14.792 P0E1C T01E4 -Close-CloseService [Function] RC=0
02/07 22:41:14.802 P0E1C T01E4 *EventClose
02/07 22:41:14.802 P0E1C T01E4 *Close [Function] RC=0
02/07 22:41:14.802 P0E1C T01E4 *ResultCode [Get] -- Closed
02/07 22:41:14.802 P0E1C T01E4 +ResultCodeExtended [Get]
02/07 22:41:14.802 P0E1C T01E4 -ResultCodeExtended [Get]: 0 (0x0) -- Closed
02/07 22:41:14.802 P0E1C T01E4 *State [Get] -- Closed
Destroy the CCO
02/07 22:41:18.467 P0E1C T01E4 *Destructing
02/07 22:41:18.477 P0E1C T01E4
Last updated:
2015-02-08
|