CashDrawer API: Difference between revisions

From wizarPOS
No edit summary
Line 42: Line 42:
Enable or disable hardware
Enable or disable hardware


{|class="wikitable"
{|
|-
|-
! scope="row" colspan="3" style="text-align:left;background-color: #ffffcc; " width="800"| Parameters
! scope="row" colspan="2" style="text-align:left;background-color: #78909c; " width="800"| '''Parameters'''
|-
|-
| ''nEnable'' || unsigned int || 1 : enable, 0 : disable.
| style="text-align:left;background-color: #edf1f2; " width="100"| nEnable || style="text-align:left;background-color: #f8f9fa; |'''unsigned int:''' 1 - enable, 0 - disable.
|}
|}


{|class="wikitable"
{|
|-
|-
! style="text-align:left;background-color: #ffffcc;" width="800"| Returns
! scope="row" colspan="2" style="text-align:left;background-color: #78909c;" width="800"| '''Returns'''
|-
|-
| The result code, >= 0, success; <0 [[Error_code|error code]].
| style="text-align:left;background-color: #edf1f2; " width="100"| '''int''' || style="text-align:left;background-color: #f8f9fa;| The result code, >= 0, success; <0 [[Error_code|error code]].
|}
|}

Revision as of 08:30, 28 April 2018

Interface

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
The result code, >= 0, success; <0 error code.

close

int moneybox_close()

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.

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

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

kick_out

int moneybox_ctrl()

Kick out the cash drawer.

Returns
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.