Payout
A thin wrapper around the SSP protocol from ITL
port_win32_ssp.h
1 #ifndef BASIC_DEMO6_WIN32_SSP_H
2 #define BASIC_DEMO6_WIN32_SSP_H
3 
4 //generic SSP Responses
5 typedef enum
6 {
7 SSP_RESPONSE_OK = 0xF0,
8 SSP_RESPONSE_UNKNOWN_COMMAND = 0xF2,
9 SSP_RESPONSE_INCORRECT_PARAMETERS = 0xF3,
10 SSP_RESPONSE_INVALID_PARAMETER = 0xF4,
11 SSP_RESPONSE_COMMAND_NOT_PROCESSED = 0xF5,
12 SSP_RESPONSE_SOFTWARE_ERROR = 0xF6,
13 SSP_RESPONSE_CHECKSUM_ERROR = 0xF7,
14 SSP_RESPONSE_FAILURE = 0xF8,
15 SSP_RESPONSE_HEADER_FAILURE = 0xF9,
16 SSP_RESPONSE_KEY_NOT_SET = 0xFA,
17 SSP_RESPONSE_TIMEOUT = 0xFF,
18 } SSP_RESPONSE_ENUM;
19 
20 /* command status enumeration */
21 typedef enum{
22  PORT_CLOSED,
23  PORT_OPEN,
24  PORT_ERROR,
25  SSP_REPLY_OK,
26  SSP_PACKET_ERROR,
27  SSP_CMD_TIMEOUT,
28 }PORT_STATUS;
29 
30 typedef struct{
31  unsigned long long FixedKey;
32  unsigned long long EncryptKey;
34 
35 typedef struct{
36  SSP_FULL_KEY Key;
37  unsigned long BaudRate;
38  unsigned long Timeout;
39  unsigned char PortNumber;
40  unsigned char SSPAddress;
41  unsigned char RetryLevel;
42  unsigned char EncryptionStatus;
43  unsigned char CommandDataLength;
44  unsigned char CommandData[255];
45  unsigned char ResponseStatus;
46  unsigned char ResponseDataLength;
47  unsigned char ResponseData[255];
48  unsigned char IgnoreError;
50 
51 typedef struct{
52  unsigned short packetTime;
53  unsigned char PacketLength;
54  unsigned char PacketData[255];
55 }SSP_PACKET;
56 
57 typedef struct{
58  unsigned char* CommandName;
59  unsigned char* LogFileName;
60  unsigned char Encrypted;
61  SSP_PACKET Transmit;
62  SSP_PACKET Receive;
63  SSP_PACKET PreEncryptTransmit;
64  SSP_PACKET PreEncryptRecieve;
66 
67 typedef struct{
68  unsigned __int64 Generator;
69  unsigned __int64 Modulus;
70  unsigned __int64 HostInter;
71  unsigned __int64 HostRandom;
72  unsigned __int64 SlaveInterKey;
73  unsigned __int64 SlaveRandom;
74  unsigned __int64 KeyHost;
75  unsigned __int64 KeySlave;
76 }SSP_KEYS;
77 
78 #define NO_ENCRYPTION 0
79 #define ENCRYPTION_SET 1
80 
81 
82 #define SSP_CMD_SET_ROUTING 0x3B
83 #define SSP_CMD_SYNC 0x11
84 #define SSP_CMD_HOST_PROTOCOL 0x06
85 #define SSP_CMD_SETUP_REQUEST 0x05
86 #define SSP_CMD_ENABLE 0x0A
87 #define SSP_CMD_ENABLE_PAYOUT_DEVICE 0x5C
88 #define SSP_CMD_SET_INHIBITS 0x02
89 #define SSP_CMD_POLL 0x07
90 #define SSP_CMD_RESET 0x01
91 #define SSP_CMD_DISABLE_PAYOUT_DEVICE 0x5B
92 #define SSP_CMD_DISABLE 0x09
93 
94 
95 #define SSP_POLL_RESET 0xF1
96 #define SSP_POLL_READ 0xEF //next byte is channel (0 for unknown)
97 #define SSP_POLL_CREDIT 0xEE //next byte is channel
98 #define SSP_POLL_INCOMPLETE_PAYOUT 0xDC
99 #define SSP_POLL_INCOMPLETE_FLOAT 0xDD
100 #define SSP_POLL_REJECTING 0xED
101 #define SSP_POLL_REJECTED 0xEC
102 #define SSP_POLL_STACKING 0xCC
103 #define SSP_POLL_STACKED 0xEB
104 #define SSP_POLL_SAFE_JAM 0xEA
105 #define SSP_POLL_UNSAFE_JAM 0xE9
106 #define SSP_POLL_DISABLED 0xE8
107 #define SSP_POLL_FRAUD_ATTEMPT 0xE6 //next byte is channel
108 #define SSP_POLL_STACKER_FULL 0xE7
109 #define SSP_POLL_CASH_BOX_REMOVED 0xE3
110 #define SSP_POLL_CASH_BOX_REPLACED 0xE4
111 #define SSP_POLL_CLEARED_FROM_FRONT 0xE1
112 #define SSP_POLL_CLEARED_INTO_CASHBOX 0xE2
113 
114 #define SSP_CMD_SET_GENERATOR 0x4A
115 #define SSP_CMD_SET_MODULUS 0x4B
116 #define SSP_CMD_KEY_EXCHANGE 0x4C
117 
118 #endif
Definition: port_win32_ssp.h:35
Definition: port_win32_ssp.h:67
Definition: port_win32_ssp.h:57
Definition: port_win32_ssp.h:30
Definition: port_win32_ssp.h:51