#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /*標準輸入輸出定義*/ #include /*標準函數庫定義*/ #include /*Unix 標準函數定義*/ #include /*檔控制定義*/ #include /*PPSIX 終端控制定義*/ #include /*錯誤號定義*/ #include #include #include #include #include #include #include "../../define.h" #include typedef unsigned char byte; typedef unsigned short word; typedef unsigned int unit; unsigned char _gunCount; struct ChargingInfoData *chargingInfo[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY]; bool isStartOutputSwitch[CHAdeMO_QUANTITY + CCS_QUANTITY + GB_QUANTITY]; struct timeval _cmdSubPriority_time; struct timeval _derating_time; struct timeval _max_time; struct timeval _log_time; bool isCharging = false; bool isWaitingAver = false; bool isReadToCharging = false; bool CanAverageCharging = false; int preChargingTarget; int preChargingCur; float toAverVolPoint; byte toAverVolCount; int connector_1[12]; int connector_2[12]; byte conn_1_count = 0; byte conn_2_count = 0; enum _PSU_CMD_SEQ { _PSU_CMD_STATUS = 1, _PSU_CMD_VERSION = 2, _PSU_CMD_CAP = 10, _PSU_CMD_OUTPUT = 11, _PSU_CMD_IVAILIABLE = 12, _PSU_CMD_TEMP = 13 }; enum _CHARGING_LOG_INDEX { _CHARGING_LOG_NEED_VOL = 0, _CHARGING_LOG_NEED_CUR = 1, _CHARGING_LOG_OUTPUT_VOL = 2, _CHARGING_LOG_OUTPUT_CUR = 3 };