123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- /*
- * Module_Payment_Omnixpay.h
- *
- * Created on: 2022/01/24
- * Author: folus
- */
- #ifndef MODULE_PAYMENT_BAZEL8_H_
- #define MODULE_PAYMENT_BAZEL8_H_
- //#define X86
- #include <sys/time.h>
- #include <sys/timeb.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <sys/types.h>
- #include <sys/ioctl.h>
- #include <sys/socket.h>
- #include <sys/ipc.h>
- #include <sys/shm.h>
- #include <sys/shm.h>
- #include <sys/mman.h>
- #include <linux/wireless.h>
- #include <arpa/inet.h>
- #include <netinet/in.h>
- #include <unistd.h>
- #include <stdarg.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
- #include <fcntl.h>
- #include <termios.h>
- #include <errno.h>
- #include <errno.h>
- #include <string.h>
- #include <time.h>
- #include <ctype.h>
- #include <ifaddrs.h>
- #include <math.h>
- #include <limits.h>
- #include <stdint.h>
- #include <libxml/parser.h>
- #include <libxml/tree.h>
- #ifndef X86
- #include "define.h"
- #define TTY_PORT "/dev/ttyS3"
- #else
- #define ConsloePrintLog
- #define TTY_PORT "/dev/ttyUSB0"
- #endif
- //#define DEBUG_INFO(format, args...) StoreLogMsg("[%s:%d][%s][Info] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
- //#define DEBUG_WARN(format, args...) StoreLogMsg("[%s:%d][%s][Warn] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
- //#define DEBUG_ERROR(format, args...) StoreLogMsg("[%s:%d][%s][Error] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
- #define DEBUG_INFO(format, args...) printf("[Info] "format, ##args)
- #define DEBUG_WARN(format, args...) printf("[Warn] "format, ##args)
- #define DEBUG_ERROR(format, args...) printf("[Error] "format, ##args)
- #define is_error(ptr) ((unsigned long)ptr > (unsigned long)-4000L)
- #define ARRAY_SIZE(A) (sizeof(A) / sizeof(A[0]))
- #define PASS 1
- #define FAIL -1
- #define ON 1
- #define OFF 0
- #define YES 1
- #define NO 0
- #define RAW_DATA_LENGTH 32
- #define SPEC_REQUEST_RETRY 3
- #define TIMEOUT_REQUEST 30
- struct SysConfigAndInfo *ShmSysConfigAndInfo;
- struct StatusCodeData *ShmStatusCodeData;
- struct OCPP16Data *ShmOCPP16Data;
- enum TIMER
- {
- TIMER_READ_RESPONSE,
- TIMER_INDEX_1,
- TIMER_CNT
- };
- enum Boolean
- {
- false=0,
- true
- };
- enum MESSAGE_HEADER
- {
- STX=0xC2
- };
- enum
- {
- s_IDLE = 0,
- s_SEND_AUTH_ONLY,
- s_WAIT_RESPONE,
- s_DONE,
- };
- struct COMMAND
- {
- uint8_t requestData[1024];
- uint8_t responseData[1024];
- };
- char ISO_4217_Currency_Code[54][4]=
- {
- "784", // - Emirati Dirham
- "032", // - Argentine Peso
- "036", // - Australian Dollar
- "975", // - Bulgarian Lev
- "048", // - Bahraini Dinar
- "096", // - Bruneian Dollar
- "986", // - Brazilian Real
- "072", // - Botswana Pula
- "124", // - Canadian Dollar
- "756", // - Swiss Franc
- "152", // - Chilean Peso
- "156", // - Chinese Yuan Renminbi
- "170", // - Colombian Peso
- "203", // - Czech Koruna
- "208", // - Danish Krone
- "978", // - Euro
- "826", // - British Pound
- "344", // - Hong Kong Dollar
- "191", // - Croatian Kuna
- "348", // - Hungarian Forint
- "360", // - Indonesian Rupiah
- "376", // - Israeli Shekel
- "356", // - Indian Rupee
- "364", // - Iranian Rial
- "352", // - Icelandic Krona
- "392", // - Japanese Yen
- "410", // - South Korean Won
- "414", // - Kuwaiti Dinar
- "398", // - Kazakhstani Tenge
- "144", // - Sri Lankan Rupee
- "434", // - Libyan Dinar
- "480", // - Mauritian Rupee
- "484", // - Mexican Peso
- "458", // - Malaysian Ringgit
- "578", // - Norwegian Krone
- "524", // - Nepalese Rupee
- "554", // - New Zealand Dollar
- "512", // - Omani Rial
- "608", // - Philippine Peso
- "586", // - Pakistani Rupee
- "985", // - Polish Zloty
- "634", // - Qatari Riyal
- "946", // - Romanian New Leu
- "643", // - Russian Ruble
- "682", // - Saudi Arabian Riyal
- "752", // - Swedish Krona
- "702", // - Singapore Dollar
- "764", // - Thai Baht
- "946", // - Turkish Lira
- "780", // - Trinidadian Dollar
- "901", // - Taiwan New Dollar
- "840", // - US Dollar
- "928", // - Venezuelan Bolivar
- "710" // - South African Rand
- };
- #endif /* MODULE_PAYMENT_BAZEL8_H_ */
|