CashDrawer API: Difference between revisions
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
Open the cash drawer device. | Open the cash drawer device. | ||
This operation should be used before other operations. | This operation should be used before other operations. | ||
{|class="wikitable" | |||
|- | |||
The result code, >= 0, success; <0 [[Error_code|error code]]. | ! style="text-align:left;background-color: #ffffcc;" width="800"| Returns | ||
|- | |||
| The result code, >= 0, success; <0 [[Error_code|error code]]. | |||
|} | |||
=== close === | === close === | ||
Line 17: | Line 18: | ||
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 apis are pair operations. If you don’t want to use this device, you should call the close api to release this device. | ||
{|class="wikitable" | |||
|- | |||
! style="text-align:left;background-color: #ffffcc;" width="800"| Returns | |||
|- | |||
| The result code, >= 0, success; <0 [[Error_code|error code]]. | |||
|} | |||
The result code, >= 0, success; <0 [[Error_code|error code]]. | The result code, >= 0, success; <0 [[Error_code|error code]]. | ||
Line 27: | Line 31: | ||
Kick out the cash drawer. | Kick out the cash drawer. | ||
{|class="wikitable" | |||
|- | |||
! style="text-align:left;background-color: #ffffcc;" width="800"| Returns | |||
|- | |||
The result code, >= 0, success; <0 [[Error_code|error code]]. | | The result code, >= 0, success; <0 [[Error_code|error code]]. | ||
|} | |||
=== setEnable === | === setEnable === | ||
Line 37: | Line 42: | ||
Enable or disable hardware | Enable or disable hardware | ||
{|class="wikitable" | {|class="wikitable" | ||
|- | |||
! scope="row" colspan="3" style="text-align:left;background-color: #ffffcc; " width="800"| Parameters | |||
|- | |- | ||
| ''nEnable'' || unsigned int || 1 : enable, 0 : disable. | | ''nEnable'' || unsigned int || 1 : enable, 0 : disable. | ||
|} | |} | ||
The result code, >= 0, success; <0 [[Error_code|error code]]. | {|class="wikitable" | ||
|- | |||
! style="text-align:left;background-color: #ffffcc;" width="800"| Returns | |||
|- | |||
| The result code, >= 0, success; <0 [[Error_code|error code]]. | |||
|} |
Revision as of 07:48, 28 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.
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 |
---|
The result code, >= 0, success; <0 error code. |