12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- /*
- * 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> /*¼Ð·Ç¿é¤J¿é¥X©w¸q*/
- #include <stdlib.h> /*¼Ð·Ç¨ç¼Æ®w©w¸q*/
- #include <unistd.h> /*Unix ¼Ð·Ç¨ç¼Æ©w¸q*/
- #include <fcntl.h> /*Àɱ±¨î©w¸q*/
- #include <termios.h> /*PPSIX ²×ºÝ±±¨î©w¸q*/
- #include <errno.h> /*¿ù»~¸¹©w¸q*/
- #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
- #define LIMIT_PWR_MODULE_GAP 2 // 1A
- #define RELEASE_STEP_CUR_SHARE 20 // 0.1A
- // 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_ */
|