浏览代码

2022-11-04 / Wendell

Actions
1. [mod] modify get occupancy fee command(support more action)
2. [mod] remove occupancy deduction fail command
3. [fix] reset couponPoint & farewellMessage when status is idle
4. modify subVersion to 02

Files
1. As follow commit history

Image version : V2.05.XX.XXXX.XX
Wendell 2 年之前
父节点
当前提交
2b48b3e4c2
共有 2 个文件被更改,包括 108 次插入88 次删除
  1. 11 0
      EVSE/Projects/DO360/Apps/Config.h
  2. 97 88
      EVSE/Projects/DO360/Apps/main.c

+ 11 - 0
EVSE/Projects/DO360/Apps/Config.h

@@ -1496,6 +1496,17 @@ typedef enum
 #define STR_PAID_ONLINE_OK          "PaidOK"
 #define STR_PAID_ONLINE_FAIL        "PaidFail"
 
+#define STR_NOTIFY_NONE             "Notify None"
+#define STR_GET_OCCUPANCY_FEE       "GetOccupancyFee"
+#define STR_CANCEL_OCCUPANCY_DEDUCT "CancelDeduction"
+
+typedef enum
+{
+    _Notify_None                    = 0x00,             // act: None
+    _Notify_GetOccupancyFee         = 0x01,             // act: Get OccupancyFee
+    _Notify_CancelLocalDeduction    = 0x02,             // act: Cancel Local Deduction
+}NotifyOccupancyFeeAct;
+
 typedef struct
 {
     unsigned char MiscStatus;                           // 0: idle, 1: misc request, 2 misc clean, 3: bill update done

+ 97 - 88
EVSE/Projects/DO360/Apps/main.c

@@ -422,7 +422,7 @@ struct timespec                 _ParkingStatus_Time[MAX_GUN_QUANTITY];
 struct timespec                 _GetOccupancyFee_Time[MAX_GUN_QUANTITY];
 bool _canUpdateFinalCost[MAX_DISPENSER_QUANTITY];
 bool _isUndisposedFinalCost[MAX_DISPENSER_QUANTITY];
-bool _isGetOccupancyFeeReq[MAX_GUN_QUANTITY];
+int _notifyOccupancyFeeAct[MAX_GUN_QUANTITY];
 
 bool _NeedReset4gWifi;
 struct timespec _4gWifiReset_time;
@@ -435,7 +435,7 @@ bool isModelNameMatch = true;
 //char* rfidPortName = "/dev/ttyS2";
 #if ENABLE_PCBA_TEST == 0
 char* fwVersion = "V2.05.00.0000.00";
-char* subVersion = "01";
+char* subVersion = "02";
 #else
 char* fwVersion = "PCBA.00.04";
 char* subVersion = "00";
@@ -2274,7 +2274,7 @@ void InitialShareMemoryInfo()
     {
         memset((char *)&_BackupStatusNotification[i], 0, sizeof(struct StructStatusNotification));
         _useGunMeterValue[i] = false;
-        _isGetOccupancyFeeReq[i] = false;
+        _notifyOccupancyFeeAct[i] = _Notify_None;
     }
 
     for(int i = 0; i < MAX_DISPENSER_QUANTITY; i++)
@@ -4472,11 +4472,11 @@ float Get_Ocpp_TcciOccupancyPrice(void)
 //===============================================
 // Ocpp Tcci GetOccupancyFee
 //===============================================
-bool Is_Ocpp_TcciGetOccupancyFeeReq(int gun_index)
+bool Is_Ocpp_TcciOccupancyFeeActReq(int gun_index)
 {
     if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
     {
-        return ShmOCPP16Data->TcciCustomData.GetOccupancyFee[gun_index].GetOccupancyFeeReq ? true : false;
+        return ShmOCPP16Data->TcciCustomData.OccupancyFeeAct[gun_index].OccupancyFeeActReq ? true : false;
     }
     if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
     {
@@ -4485,13 +4485,14 @@ bool Is_Ocpp_TcciGetOccupancyFeeReq(int gun_index)
     return false;
 }
 
-void Set_Ocpp_TcciGetOccupancyFeeReq(int gun_index, OccupancyBillInfo *bill)
+void Set_Ocpp_TcciOccupancyFeeAct(int gun_index, OccupancyBillInfo *bill, int action)
 {
     if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
     {
-        ShmOCPP16Data->TcciCustomData.GetOccupancyFee[gun_index].GetOccupancyFeeReq = true;
-        memset(ShmOCPP16Data->TcciCustomData.GetOccupancyFee[gun_index].occupancySN, 0x00, sizeof(ShmOCPP16Data->TcciCustomData.GetOccupancyFee[gun_index].occupancySN));
-        memcpy(ShmOCPP16Data->TcciCustomData.GetOccupancyFee[gun_index].occupancySN, bill->Sn, sizeof(bill->Sn));
+        memset(ShmOCPP16Data->TcciCustomData.OccupancyFeeAct[gun_index].occupancySN, 0x00, sizeof(ShmOCPP16Data->TcciCustomData.OccupancyFeeAct[gun_index].occupancySN));
+        memcpy(ShmOCPP16Data->TcciCustomData.OccupancyFeeAct[gun_index].occupancySN, bill->Sn, sizeof(bill->Sn));
+        ShmOCPP16Data->TcciCustomData.OccupancyFeeAct[gun_index].action = action;
+        ShmOCPP16Data->TcciCustomData.OccupancyFeeAct[gun_index].OccupancyFeeActReq = true;
     }
     if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
     {
@@ -4499,11 +4500,12 @@ void Set_Ocpp_TcciGetOccupancyFeeReq(int gun_index, OccupancyBillInfo *bill)
     }
 }
 
-void Clean_Ocpp_TcciGetOccupancyFeeReq(int gun_index)
+void Clean_Ocpp_TcciNotifyOccupancyFeeActReq(int gun_index)
 {
     if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
     {
-        ShmOCPP16Data->TcciCustomData.GetOccupancyFee[gun_index].GetOccupancyFeeReq = false;
+        ShmOCPP16Data->TcciCustomData.OccupancyFeeAct[gun_index].action = _Notify_None;
+        ShmOCPP16Data->TcciCustomData.OccupancyFeeAct[gun_index].OccupancyFeeActReq = false;
     }
     if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
     {
@@ -4515,9 +4517,9 @@ void Get_Ocpp_TcciGetOccupancyFeeResponse(int gun_index, OccupancyBillInfo *bill
 {
     if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
     {
-        bill->Duration = ShmOCPP16Data->TcciCustomData.GetOccupancyFee[gun_index].response_duration;
-        bill->Fee = ShmOCPP16Data->TcciCustomData.GetOccupancyFee[gun_index].response_occupancyFee;
-        memcpy(bill->StartTime, ShmOCPP16Data->TcciCustomData.GetOccupancyFee[gun_index].response_startTime, sizeof(bill->StartTime));
+        bill->Duration = ShmOCPP16Data->TcciCustomData.OccupancyFeeAct[gun_index].response_duration;
+        bill->Fee = ShmOCPP16Data->TcciCustomData.OccupancyFeeAct[gun_index].response_occupancyFee;
+        memcpy(bill->StartTime, ShmOCPP16Data->TcciCustomData.OccupancyFeeAct[gun_index].response_startTime, sizeof(bill->StartTime));
     }
     if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
     {
@@ -4525,11 +4527,11 @@ void Get_Ocpp_TcciGetOccupancyFeeResponse(int gun_index, OccupancyBillInfo *bill
     }
 }
 
-bool Is_Ocpp_TcciGetOccupancyFeeStatus(int gun_index, char *status)
+bool Is_Ocpp_TcciOccupancyFeeActStatus(int gun_index, char *status)
 {
     if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
     {
-        return strcmp((char *)ShmOCPP16Data->TcciCustomData.GetOccupancyFee[gun_index].response_status, status) == EQUAL ? true : false;
+        return strcmp((char *)ShmOCPP16Data->TcciCustomData.OccupancyFeeAct[gun_index].response_status, status) == EQUAL ? true : false;
     }
     if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
     {
@@ -8106,35 +8108,45 @@ int OccupancyButtonSync(int gunIndex)
     return _pass;
 }
 
-int OccupancyFeeRequest(int gunIndex)
+int NotifyOccupancyFeeActRequest(int gunIndex, int action)
 {
-    if(!_isGetOccupancyFeeReq[gunIndex])
+    char *str_notify_occupancy_act[] = {STR_NOTIFY_NONE, STR_GET_OCCUPANCY_FEE, STR_CANCEL_OCCUPANCY_DEDUCT};
+
+    if(_notifyOccupancyFeeAct[gunIndex] == _Notify_None)
     {
-        if(!Is_Ocpp_TcciGetOccupancyFeeReq(gunIndex))
+        if(!Is_Ocpp_TcciOccupancyFeeActReq(gunIndex))
         {
-            Set_Ocpp_TcciGetOccupancyFeeReq(gunIndex, &ShmChargerInfo->AllBill.OccupancyInfo[gunIndex].OccupancyBill);
-            _isGetOccupancyFeeReq[gunIndex] = true;
-            LOG_INFO("Gun %d Set OccupancyFee Request", gunIndex + 1);
+            GetClockTime(&_GetOccupancyFee_Time[gunIndex]);
+            Set_Ocpp_TcciOccupancyFeeAct(gunIndex, &ShmChargerInfo->AllBill.OccupancyInfo[gunIndex].OccupancyBill, action);
+            _notifyOccupancyFeeAct[gunIndex] = action;
+            LOG_INFO("Gun %d Set OccupancyFee Action [%s] Request", gunIndex + 1, str_notify_occupancy_act[action]);
         }
     }
     else
     {
-        if(!Is_Ocpp_TcciGetOccupancyFeeReq(gunIndex))
+        if(!Is_Ocpp_TcciOccupancyFeeActReq(gunIndex))
         {
-            if(Is_Ocpp_TcciGetOccupancyFeeStatus(gunIndex, "Accepted"))
+            if(Is_Ocpp_TcciOccupancyFeeActStatus(gunIndex, "Accepted"))
             {
-                _isGetOccupancyFeeReq[gunIndex] = false;
-                Get_Ocpp_TcciGetOccupancyFeeResponse(gunIndex, &ShmChargerInfo->AllBill.OccupancyInfo[gunIndex].OccupancyBill);
-                LOG_INFO("Gun %d Get Occupancy Fee: [%.2f], Duration: [%d], StartTime: [%s]",
-                    gunIndex + 1,
-                    ShmChargerInfo->AllBill.OccupancyInfo[gunIndex].OccupancyBill.Fee,
-                    ShmChargerInfo->AllBill.OccupancyInfo[gunIndex].OccupancyBill.Duration,
-                    ShmChargerInfo->AllBill.OccupancyInfo[gunIndex].OccupancyBill.StartTime);
+                if(_notifyOccupancyFeeAct[gunIndex] == _Notify_GetOccupancyFee)
+                {
+                    Get_Ocpp_TcciGetOccupancyFeeResponse(gunIndex, &ShmChargerInfo->AllBill.OccupancyInfo[gunIndex].OccupancyBill);
+                    LOG_INFO("Gun %d Get Occupancy Fee: [%.2f], Duration: [%d], StartTime: [%s]",
+                        gunIndex + 1,
+                        ShmChargerInfo->AllBill.OccupancyInfo[gunIndex].OccupancyBill.Fee,
+                        ShmChargerInfo->AllBill.OccupancyInfo[gunIndex].OccupancyBill.Duration,
+                        ShmChargerInfo->AllBill.OccupancyInfo[gunIndex].OccupancyBill.StartTime);
+                }
+                if(_notifyOccupancyFeeAct[gunIndex] == _Notify_CancelLocalDeduction)
+                {
+                    LOG_INFO("Gun %d Occupancy Deduction Stopped", gunIndex + 1);
+                }
+                _notifyOccupancyFeeAct[gunIndex] = _Notify_None;
                 return PASS;
             }
             else
             {
-                LOG_INFO("Gun %d Get OccupancyFee Rejected", gunIndex + 1);
+                LOG_INFO("Gun %d Notify OccupancyFee Action Rejected", gunIndex + 1);
                 return FAIL;
             }
         }
@@ -8142,9 +8154,9 @@ int OccupancyFeeRequest(int gunIndex)
         if((GetTimeoutValue(_GetOccupancyFee_Time[gunIndex]) / uSEC_VAL) >= OCCUPANCY_FEE_TIMEOUT)
         {
             // shall not reach here
-            Clean_Ocpp_TcciGetOccupancyFeeReq(gunIndex);
-            _isGetOccupancyFeeReq[gunIndex] = false;
-            LOG_INFO("Gun %d GetOccupancyFee Request Timeout", gunIndex + 1);
+            Clean_Ocpp_TcciNotifyOccupancyFeeActReq(gunIndex);
+            _notifyOccupancyFeeAct[gunIndex] = _Notify_None;
+            LOG_INFO("Gun %d OccupancyFee Action [%s] Request Timeout", gunIndex + 1, str_notify_occupancy_act[action]);
             return FAIL;
         }
     }
@@ -8181,10 +8193,14 @@ void OccupancyRequest(int gunIndex)
 {
     int _action = 0;
     bool feeRequest = false;
+    bool keepCounting = false;
+    int res = FAIL;
     char _sn[37];
     unsigned char _status = 0;
     char *str_action[] = {STR_OCCUPANCY_ACT_NONE, STR_OCCUPANCY_ACT_DISPLAY, STR_OCCUPANCY_ACT_CANCEL, STR_OCCUPANCY_ACT_PAID_OK, STR_OCCUPANCY_ACT_PAID_NG};
 
+    _status = ShmChargerInfo->AllBill.OccupancyInfo[gunIndex].Status;
+
     if(Is_Ocpp_TcciOccupancyDisplayReq(gunIndex))
     {
         memset(_sn, 0x00, sizeof(_sn));
@@ -8200,7 +8216,17 @@ void OccupancyRequest(int gunIndex)
         ShmChargerInfo->ConnectorActReq[gunIndex].Flag.bits.ParkingFeeRequest =false;
     }
 
-    _status = ShmChargerInfo->AllBill.OccupancyInfo[gunIndex].Status;
+    if(Is_OccupancyKeepCountingReq(gunIndex))
+    {
+        if(_status == _Parking_WaitToPay)
+        {
+            keepCounting = true;
+        }
+        else
+        {
+            Clean_OccupancyKeepCountingReq(gunIndex);
+        }
+    }
 
     if(_status != _Parking_NoOccupancy && chargingInfo[gunIndex]->SystemStatus == S_CHARGING)
     {
@@ -8298,7 +8324,7 @@ void OccupancyRequest(int gunIndex)
             {
                 Occupancy_INFO("Gun %d OccupancyStatus [RequestFee]", gunIndex + 1);
                 SyncParkingStatus(gunIndex);
-                _isGetOccupancyFeeReq[gunIndex] = false;
+                _notifyOccupancyFeeAct[gunIndex] = _Notify_None;
                 GetClockTime(&_GetOccupancyFee_Time[gunIndex]);
             }
             if(_action == _ParkingAction_CancelOccupancy ||
@@ -8322,7 +8348,7 @@ void OccupancyRequest(int gunIndex)
                 }
                 else
                 {
-                    int res = OccupancyFeeRequest(gunIndex);
+                    res = NotifyOccupancyFeeActRequest(gunIndex, _Notify_GetOccupancyFee);
 
                     if(res ==  PASS)
                     {
@@ -8346,6 +8372,7 @@ void OccupancyRequest(int gunIndex)
                 Occupancy_INFO("Gun %d OccupancyStatus [WaitToPay]", gunIndex + 1);
                 SyncParkingStatus(gunIndex);
                 memset(&ShmChargerInfo->AllBill.OccupancyInfo[gunIndex].BillReqStatus, 0x00, sizeof(MiscRequestStatus));
+                _notifyOccupancyFeeAct[gunIndex] = _Notify_None;
             }
             if(_action == _ParkingAction_CancelOccupancy ||
                 Is_Occupancy_Cancel(gunIndex))
@@ -8360,6 +8387,25 @@ void OccupancyRequest(int gunIndex)
             {
                 ShmChargerInfo->AllBill.OccupancyInfo[gunIndex].Status = _Parking_PaidOnlineFail;
             }
+            else if(keepCounting)
+            {
+                res = NotifyOccupancyFeeActRequest(gunIndex, _Notify_CancelLocalDeduction);
+
+                if(res ==  PASS)
+                {
+                    ShmChargerInfo->AllBill.OccupancyInfo[gunIndex].Status = _Parking_Occupied;
+                    Clean_OccupancyKeepCountingReq(gunIndex);
+                }
+                else if(res ==  FAIL)
+                {
+                    ShmChargerInfo->AllBill.OccupancyInfo[gunIndex].Status = _Parking_NoOccupancy;
+                    Clean_OccupancyKeepCountingReq(gunIndex);
+                }
+                else
+                {
+                    // wait response
+                }
+            }
             break;
 
         case _Parking_PaidOnlineOK:
@@ -8385,7 +8431,7 @@ void OccupancyRequest(int gunIndex)
             }
             if((GetTimeoutValue(_GetOccupancyFee_Time[gunIndex]) / uSEC_VAL) >= OCCUPANCY_FEE_TIMEOUT)
             {
-                LOG_INFO("Gun %d Rerutn to Occupied via PaidOnlineFail", gunIndex + 1);
+                LOG_INFO("Gun %d Return to Occupied via PaidOnlineFail", gunIndex + 1);
                 ShmChargerInfo->AllBill.OccupancyInfo[gunIndex].Status = _Parking_Occupied;
             }
             break;
@@ -8406,7 +8452,6 @@ void CheckOccupancyFee(void)
 
 #define OCCUPANCY_DEDUCT_IDLE           0
 #define OCCUPANCY_DEDUCT_REQUEST        1
-#define OCCUPANCY_DEDUCT_CANCEL         2
 
 unsigned char _OccupancyDeductStatus = OCCUPANCY_DEDUCT_IDLE;
 int _OccupancyReportGunId = 0;
@@ -8438,26 +8483,6 @@ void CheckOccupancyDeduct(void)
                     Clean_OccupancyDeductReq(i);
                     break;
                 }
-                if(Is_OccupancyKeepCountingReq(i))
-                {
-                    if(ShmChargerInfo->AllBill.OccupancyInfo[i].OccupancyReq.bits.SelfReq)
-                    {
-                        LOG_INFO("Gun %d Occupancy Resume!", i + 1);
-                        Clean_OccupancyKeepCountingReq(i);
-                        break;
-                    }
-
-                    OccupancyDeductInfo _cancel_deduct;
-                    memset(&_cancel_deduct, 0x00, sizeof(OccupancyDeductInfo));
-                    memcpy(&_cancel_deduct.Sn, ShmChargerInfo->AllBill.OccupancyInfo[i].OccupancyBill.Sn, sizeof(_cancel_deduct.Sn));
-
-                    Set_Ocpp_OccupancyDeductResult(&_cancel_deduct, NO);
-                    Set_Ocpp_TcciReportOccupancyDeductReq();
-                    _OccupancyDeductStatus = OCCUPANCY_DEDUCT_CANCEL;
-                    _OccupancyReportGunId = i + 1;
-                    Clean_OccupancyKeepCountingReq(i);
-                    break;
-                }
             }
 
             if(_OccupancyDeductStatus != OCCUPANCY_DEDUCT_IDLE)
@@ -8468,23 +8493,12 @@ void CheckOccupancyDeduct(void)
                 memcpy(cardNo, ShmChargerInfo->AllBill.OccupancyInfo[_OccupancyReportGunId - 1].OccupancyDeduct.creditNo, sizeof(ShmChargerInfo->AllBill.OccupancyInfo[_OccupancyReportGunId - 1].OccupancyDeduct.creditNo));
                 memcpy(appNo, ShmChargerInfo->AllBill.OccupancyInfo[_OccupancyReportGunId - 1].OccupancyDeduct.ApprovalNumber, sizeof(ShmChargerInfo->AllBill.OccupancyInfo[_OccupancyReportGunId - 1].OccupancyDeduct.ApprovalNumber));
 
-                if(_OccupancyDeductStatus == OCCUPANCY_DEDUCT_REQUEST)
-                {
-                    LOG_INFO("Gun %d Occupancy Deduct [%s] Sn: [%s], Fee: [%.2f], CreditNo: [%s], ApprovalNo: [%s]",
-                        _OccupancyReportGunId,
-                        _OccupancyDeductStatus == OCCUPANCY_DEDUCT_REQUEST ? "Request" : "Cancel",
-                        ShmChargerInfo->AllBill.OccupancyInfo[_OccupancyReportGunId - 1].OccupancyDeduct.Sn,
-                        ShmChargerInfo->AllBill.OccupancyInfo[_OccupancyReportGunId - 1].OccupancyDeduct.Fee,
-                        cardNo,
-                        appNo);
-                }
-                else
-                {
-                    LOG_INFO("Gun %d Occupancy Deduct [%s] Sn: [%s]",
-                        _OccupancyReportGunId,
-                        _OccupancyDeductStatus == OCCUPANCY_DEDUCT_REQUEST ? "Request" : "Cancel",
-                        ShmChargerInfo->AllBill.OccupancyInfo[_OccupancyReportGunId - 1].OccupancyBill.Sn);
-                }
+                LOG_INFO("Gun %d Occupancy Deduct [Request] Sn: [%s], Fee: [%.2f], CreditNo: [%s], ApprovalNo: [%s]",
+                    _OccupancyReportGunId,
+                    ShmChargerInfo->AllBill.OccupancyInfo[_OccupancyReportGunId - 1].OccupancyDeduct.Sn,
+                    ShmChargerInfo->AllBill.OccupancyInfo[_OccupancyReportGunId - 1].OccupancyDeduct.Fee,
+                    cardNo,
+                    appNo);
             }
         }
     }
@@ -8492,19 +8506,12 @@ void CheckOccupancyDeduct(void)
     {
         if(!Is_Ocpp_TcciReportOccupancyDeductReq())
         {
-            if(_OccupancyDeductStatus == OCCUPANCY_DEDUCT_REQUEST)
+            if(ShmChargerInfo->AllBill.OccupancyInfo[_OccupancyReportGunId - 1].Status == _Parking_WaitToPay)
             {
-                if(ShmChargerInfo->AllBill.OccupancyInfo[_OccupancyReportGunId - 1].Status == _Parking_WaitToPay)
-                {
-                    ShmChargerInfo->AllBill.OccupancyInfo[_OccupancyReportGunId - 1].Status = _Parking_NoOccupancy;
-                    LOG_INFO("Gun %d OccupancyDeduct Request Completed!", _OccupancyReportGunId);
-                }
-            }
-            else
-            {
-                ShmChargerInfo->AllBill.OccupancyInfo[_OccupancyReportGunId - 1].Status = _Parking_Occupied;
-                LOG_INFO("Gun %d Occupancy Continued!", _OccupancyReportGunId);
+                ShmChargerInfo->AllBill.OccupancyInfo[_OccupancyReportGunId - 1].Status = _Parking_NoOccupancy;
+                LOG_INFO("Gun %d OccupancyDeduct Request Completed!", _OccupancyReportGunId);
             }
+
             _OccupancyDeductStatus = OCCUPANCY_DEDUCT_IDLE;
         }
     }
@@ -11631,6 +11638,8 @@ int main(void)
                             ShmSysConfigAndInfo->SysInfo.ConnectorInfo[gun_index].UserPrice = 0;
                             ShmSysConfigAndInfo->SysInfo.ConnectorInfo[gun_index].TotalCost = 0;
                             ShmSysConfigAndInfo->SysInfo.ConnectorInfo[gun_index].AccountBalance = -65535;
+                            ShmSysConfigAndInfo->SysInfo.ConnectorInfo[gun_index].CostDiscount = 0;
+                            ShmSysConfigAndInfo->SysInfo.ConnectorInfo[gun_index].RemainAmount = 0;
                             ShmSysConfigAndInfo->SysInfo.ConnectorInfo[gun_index].EnergyCost = -1;
                             ShmSysConfigAndInfo->SysInfo.ConnectorInfo[gun_index].ParkingFee = -1;
                             ShmSysConfigAndInfo->SysInfo.ConnectorInfo[gun_index].Parameter.bits.AnnounceBalance = false;