123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- /*
- * Module_SmartBox.h
- *
- * Created on: 2022年5月3日
- * Author: 7564
- */
- #ifndef MODULE_SMARTBOX_H_
- #define MODULE_SMARTBOX_H_
- #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/mman.h>
- #include <linux/wireless.h>
- #include <linux/can.h>
- #include <linux/can/raw.h>
- #include <arpa/inet.h>
- #include <netinet/in.h>
- #include <unistd.h>
- #include <stdarg.h>
- #include <stdio.h> /*標準輸入輸出定義*/
- #include <stdlib.h> /*標準函數庫定義*/
- #include <unistd.h> /*Unix 標準函數定義*/
- #include <fcntl.h> /*檔控制定義*/
- #include <termios.h> /*PPSIX 終端控制定義*/
- #include <errno.h> /*錯誤號定義*/
- #include <string.h>
- #include <time.h>
- #include <ctype.h>
- #include <ifaddrs.h>
- #include <math.h>
- #include "../../define.h"
- #include <stdbool.h>
- #define ARRAY_SIZE(A) (sizeof(A) / sizeof(A[0]))
- #define PASS 1
- #define FAIL -1
- #define YES 1
- #define NO 0
- #define NONE_GROUP_CAN_SELECTED 255
- #define NONE_RELAY_SELECTED 255
- #define PSU_MIN_VOL 500 // 0.1V
- #define PSU_MIN_CUR 20 // 0.1A
- #define CAP_GAP_FETCH 30 // 0.1kw
- #define CAP_GAP_RELEASE 50 // 0.1kw
- #define STABLE_CAP_GAP 10 // 0.1kw
- #define SMART_MODE 1 // 0 : FCFS, 1 : Average
- // Fetch Loop
- #define PSU_TG_VOL_GAP 100 // 0.1V
- #define PSU_TG_CUR_GAP 50 // 0.1A
- // Fetch Loop End
- // Release Loop
- #define PSU_LIMIT_CUR 50 // 0.1A
- // Release Loop End
- #define FETCH_SMART_CHK_TIME 5000 // 1ms
- #define FETCH_FINISH_WAIT_TIME 1000 // 1ms
- #define RELEASE_STABLE_CHK_TIME 5000 // 1ms
- #define RELEASE_SMART_CHK_TIME 2000 // 1ms
- #define WAIT_FOR_LIMIT_STABLE 2000 // 1ms
- #define RELEASE_FINISH_WAIT_TIME 1000 // 1ms
- #endif /* MODULE_SMARTBOX_H_ */
|