-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAesimhei.h
2643 lines (1840 loc) · 91.1 KB
/
Aesimhei.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#ifndef __AESIMHEI_H
#define __AESIMHEI_H
/***************************************************************
Definitions for the interface provided by the:
Aardvark Embedded Solutions Intelligent Money Handling Equipment Interface
****************************************************************/
#define ORIGINAL_VERSION 0x10001
#define DISPENSER_UPDATE 0x10002
#define STRINGS_RETURNED 0x10005
#define BARCODE_ACCEPTOR 0x10006
#define INTERFACE_VERSION BARCODE_ACCEPTOR
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __linux__
#include "win_types.h"
#define dllimport
#define DLL
#endif
#ifndef DLL /* user application */
#define DLL __declspec(dllimport) __stdcall
#endif
/****************************************************************
'C' Program Structures and Constants
****************************************************************/
/* System Constants. Can't use enum as Linux int is 16 bits. */
/* This area is still under development */
#define SYSTEM_MASK 0xf0000000
#define INTERFACE_FAILED 0x80000000
#define DISPENSER_MASK 0x0fff0000
#define ACCEPTOR_MASK 0x0000ffff
enum AcceptorConstants
{
ACCEPTOR_DEAD = 0x00000001, /* No response to communications for this device */
/* ACCEPTOR_ALL_DEAD = 0x00000002, No response from any device on this connection */
ACCEPTOR_DISABLED = 0X00000004, /* Disabled by Interface */
ACCEPTOR_INHIBIT = 0X00000008, /* Specific by Application */
ACCEPTOR_FRAUD = 0x00000010, /* Reported from device */
ACCEPTOR_BUSY = 0x00000020, /* Reported from device */
ACCEPTOR_FAULT = 0x00000040, /* Reported from device */
ACCEPTOR_NO_KEY = 0x00000080, /* Reported from device */
MAX_ACCEPTOR_COINS = 256 /* Maximum coins or notes */
/* handled by any device */
} ;
typedef struct
{
int Value ; /* Value of this coin */
int Inhibit ; /* Set by PC: this coin is inhibited */
int Count ; /* Total number read "ever" */
int Path ; /* Set by PC: this coin's chosen output path */
int PathCount ; /* Number "ever" sent down the chosen Path */
int PathSwitchLevel ; /* Set by PC: PathCount level to switch coin to default path */
char DefaultPath ; /* Set by PC: Default path for this specific coin */
char FutureExpansion ; /* Set by PC: for future use */
char HeldInEscrow ; /* count of this note / coin in escrow (usually max 1) */
char FutureExpansion2 ; /* for future use */
char* CoinName ; /* The string, usually as returned from the acceptor, describing this coin */
} AcceptorCoin ;
typedef struct
{
int Unit ; /* Specification of this unit */
int Status ; /* AcceptorStatuses - zero if device OK */
int NoOfCoins ; /* The number of different coins handled */
int InterfaceNumber ; /* The bus / connection (This meaning / value has changed in 1.11.x) */
int UnitAddress ; /* For addressable units */
int DefaultPath ;
int BarcodesStacked ; /* The total number of barcode tickets stacked by this acceptor */
char Currency[4] ; /* Main currency code reported */
/* by an intelligent acceptor */
AcceptorCoin Coin[MAX_ACCEPTOR_COINS] ; /* (only NoOfCoins are set up) */
int SerialNumber ; /* Reported serial number (0 if N/A) */
char* Description ; /* Device specific string for type / revision / coin set */
int EscrowBarcodeHere ; /* If this is non zero, then the barcode reported by BarcodeInEscrow is from this acceptor */
} AcceptorBlock ;
enum DispenserConstants
{
MAX_DISPENSERS = 16, /* Maximum handled */
/* Coin Count Status Values */
DISPENSER_COIN_NONE = 0, /* No dispenser coin reporting */
DISPENSER_COIN_LOW = 1, /* Less than the low sensor level */
DISPENSER_COIN_MID = 2, /* Above low sensor but below high */
DISPENSER_COIN_HIGH = 3, /* High sensor level reported */
DISPENSER_ACCURATE = -1, /* Coin Count reported by Dispenser */
DISPENSER_ACCURATE_FULL = -2, /* The Dispenser is full */
/* Dispenser Status, additional values */
DISPENSER_REASSIGN_VALUE = 100, /* The Value has just been updated by the application */
DISPENSER_VALUE_REASSIGNED = 101, /* The updated Value has just been accepted by the IMHEI */
DISPENSER_CASHBOX_DUMP = 120, /* Dump the hopper if you can */
DISPENSER_PARTIAL_DUMP = 121, /* Dump some of the hopper if you can */
DISPENSER_DUMP_FINISHED = 122 /* recycler dump has just complete */
} ;
typedef struct
{
int Unit ; /* Specification of this unit */
int Status ; /* Individual Dispenser status */
/* This takes the same values as PayStatus() */
int InterfaceNumber ; /* The bus / connection (This meaning / value has changed in 1.11.x) */
int UnitAddress ; /* For addressable units */
int Value ; /* The value of the coins in this dispenser */
int Count ; /* Number dispensed according to the hopper records */
int Inhibit ; /* Set to 1 to inhibit Dispenser */
int NotesToDump ; /* Only read by Paylink in conjunction with DISPENSER_PARTIAL_DUMP */
int CoinCount ; /* The number of coins in the dispenser */
int CoinCountStatus ; /* Flags Relating to Coin Count (See above) */
int SerialNumber ; /* Reported serial number (0 if N/A) */
char* Description ; /* Device specific string for type / revision */
} DispenserBlock ;
/*************************************************************
Device Identity Constants
These constants are ORed together to form the coded device
identity that can be extracted from the interface.
Example
As an example, a Money Controls Serial Compact Hopper 2 will
have the following device code DP_MCL_SCH2, made up from:
· A device specifc code ORed with
· DP_COIN_PAYOUT_DEVICE ORed with
· DP_CCTALK_INTERFACE ORed with
· DP_MANU_MONEY_CONTROLS ORed with
This is a device code of 0x01020101
*************************************************************/
/* Generic Devices */
#define DP_GENERIC_MASK 0xff000000
#define DP_COIN_ACCEPT_DEVICE 0x02000000
#define DP_NOTE_ACCEPT_DEVICE 0x12000000
#define DP_CARD_ACCEPT_DEVICE 0x22000000
#define DP_COIN_PAYOUT_DEVICE 0x01000000
#define DP_NOTE_PAYOUT_DEVICE 0x11000000
#define DP_CARD_PAYOUT_DEVICE 0x21000000
#define IS_ACCEPTOR(code) (code & 0x02000000)
#define IS_COIN_ACCEPTOR(code) ((code & DP_GENERIC_MASK) == DP_COIN_ACCEPT_DEVICE)
#define IS_NOTE_ACCEPTOR(code) ((code & DP_GENERIC_MASK) == DP_NOTE_ACCEPT_DEVICE)
#define IS_NOTE_DISPENSER(code) ((code & DP_GENERIC_MASK) == DP_NOTE_PAYOUT_DEVICE)
#define IS_PAYOUT(code) (code & 0x01000000)
enum InterfaceNumbers
{ /* These describe the interface via which this device is connected: */
DP_INTERFACE_MASK = 0x00ff0000,
DP_INTERFACE_UNIT = 0x00000000,
DP_ONBOARD_PARALLEL_INTERFACE = 0x00010000,
DP_CCTALK_INTERFACE = 0x00020000,
DP_SSP_INTERFACE = 0x00030000,
DP_HII_INTERFACE = 0x00040000,
DP_ARDAC_INTERFACE = 0x00050000,
DP_JCM_INTERFACE = 0x00060000,
DP_GPT_INTERFACE = 0x00070000,
DP_MDB_INTERFACE = 0x00080000,
DP_MDB_LEVEL_3_INTERFACE = 0x00080000,
DP_MDB_LEVEL_2_INTERFACE = 0x00090000,
DP_F56_INTERFACE = 0x000A0000,
DP_CCNET_INTERFACE = 0x000B0000,
/* Some Generic Identities */
DP_ID003_NOTE = 0 | DP_JCM_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
DP_ID003_RECYCLER = 2 | DP_JCM_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
DP_ID003_BOX = 2 | DP_JCM_INTERFACE
| DP_NOTE_PAYOUT_DEVICE,
DP_MDB_LEVEL_2 = 0 | DP_MDB_LEVEL_2_INTERFACE
| DP_COIN_ACCEPT_DEVICE,
DP_MDB_LEVEL_3 = 0 | DP_MDB_LEVEL_3_INTERFACE
| DP_COIN_ACCEPT_DEVICE,
DP_MDB_LEVEL_2_TUBE = 0 | DP_MDB_LEVEL_2_INTERFACE
| DP_COIN_PAYOUT_DEVICE,
DP_MDB_TYPE_3_PAYOUT = 0 | DP_MDB_LEVEL_3_INTERFACE
| DP_COIN_PAYOUT_DEVICE,
DP_MDB_BILL = 0 | DP_MDB_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
DP_CC_GHOST_HOPPER = 255 | DP_CCTALK_INTERFACE /* Used by Value hopperz */
| DP_COIN_PAYOUT_DEVICE
} ;
#define GET_INTERFACE(code) ((code >> 16) & 0xff)
enum ManufacturerIdentities
{ /* These describe the manufacturer of the device. */
DP_MANUFACTURER_MASK = 0x0000ff00,
DP_MANU_UNKNOWN = 0x00000000,
DP_MANU_MONEY_CONTROLS = 0x00000100,
DP_MANU_INNOVATIVE_TECH = 0x00000200,
DP_MANU_MARS_ELECTRONICS = 0x00000300,
DP_MANU_AZKOYEN = 0x00000400,
DP_MANU_NRI = 0x00000500,
DP_MANU_ICT = 0x00000600,
DP_MANU_JCM = 0x00000700,
DP_MANU_GPT = 0x00000800,
DP_MANU_COINCO = 0x00000900,
DP_MANU_ASAHI_SEIKO = 0x00000A00,
DP_MANU_ASTROSYSTEMS = 0x00000B00,
DP_MANU_MERKUR = 0x00000C00,
DP_MANU_FUJITSU = 0x00000D00,
DP_MANU_CASHCODE = 0x00000E00,
DP_MANU_MFS = 0x00000F00
} ;
enum ManufacturerSpecificDeviceTypes
{ /* These device types are manufacturer-dependent, */
/* so that each manufacturer can have up to 255 known devices. */
DP_SPECIFIC_DEVICE_MASK = 0x000000ff,
/* Money Controls Devices */
DP_MCL_SCH2 = 1 | DP_MANU_MONEY_CONTROLS
| DP_CCTALK_INTERFACE
| DP_COIN_PAYOUT_DEVICE,
DP_MCL_SUH1 = 2 | DP_MANU_MONEY_CONTROLS
| DP_CCTALK_INTERFACE
| DP_COIN_PAYOUT_DEVICE,
DP_MCL_SCH3A = 3 | DP_MANU_MONEY_CONTROLS
| DP_CCTALK_INTERFACE
| DP_COIN_PAYOUT_DEVICE,
DP_MCL_SCH3 = 4 | DP_MANU_MONEY_CONTROLS
| DP_CCTALK_INTERFACE
| DP_COIN_PAYOUT_DEVICE,
DP_MCL_SUH5 = 5 | DP_MANU_MONEY_CONTROLS
| DP_CCTALK_INTERFACE
| DP_COIN_PAYOUT_DEVICE,
DP_MCL_SCH5 = 6 | DP_MANU_MONEY_CONTROLS
| DP_CCTALK_INTERFACE
| DP_COIN_PAYOUT_DEVICE,
DP_MCL_BCR_HOPPER = 7 | DP_MANU_MONEY_CONTROLS
| DP_CCTALK_INTERFACE
| DP_COIN_PAYOUT_DEVICE,
DP_MCL_CR100_HOPPER = 8 | DP_MANU_MONEY_CONTROLS
| DP_CCTALK_INTERFACE
| DP_COIN_PAYOUT_DEVICE,
DP_MCL_NR2_HOPPER = 10 | DP_MANU_MONEY_CONTROLS
| DP_CCTALK_INTERFACE
| DP_COIN_PAYOUT_DEVICE,
DP_MCL_SR3 = 2 | DP_MANU_MONEY_CONTROLS
| DP_CCTALK_INTERFACE
| DP_COIN_ACCEPT_DEVICE,
DP_MCL_SR5 = 3 | DP_MANU_MONEY_CONTROLS
| DP_CCTALK_INTERFACE
| DP_COIN_ACCEPT_DEVICE,
DP_MCL_CONDOR = 6 | DP_MANU_MONEY_CONTROLS
| DP_CCTALK_INTERFACE
| DP_COIN_ACCEPT_DEVICE,
DP_MCL_BCR = 7 | DP_MANU_MONEY_CONTROLS
| DP_CCTALK_INTERFACE
| DP_COIN_ACCEPT_DEVICE,
DP_MCL_CR100 = 8 | DP_MANU_MONEY_CONTROLS
| DP_CCTALK_INTERFACE
| DP_COIN_ACCEPT_DEVICE,
DP_MCL_BCS = 9 | DP_MANU_MONEY_CONTROLS
| DP_CCTALK_INTERFACE
| DP_COIN_ACCEPT_DEVICE,
DP_MCL_NR2 = 10 | DP_MANU_MONEY_CONTROLS
| DP_CCTALK_INTERFACE
| DP_COIN_ACCEPT_DEVICE,
DP_MCL_LUMINA = 5 | DP_MANU_MONEY_CONTROLS
| DP_CCTALK_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
DP_MCL_7200 = 6 | DP_MANU_MONEY_CONTROLS
| DP_CCTALK_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
DP_MCL_ARDAC_ELITE = 7 | DP_MANU_MONEY_CONTROLS
| DP_CCTALK_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
DP_MCL_WACS = 1 | DP_MANU_MONEY_CONTROLS
| DP_ARDAC_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
DP_MCL_ARDAC = 1 | DP_MANU_MONEY_CONTROLS
| DP_JCM_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
/* Coin Co Devices */
DP_COINCO_MDB = DP_MANU_COINCO
| DP_MDB_INTERFACE
| DP_COIN_ACCEPT_DEVICE,
DP_COINCO_VORTEX = 1 | DP_MANU_COINCO
| DP_MDB_INTERFACE
| DP_COIN_ACCEPT_DEVICE,
DP_COINCO_GLOBAL = 2 | DP_MANU_COINCO
| DP_MDB_INTERFACE
| DP_COIN_ACCEPT_DEVICE,
DP_COINCO_MDB_BILL = DP_MANU_COINCO
| DP_MDB_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
DP_COINCO_BILLPRO = 1 | DP_MANU_COINCO
| DP_MDB_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
/* Azcoin Devices */
DP_AZK_HOPPER = DP_MANU_AZKOYEN
| DP_CCTALK_INTERFACE
| DP_COIN_PAYOUT_DEVICE,
DP_AZK_HOPPER_U = 1 | DP_MANU_AZKOYEN
| DP_CCTALK_INTERFACE
| DP_COIN_PAYOUT_DEVICE,
DP_AZK_HOPPER_UPL = 2 | DP_MANU_AZKOYEN
| DP_CCTALK_INTERFACE
| DP_COIN_PAYOUT_DEVICE,
DP_AZK_MDB = DP_MANU_AZKOYEN
| DP_MDB_INTERFACE
| DP_COIN_ACCEPT_DEVICE,
DP_AZK_A6 = DP_MANU_AZKOYEN
| DP_CCTALK_INTERFACE
| DP_COIN_ACCEPT_DEVICE,
/* Mars Electronics Devices */
DP_MARS_CASHFLOW_126 = 1 | DP_MANU_MARS_ELECTRONICS
| DP_HII_INTERFACE
| DP_COIN_ACCEPT_DEVICE,
DP_MARS_CASHFLOW_9500 = 2 | DP_MANU_MARS_ELECTRONICS
| DP_HII_INTERFACE
| DP_COIN_ACCEPT_DEVICE,
DP_MARS_MDB = DP_MANU_MARS_ELECTRONICS
| DP_MDB_INTERFACE
| DP_COIN_ACCEPT_DEVICE,
DP_MARS_CASHFLOW_690 = 1 | DP_MANU_MARS_ELECTRONICS
| DP_MDB_INTERFACE
| DP_COIN_ACCEPT_DEVICE,
/* Innovative Devices */
DP_INNOV_NV4 = 4 | DP_MANU_INNOVATIVE_TECH
| DP_CCTALK_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
DP_INNOV_NV7 = 7 | DP_MANU_INNOVATIVE_TECH
| DP_CCTALK_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
DP_INNOV_NV8 = 8 | DP_MANU_INNOVATIVE_TECH
| DP_CCTALK_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
DP_INNOV_NV9 = 9 | DP_MANU_INNOVATIVE_TECH
| DP_CCTALK_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
DP_INNOV_NV10 = 10 | DP_MANU_INNOVATIVE_TECH
| DP_CCTALK_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
DP_INNOV_NV200 = 11 | DP_MANU_INNOVATIVE_TECH
| DP_CCTALK_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
DP_SHOPPER_ACCEPT = 12 | DP_MANU_INNOVATIVE_TECH
| DP_CCTALK_INTERFACE
| DP_COIN_ACCEPT_DEVICE,
DP_INNOV_NV200_NOTE = 1 | DP_MANU_INNOVATIVE_TECH
| DP_CCTALK_INTERFACE
| DP_NOTE_PAYOUT_DEVICE,
DP_INNOV_NV11 = 2 | DP_MANU_INNOVATIVE_TECH
| DP_CCTALK_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
DP_INNOV_NV11_RC = 2 | DP_MANU_INNOVATIVE_TECH
| DP_CCTALK_INTERFACE
| DP_NOTE_PAYOUT_DEVICE,
DP_SHOPPER_TOTAL = 3 | DP_MANU_INNOVATIVE_TECH
| DP_CCTALK_INTERFACE
| DP_COIN_PAYOUT_DEVICE,
DP_SHOPPER = 4 | DP_MANU_INNOVATIVE_TECH
| DP_CCTALK_INTERFACE
| DP_COIN_PAYOUT_DEVICE,
/* NRI Devices */
DP_NRI_G40 = 1 | DP_MANU_NRI
| DP_CCTALK_INTERFACE
| DP_COIN_ACCEPT_DEVICE,
DP_NRI_PELICANO = 2 | DP_MANU_NRI
| DP_CCTALK_INTERFACE
| DP_COIN_ACCEPT_DEVICE,
DP_NRI_CURRENZA_H2 = 1 | DP_MANU_NRI
| DP_CCTALK_INTERFACE
| DP_COIN_PAYOUT_DEVICE,
/* ICT Devices */
DP_ICT_U85 = 1 | DP_MANU_ICT
| DP_CCTALK_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
/* AstroSystems Devices */
DP_AST_GBA = 1 | DP_MANU_ASTROSYSTEMS
| DP_CCTALK_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
/* JCM Devices */
DP_JCM_CC_EBA = 0 | DP_MANU_JCM
| DP_CCTALK_INTERFACE /* ON cctalk interface */
| DP_NOTE_ACCEPT_DEVICE,
DP_JCM_CC_WBA = 1 | DP_MANU_JCM
| DP_CCTALK_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
DP_JCM_VEGA = 2 | DP_MANU_JCM
| DP_CCTALK_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
DP_JCM_VEGA_RC = 2 | DP_MANU_JCM
| DP_CCTALK_INTERFACE
| DP_NOTE_PAYOUT_DEVICE,
DP_JCM_NOTE = 0 | DP_MANU_JCM
| DP_JCM_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
/* GPT Devices */
DP_GPT_NOTE = 0 | DP_MANU_GPT
| DP_GPT_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
/* Asahi Seiko Devices */
DP_AS_WH2 = 0 | DP_MANU_ASAHI_SEIKO
| DP_CCTALK_INTERFACE
| DP_COIN_PAYOUT_DEVICE,
DP_MERKUR_100 = 1 | DP_MANU_MERKUR
| DP_CCTALK_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
DP_MERKUR_100_PAY = 1 | DP_MANU_MERKUR
| DP_CCTALK_INTERFACE
| DP_NOTE_PAYOUT_DEVICE,
DP_FUJITSU_F56 = 6 | DP_MANU_FUJITSU
| DP_F56_INTERFACE
| DP_NOTE_PAYOUT_DEVICE,
DP_FUJITSU_F53 = 3 | DP_MANU_FUJITSU
| DP_F56_INTERFACE
| DP_NOTE_PAYOUT_DEVICE,
DP_FUJITSU_F400 = 4 | DP_MANU_FUJITSU
| DP_F56_INTERFACE
| DP_NOTE_PAYOUT_DEVICE,
DP_CDM_4000 = 1 | DP_MANU_MFS
| DP_F56_INTERFACE
| DP_NOTE_PAYOUT_DEVICE,
DP_CC_RECYCLER = 1 | DP_MANU_CASHCODE
| DP_CCNET_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
DP_CC_ACCEPTOR = 2 | DP_MANU_CASHCODE
| DP_CCNET_INTERFACE
| DP_NOTE_ACCEPT_DEVICE,
DP_CC_CASSETTE = 1 | DP_MANU_CASHCODE
| DP_CCNET_INTERFACE
| DP_NOTE_PAYOUT_DEVICE
} ;
typedef char* __pchar ; /* This is a work around as the VC compiler cannot */
/* handle a 'char*' type in the function declarations */
/****************************************************************
The OpenMHE call is made by the PC application software to open the
"Money Handling Equipment" Interface.
Parameters
None
Return Value
If the Open call succeeds then the value zero is returned.
In the event of a failure an error code will be returned,
either as a direct echo of a Windows API call failure,
or to indicate internally detected failures that closely
correspond to the quoted meanings.
****************************************************************/
int DLL OpenMHEVersion(int InterfaceVersion) ;
#define OpenMHE() OpenMHEVersion(INTERFACE_VERSION)
/****************************************************************
The OpenSpecificMHE call is made by the PC application software
to open a "Money Handling Equipment" Interface with a specific
serial number.
Parameters
Alphanumeric
Return Value
If the Open call succeeds then the value zero is returned.
In the event of a failure an error code will be returned,
either as a direct echo of a Windows API call failure,
or to indicate internally detected failures that closely
correspond to the quoted meanings.
****************************************************************/
int DLL OpenSpecificMHEVersion(char * SerialNumber, int InterfaceVersion) ;
#define OpenSpecificMHE(SerialNumber) OpenSpecificMHEVersion(SerialNumber, INTERFACE_VERSION)
/****************************************************************
The EnableInterface call is used to allow users to enter coins
or notes into the system. This would be called when a game is
initialised and ready to accept credit.
Parameters
None
Return Value
None
Remarks
This must be called following the call to OpenMHE before
any coins / notes will be registered.
It must ALSO be called prior to reading any of the switches.
****************************************************************/
void DLL EnableInterface(void) ;
/****************************************************************
The DisableInterface call is used to prevent users from
entering any more coins or notes.
Parameters
None
Return Value
None
Remarks
1. There is no guarantee that a coin or note can not be
successfully read after this call has been made, a
successful read may be in progress.
****************************************************************/
void DLL DisableInterface(void) ;
/****************************************************************
The CurrentValue call is used to determine the total value
of all coins and notes read by the money handling equipment
connected to the interface.
Parameters
None
Return Value
The current value, in the lowest denomination of the
currency (i.e. cents / pence etc.) of all coins and notes read.
Remarks
1. The value returned by this call is never reset, but
increments for the life of the interface card. Since
this is a 32 bit integer, the card can accept
£21,474,836.47 of credit before it runs into any rollover
problems. This value is expected to exceed the life of the game.
2. It is the responsibility of the application to keep track
of value that has been used up and to monitor for new
coin / note insertions by increases in the returned value.
3. Note that this value should be read following the call
to OpenMHE and before the call to EnableInterface to establish
a starting point before any coins or notes are read.
****************************************************************/
int DLL CurrentValue(void) ;
/****************************************************************
The PayOut call is used by the PC application to instruct
the interface to pay out coins (or notes).
Parameters
This is the value, in the lowest denomination of the currency
(i.e. cents / pence etc.) of the coins and notes to be paid out.
Return Value
None
Remarks
1. This function operates in value, not coins. It is the
responsibility of the interface to decode this and to choose how
many coins (or notes) to pay out, and from which device to pay
them.
****************************************************************/
void DLL PayOut(int Value) ;
/****************************************************************
The PayStatus call provides the current status of the payout process.
Parameters
None
Return Values.
Mnemonic Value Meaning
****************************************************************/
typedef enum {
PAY_ONGOING = 0, /* The interface is in the process of paying out */
PAY_FINISHED = 1, /* The payout process is up to date */
PAY_EMPTY = -1, /* The dispenser is empty */
PAY_JAMMED = -2, /* The dispenser is jammed */
PAY_US = -3, /* Dispenser non functional */
PAY_FRAUD = -4, /* Fraud attempt detected */
PAY_FAILED_BLOCKED = -5, /* The dispenser optos are blocked */
PAY_NO_HOPPER = -6, /* There are no dispensers */
PAY_INHIBITED = -7, /* The only possible dispenser is inhibited */
PAY_SECURITY_FAIL = -8, /* The internal security checks failed */
PAY_HOPPER_RESET = -9, /* The hopper reset during a payout */
PAY_NOT_EXACT = -10, /* The hopper cannot payout the exact amount */
PAY_GHOST = -11, /* This hopper does not really exist - it's a part of another unit */
PAY_NO_KEY = -12 /* Waiting on a valid key exchange */
} PayStatuses ;
/****************************************************************
Remarks
Following a call to PayOut, the programmer should poll this to
check the progress of the operation.
If one out of mutliple hoppers has a problem the PCI card will do
the best it can.
If it can not pay out the entire amount, the status will reflect
the last attempt.
****************************************************************/
int DLL LastPayStatus(void) ;
/****************************************************************
SetDispenseQuantity
Synopsis
The SetDispenseQuantity call will set the given quantity as the number of
coins (notes) to be dispensed from a specific dispenser on the next call
to PaySpecific ().
Parameters
1. Index
This parameter specifies the dispenser that is being set up .
2. Quantity
This sets the quantity of coins (notes) to be dispensed from the indicated
dispenser.
3. Value
This is provided as a cross check, and must be the value of the
coin / notes dispensed by this dispenser.
Return Value
If the dispenser referenced is valid, and contains coins (notes) of the
specified value, the return value is value of the resultant payout
(i.e. Quantity * Value). If there is a problem in the specification,
then zero is returned.
Remarks
1. Once a quantity has been set by use of this call, it remains set
through all other Paylink interface calls until cleared as a side
effect of a PaySpecific () call.
2. Although both are not necessary, both the Index and the Value
parameters are required as a security check.
3. A non-zero return indicates only that the payout will be attempted -
no reference is made to the operability of the dispenser.
****************************************************************/
int DLL SetDispenseQuantity(int Index,
int Quantity,
int Value) ;
/****************************************************************
PaySpecific
Synopsis
The PaySpecific call takes no parameters. It causes Paylink to
attempt to pay out all the coins (notes) specified by earlier
calls to SetDispenseQuantity().
Parameters
None
Return Value
The total value of the payout being attempted.
Remarks
1. The only differences between the progress of a payout started
by PaySpecific() and one started by the traditional PayOut() call
is the quantity of the different coins (notes) chosen, and the fact
that there is no "fall over" to a lower value dispenser if a higher
value dispenser is, or becomes, empty.
2. As with PayOut(), progress is monitored by repeated calls to
LastPayStatus() waiting for PAY_ONGOING to change. Again, as with a
pay out started by PayOut(), the total value paid can be monitored
by calls to CurrentPaid() and the coins (notes) paid for each dispenser
found / monitored using the Count field of the Dispenser blocks
3. Having transferred the counts set by PaySpecific() to the
Paylink unit for this pay out, the counts are then cleared.
****************************************************************/
int DLL PaySpecific (void) ;
/****************************************************************
The IndicatorOn / IndicatorOff calls are used by the PC application
to control LED's and indicator lamps connected to the interface.
Parameters
This is the number of the Lamp that is being controlled.
Return Value
None
Remarks
1. Although the interface is described in terms of lamps, any
equipment at all may in fact be controlled by these calls,
depending only on what is physically connected to the interface card.
****************************************************************/
void DLL IndicatorOn (int IndicatorNumber) ;
void DLL IndicatorOff(int IndicatorNumber) ;
/****************************************************************
The calls to SwitchOpens and SwitchCloses are made by the PC
application to read the state of switches connected to the
interface card.
Parameters
This is the number of the switch that is being controlled.
In principle the interface card can support 64 switches,
though note that not all of these may be physically present
within a game cabinet.
Return Value
The number of times that the specified switch has been
observed to open or to close, respectively.
Remarks
1. The value returned by this call is only (and always)
reset by the OpenMHE call.
2. The convention is that at initialisation time all
switches are open.
3. A switch that starts off closed will therefore return a
value of 1 to a SwitchCloses call immediately following the
OpenMHE call.
4. The expression (SwitchCloses(n) == SwitchOpens(n)) will
always return 0 if the switch is currently closed and 1 if
the switch is currently open.
5. The pressing / tapping of a switch by a user will be
detected by an increment in the value returned by
SwitchCloses or SwtichOpens.
6. The user only needs to monitor changes in one of the
two functions (in the same way as most windowing interfaces
only need to provide functions for button up or button
down events).
****************************************************************/
int DLL SwitchOpens (int SwitchNumber) ;
int DLL SwitchCloses(int SwitchNumber) ;
/****************************************************************
The CurrentPaid call is available to keep track of
the total money paid out because of calls to the
PayOut function.
Parameters
None
Return Value
The current value, in the lowest denomination of the
currency (i.e. cents / pence etc.) of all coins and notes
ever paid out.
Remarks
1. This value that is returned by this function is updated
in real time, as the money handling equipment succeeds in
dispensing coins.
2. The value that is returned by this call is never reset,
but increments for the life of the interface card. It is
the responsibility of the application to keep track of
starting values and to monitor for new coin / note successful
payments by increases in the returned value.
3. Note that this value can be read following the call to
OpenMHE and before the call to EnableInterface to establish
a starting point before any coins or notes are paid out.
****************************************************************/
int DLL CurrentPaid(void) ;
/****************************************************************
The SystemStatus call is not implemented.
It would provides a single summary of the status
all the money handling equipment connected to the interface.
It is a logical OR of the status of all of the individual
device statuses.
Parameters
None
Return Value
Zero if all devices are completely normal.
Negative if there is a major problem with any device.
Remarks
This returns a logical OR of the status of all of the individual
device statuses.
****************************************************************/
// int DLL SystemStatus(void) ;
/****************************************************************
The CheckOperation call allows an application to check that the Paylink
and its connection to the PC are operational. It also allow
the application to automatically close down currency acceptance
in the event of any PC malfunction.
Parameters
1. Sequence
A unique number for this call, freely chosen by the application.
2. Timeout
A time in milliseconds before which another CheckOperation() call
must be made in order to continue the normal operation of Paylink.
If zero, then this functionality is inactive.
Return Value
The last Sequence value of which the Paylink unit has been notified,
or -1 if the Paylink does not support this facility.
Remarks
1. In normal operation, Paylink can be expected to have updated the
value to be returned by this within 100 milliseconds of the previous
call. It is suggested that this call is made every 500 milliseconds
or longer to allow for transient delays.
2. If the Timeout expires, Paylink will silently disable all the
acceptors that are connected to it. The next call to CheckOperation()
will silently re-enable them.
****************************************************************/
int DLL CheckOperation(int Sequence, int Timeout) ;
/****************************************************************
Detect updates to the data presented to the API by the firmware.
The fact that the value returned by CurrentUpdates has changed,
prompts the application to re-examine all the variable data
in which it is interested.
Parameters
None