EasyManua.ls Logo

NCR RealPOS 70 - Page 256

NCR RealPOS 70
306 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
12-16 Chapter 12: Cash Drawer Interface
// DRAWER_OPENED
// DRAWER_CLOSED
//
DWORD GetDrawerStatus()
{
int Result;
CString ResString;
DWORD bMask;
Result = DRAWER_INVALID;
ResString = _T("INVALID");
if ( m_bIFOpened && ( m_pCashDrawer->m_bCapStatus) ) // Opened and Drawer
status is available
{
switch( m_nDrawerNumber )
{
case 1:
bMask = CD7402DRWR1CLOSED;
break;
case 2:
bMask = CD7402DRWR2CLOSED;
break;
}
DWORD sBytes;
// if the status clear was successful, we will read a closed drawer
BOOL sResult = ReadIOPort(&sBytes, m_nIOPort);
if ( sResult )
{
if ( sBytes & bMask ) // bit = 1 means drawer CLOSED for DARLINGTON
{
ResString = _T("CLOSED");
Result = DRAWER_CLOSED;
}
else
{
ResString = _T("OPENED");
Result = DRAWER_OPENED;
}
}//sResult
}
return Result;
}

Table of Contents

Related product manuals