-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmpost.h
69 lines (64 loc) · 1.26 KB
/
mpost.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/* this is the header for C programs (not C++) */
#include "mpost_int.h"
enum State
{
Disconnected,
Connecting,
PupEscrow,
Idling,
Accepting,
Escrow,
Stacking,
Stacked,
Returning,
Returned,
Rejected,
Stalled,
Failed,
CalibrateStart,
Calibrating,
DownloadStart,
DownloadRestart,
Downloading,
};
enum Event
{
Events_Begin,
ConnectedEvent,
EscrowEvent,
PUPEscrowEvent,
StackedEvent,
ReturnedEvent,
RejectedEvent,
CheatedEvent,
StackerFullEvent,
CalibrateStartEvent,
CalibrateProgressEvent,
CalibrateFinishEvent,
DownloadStartEvent,
DownloadRestartEvent,
DownloadProgressEvent,
DownloadFinishEvent,
PauseDetectedEvent,
PauseClearedEvent,
StallDetectedEvent,
StallClearedEvent,
JamDetectedEvent,
JamClearedEvent,
PowerUpEvent,
InvalidCommandEvent,
CashBoxAttachedEvent,
CashBoxRemovedEvent,
DisconnectedEvent,
Events_End
};
void mpost_open(char *portname);
void mpost_close();
/* return the bill that is currently sitting in escrow */
void mpost_return();
/* stack the bill that is currently sitting in escrow */
void mpost_stack();
void mpost_softreset();
void mpost_acceptbills(int enable);
void mpost_debug(int enable);
void mpost_setcallback(enum Event event, eventcallback callback);