CashDrawer API: Difference between revisions

From wizarPOS
No edit summary
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Functions ==
== Interface Overview ==
The calling sequence is [[#open|open]]>[[#kick_out|kick_out]]>[[#close|close ]]
The calling sequence is [[#open|open]]>[[#kick_out|kick_out]]>[[#close|close ]]
=== open ===
=== <big>open</big> ===
  int moneybox_open()
  <syntaxhighlight lang="c">int moneybox_open()</syntaxhighlight >
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.


'''Parameters'''
{|class="wizarpostable"
|-
!  scope="row" colspan="2"| Returns
|-
| int || The result code, >= 0, success; <0 [[Error_code|error code]].
|}


'''Returns'''
=== <big>close</big> ===
  <syntaxhighlight lang="c">int moneybox_close()</syntaxhighlight >
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.


The result code, >= 0, success; <0 [[Error_code|error code]].
{|class="wizarpostable"
|-
!  scope="row" colspan="2" | Returns
|-
| int || The result code, >= 0, success; <0 [[Error_code|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'''
=== <big>kick_out</big> ===
  <syntaxhighlight lang="c">int moneybox_ctrl()</syntaxhighlight >
Kick out the cash drawer.


'''Returns'''
{|class="wizarpostable"
 
|-
The result code, >= 0, success; <0 [[Error_code|error code]].
!  scope="row" colspan="2" | Returns
|-
| 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]].
|}
   
   
=== kick_out ===
  int moneybox_ctrl()
Kick out the cash drawer.
'''Parameters'''


'''Returns'''
=== <big>setEnable</big> ===
 
   <syntaxhighlight lang="c">int moneybox_setEnable(unsigned int nEnable)</syntaxhighlight >
The result code, >= 0, success; <0 [[Error_code|error code]].
=== setEnable ===
   int moneybox_setEnable(unsigned int nEnable)
Enable or disable hardware
Enable or disable hardware


 
{|class="wizarpostable"
'''Parameters'''
|-
! scope="row" colspan="2" | Parameters
|-
| nEnable || '''unsigned int:''' 1 - enable, 0 - disable.
|}
{|
{|
|-
|-
| ''nEnable'' || unsigned int || 1 : enable, 0 : disable.
|  
|}
{|class="wizarpostable"
|-
!  scope="row" colspan="2" | Returns
|-
int || The result code, >= 0, success; <0 [[Error_code|error code]].
|}
|}
'''Returns'''
The result code, >= 0, success; <0 [[Error_code|error code]].

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.