CashDrawer API: Difference between revisions

From wizarPOS
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 17: Line 17:
   <syntaxhighlight lang="c">int moneybox_close()</syntaxhighlight >
   <syntaxhighlight lang="c">int moneybox_close()</syntaxhighlight >
Close the cash drawer device.
Close the cash drawer device.
The open and close apis are pair operations. If you don’t want to use this device, you should call the close api to release this device.
The open and close API are pair operations. If you don’t want to use this device, you should call the close API to release this device.


{|class="wizarpostable"
{|class="wizarpostable"
Line 49: Line 49:
| nEnable || '''unsigned int:''' 1 - enable, 0 - disable.
| nEnable || '''unsigned int:''' 1 - enable, 0 - disable.
|}
|}
 
{|
 
|-
|}
{|class="wizarpostable"
{|class="wizarpostable"
|-
|-

Latest revision as of 09:32, 11 March 2019

Interface Overview

The calling sequence is open>kick_out>close

open

int moneybox_open()

Open the cash drawer device. This operation should be used before other operations.

Returns
int The result code, >= 0, success; <0 error code.


close

int moneybox_close()

Close the cash drawer device. The open and close API are pair operations. If you don’t want to use this device, you should call the close API to release this device.

Returns
int The result code, >= 0, success; <0 error code.


kick_out

int moneybox_ctrl()

Kick out the cash drawer.

Returns
int The result code, >= 0, success; <0 error code.


setEnable

int moneybox_setEnable(unsigned int nEnable)

Enable or disable hardware

Parameters
nEnable unsigned int: 1 - enable, 0 - disable.
Returns
int The result code, >= 0, success; <0 error code.