CashDrawer API: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
== Functions == | == Functions == | ||
The calling sequence is [[#open|open]]>[[#kick_out|kick_out]]>[[#close|close ]] | |||
=== open === | === open === | ||
int moneybox_open() | |||
Open the cash drawer device. | |||
This operation should be used before other operations. | |||
'''Parameters''' | |||
'''Returns''' | |||
The result code, >= 0, success; <0 [[Error_code|error code]]. | |||
=== close === | === 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. | |||
'''Parameters''' | |||
'''Returns''' | |||
The result code, >= 0, success; <0 [[Error_code|error code]]. | |||
=== kick_out === | === kick_out === | ||
int moneybox_ctrl() | |||
Kick out the cash drawer. | |||
'''Parameters''' | |||
'''Returns''' | |||
The result code, >= 0, success; <0 [[Error_code|error code]]. | |||
=== setEnable === | === setEnable === | ||
int moneybox_setEnable(unsigned int nEnable) | |||
Enable or disable hardware | |||
'''Parameters''' | |||
{| | |||
|- | |||
| ''nEnable'' || 1 : enable, 0 : disable. | |||
|} | |||
'''Returns''' | |||
The result code, >= 0, success; <0 [[Error_code|error code]]. |
Revision as of 06:14, 13 April 2018
Functions
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.
Parameters
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.
Parameters
Returns
The result code, >= 0, success; <0 error code.
kick_out
int moneybox_ctrl()
Kick out the cash drawer.
Parameters
Returns
The result code, >= 0, success; <0 error code.
setEnable
int moneybox_setEnable(unsigned int nEnable)
Enable or disable hardware
Parameters
nEnable | 1 : enable, 0 : disable. |
Returns
The result code, >= 0, success; <0 error code.