diff --git a/main/cc_iuc_asynchpos.h b/main/cc_iuc_asynchpos.h deleted file mode 100755 index 628572e..0000000 --- a/main/cc_iuc_asynchpos.h +++ /dev/null @@ -1,113 +0,0 @@ -#ifndef CC_IUC_ASYNCHPOS_H -#define CC_IUC_ASYNCHPOS_H - -/* - * cc_iuc_asynchpos.c - * - * Created: 21.11.2017 - * Author: Matthias - */ - -#include -#include - -//#define IUC_ASYCHNPOS_TESTMODE 1 - -#define IUC_ASYNCHPOS_COINCOIDE_H 0x09 -#define IUC_ASYNCHPOS_COINCOIDE_L 0x78 -#define IUC_ASYNCHPOS_MAX_ARRAY_SIZE 1024 -#define IUC_ASYNCHPOS_MAX_TX_MESSAGE_SIZE 300 -#define IUC_ASYNCHPOS_MAX_RX_MESSAGE_SIZE 10000 // 17000 -#define IUC_ASYNCHPOS_MIN_PACKET_SIZE 16 -#define IUC_ASYNCHPOS_MIN_BASE_DATA_SIZE 32 -#define IUC_ASYNCHPOS_MIN_BASE_BYTE_DATA_SIZE 16 -#define IUC_ASYNCHPOS_POLYNOME 0xedb88320 // 0x04C11DB7 -#define IUC_ASYNCHPOS_POLYNOME_INITIAL 0 // 0xFFFFFFFF -#define IUC_ASYNCHPOS_PRINTTIMOUT 1000 -//#define IUC_ASYNCHPOS_RECEIPT_LENGTH 16384 - -#define STX 0x01 -#define ETX1 0x02 -#define ETX2 0x03 -#define EOT 0x04 -#define ENQ 0x05 -#define ACK1 0x06 -#define ACK2 0x07 -#define DLE 0x10 -#define NAK 0x15 - -unsigned static char terminalID[IUC_ASYNCHPOS_MIN_BASE_DATA_SIZE]; -unsigned static char terminalAPAK[IUC_ASYNCHPOS_MIN_BASE_DATA_SIZE]; -unsigned static char rxAsynchData[IUC_ASYNCHPOS_MAX_RX_MESSAGE_SIZE]; -unsigned static char terminalSignature[16]; -//unsigned static char messageData[IUC_ASYNCHPOS_MAX_ARRAY_SIZE]; -unsigned static char receiptData[IUC_ASYNCHPOS_MAX_ARRAY_SIZE + 1]; -unsigned static char txAsynchData[IUC_ASYNCHPOS_MAX_ARRAY_SIZE]; -unsigned static char ENQrecieved; -unsigned static int rxCounter; -unsigned static int messageLength; -unsigned static long timeInitalized; -unsigned static long timeHoldISMAS; -unsigned static long crcTable[256]; -unsigned static char tableCreated; -unsigned static int asynchState; -unsigned static char asynchSessionClosed; -unsigned static char iuc_asynch_PRNrecieved; -unsigned static char iuc_asynch_keepAlive; -unsigned static char iuc_asynch_PrintControl; -unsigned static char iuc_asynchpos_crc_old; -unsigned static int iuc_print_counter; -unsigned static int iuc_asynch_printTimeout; -unsigned static char iucAsynchpoxDataContext; -//Prozessdaten - highly private -struct billAsynchData { - unsigned char time[20]; //UCHAR tagValue[] = "2017-12-19 13:40:00"; - unsigned char id[37]; - unsigned char printId[129]; - unsigned char docNr[33]; - //unsigned char amount[10]; - //unsigned char token[25]; - //unsigned char result[8]; - //unsigned char authCode[7]; - //unsigned char rrn[13]; - //unsigned char stan[7]; - //unsigned char cardtype[33]; - unsigned char errCode[17]; - //unsigned char receiptData[IUC_ASYNCHPOS_RECEIPT_LENGTH]; -}; - -//private -unsigned int iuc_asynchpos_send(unsigned char packetType, unsigned char* pData, unsigned int length, unsigned char needRTS); - -//void iuc_asynchpos_interpretCommand(unsigned int readLength_); - -//public -void iuc_asynchpos_setTerminalID(unsigned char *pID, unsigned int length); -void iuc_asynchpos_setTerminalAPAK(unsigned char *pAPAK, unsigned int length); -unsigned char iuc_asynchpos_recieve_serial(unsigned char waitforACK); -void iuc_asynchpos_init(); -void iuc_asynchpos_handleCommand(unsigned char command, unsigned char status); -int iuc_asynchpos_checkTime(); -unsigned char iuc_asynchpos_getIsSaleRunning(); - -//commands -void iuc_asynchpos_command_ping_terminal(void); -void iuc_asynchpos_command_Login(); -void iuc_asynchpos_command_Logout(); -void iuc_asynchpos_command_authorize(unsigned int vkPreis); -void iuc_asynchpos_command_cancel_authorize(); -void iuc_asynchpos_command_close_Document(unsigned char isStorno); -void iuc_asynchpos_command_print_Result(unsigned char status); - -//void iuc_asynchpos_handleCommand(unsigned char command, unsigned char status); -//void iuc_asynchpos_init(); -//int iuc_asynchpos_checkTime(); - -//unsigned char iuc_asynchpos_getCurrentStatus(); - -//int iuc_asynchpos_heartbeat(); - - -uint32_t iuc_asynchpos_sub_updateCRC(uint32_t crc, char* pData, size_t len); - -#endif