فهرست منبع

Merge branch 'DD360Audi'

FolusWen 3 سال پیش
والد
کامیت
f1bc1b6c39
43فایلهای تغییر یافته به همراه344 افزوده شده و 97 حذف شده
  1. 1 1
      EVSE/Projects/DD360/Apps/CSU/UpgradeFW.c
  2. 1 1
      EVSE/Projects/DD360/Apps/CSU/main.c
  3. 87 4
      EVSE/Projects/DD360/Apps/Define/define.h
  4. 4 4
      EVSE/Projects/DD360/Apps/ReadCmdline.c
  5. BIN
      EVSE/Projects/DD360/Images/ramdisk.gz
  6. BIN
      EVSE/Projects/DD360/output/FactoryConfig
  7. BIN
      EVSE/Projects/DD360/output/Module_DoComm
  8. BIN
      EVSE/Projects/DD360/output/Module_EvComm
  9. BIN
      EVSE/Projects/DD360/output/Module_EventLogging
  10. BIN
      EVSE/Projects/DD360/output/Module_InternalComm
  11. BIN
      EVSE/Projects/DD360/output/Module_LcmControl
  12. BIN
      EVSE/Projects/DD360/output/Module_PrimaryComm
  13. BIN
      EVSE/Projects/DD360/output/ReadCmdline
  14. BIN
      EVSE/Projects/DD360/output/main
  15. 1 1
      EVSE/Projects/DD360Audi/Apps/CSU/UpgradeFW.c
  16. 1 1
      EVSE/Projects/DD360Audi/Apps/CSU/main.c
  17. 87 4
      EVSE/Projects/DD360Audi/Apps/Define/define.h
  18. 4 4
      EVSE/Projects/DD360Audi/Apps/ReadCmdline.c
  19. BIN
      EVSE/Projects/DD360Audi/Images/ramdisk.gz
  20. BIN
      EVSE/Projects/DD360Audi/output/FactoryConfig
  21. BIN
      EVSE/Projects/DD360Audi/output/Module_DoComm
  22. BIN
      EVSE/Projects/DD360Audi/output/Module_EvComm
  23. BIN
      EVSE/Projects/DD360Audi/output/Module_EventLogging
  24. BIN
      EVSE/Projects/DD360Audi/output/Module_InternalComm
  25. BIN
      EVSE/Projects/DD360Audi/output/Module_LcmControl
  26. BIN
      EVSE/Projects/DD360Audi/output/Module_PrimaryComm
  27. BIN
      EVSE/Projects/DD360Audi/output/ReadCmdline
  28. BIN
      EVSE/Projects/DD360Audi/output/main
  29. 1 1
      EVSE/Projects/DD360ComBox/Apps/CSU/UpgradeFW.c
  30. 1 1
      EVSE/Projects/DD360ComBox/Apps/CSU/main.c
  31. 87 4
      EVSE/Projects/DD360ComBox/Apps/Define/define.h
  32. 4 4
      EVSE/Projects/DD360ComBox/Apps/ReadCmdline.c
  33. BIN
      EVSE/Projects/DD360ComBox/Images/ramdisk.gz
  34. BIN
      EVSE/Projects/DD360ComBox/output/FactoryConfig
  35. BIN
      EVSE/Projects/DD360ComBox/output/Module_DoComm
  36. BIN
      EVSE/Projects/DD360ComBox/output/Module_EvComm
  37. BIN
      EVSE/Projects/DD360ComBox/output/Module_EventLogging
  38. BIN
      EVSE/Projects/DD360ComBox/output/Module_InternalComm
  39. BIN
      EVSE/Projects/DD360ComBox/output/Module_LcmControl
  40. BIN
      EVSE/Projects/DD360ComBox/output/Module_PrimaryComm
  41. BIN
      EVSE/Projects/DD360ComBox/output/ReadCmdline
  42. BIN
      EVSE/Projects/DD360ComBox/output/main
  43. 65 67
      EVSE/Projects/define.h

+ 1 - 1
EVSE/Projects/DD360/Apps/CSU/UpgradeFW.c

@@ -176,7 +176,7 @@ static int CheckUpdateProcess(void)
 
                                 if (pSysConfig->TotalConnectorCount == 1 &&
                                         ShmDcCommonData->CcsVersion == _CCS_VERSION_CHECK_TAG_V015S0) {
-                                    targetID += 1;
+                                    //targetID += 1;
                                 }
 
                                 system("echo 3 > /proc/sys/vm/drop_caches");

+ 1 - 1
EVSE/Projects/DD360/Apps/CSU/main.c

@@ -77,7 +77,7 @@ uint8_t bd0_2_status = 0;
 uint8_t bd1_1_status = 0;
 uint8_t bd1_2_status = 0;
 
-char *fwVersion = "V1.12.00.0000.00"; // "V0.16.00.0000.00";
+char *fwVersion = "V1.13.00.0000.00"; // "V0.16.00.0000.00";
 
 //sqlite3 *localDb;
 bool isDb_ready;

+ 87 - 4
EVSE/Projects/DD360/Apps/Define/define.h

@@ -293,6 +293,9 @@ enum CoreProfile {
      DefaultPrice,
      CustomDisplayCostAndPrice,
      CustomIdleFeeAfterStop,
+     TimeOffset,
+     NextTimeOffsetTransitionDateTime,
+     TimeOffsetNextTransition,
      ConfigurationVersion,
 	 _CoreProfile_CNT
 };
@@ -398,6 +401,18 @@ struct Schedule
 	unsigned char   isTriggerStop;    					// 0: disable; 1: enable
 };
 
+struct TTIA
+{
+    unsigned char   server_addr[512];                   // Target server address
+    unsigned int    server_port;                        // Target server port
+    unsigned int    busVenderId;                        // Bus vender id, 0~65535
+    unsigned char   EquipmentProvider[16];              // EVSE vender max 15 bytes
+    unsigned char   TransportationCompanyNo;            // Data provider company number
+    unsigned char   ChargeBoxId;                        // 1 byte
+    unsigned char   evseStation[16];                    // UTF-8 15 bytes, Chinese 5 words
+    unsigned char   isEnableTTIA:1;                     // TTIA function enable
+};
+
 struct LocalSharingInfo
 {
     unsigned short      AvailableShargingCurrent;       // 0 ~ rating value amp,  Synchronize from local sharing server
@@ -425,6 +440,26 @@ typedef struct
     unsigned char PowerCabinetReserved[32];
 }WiringInfoData;
 
+typedef struct
+{
+    unsigned int isCalibratedVaGain:1;                  // Voltage phase a gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedVbGain:1;                  // Voltage phase b gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedVcGain:1;                  // Voltage phase c gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedVaOffset:1;                // Voltage phase a offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedVbOffset:1;                // Voltage phase b offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedVcOffset:1;                // Voltage phase c offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedCaGain:1;                  // Current phase a gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedCbGain:1;                  // Current phase b gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedCcGain:1;                  // Current phase c gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedCaOffset:1;                // Current phase a offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedCbOffset:1;                // Current phase b offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedCcOffset:1;                // Current phase c offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedPa:1;                      // Phase angle a is calibrated, 0: default  1: Calibrated
+    unsigned int isCalibratedPb:1;                      // Phase angle b gain is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedPc:1;                      // Phase angle c gain is calibrated, 0: default 1: Calibrated
+    unsigned int :1;
+}MeterIcCalibration;
+
 struct SysConfigData
 {
 	/**************System***************/
@@ -488,7 +523,8 @@ struct SysConfigData
 	unsigned char           isReqFirstUpgrade;          //EVSE is request first upgrade from PH server
 	unsigned char           isEnableLocalPowerSharging; //0: Disable power sharing  1: Enable power sharing
 	unsigned char           StopChargingByButton;       //0: Disable  1: Enable
-	struct LCD_OVERRIDE     LcdOveride;                 // LCD override info
+    struct LCD_OVERRIDE     LcdOveride;                 // LCD override info
+    struct TTIA             TTIA_Info;                  // TTIA configuration struct
 
     /************PowerCabinet************/
     WiringInfoData          WiringInfo;
@@ -584,6 +620,7 @@ struct ChargingInfoData
 	float 				ConnectorMaxVoltage;			// 0~6553.5 volt
 	float 				ConnectorMaxCurrent;			// 0~6553.5 volt
 	unsigned char 		ModelType;
+    MeterIcCalibration  meterIcCalInfo;
 };
 
 typedef union
@@ -4277,7 +4314,51 @@ struct StrcutSetUserPrice
     unsigned char   price[256];
 };
 
-struct StrcutRunningFinalCost
+struct ChargingPrice
+{
+    float kWhPrice;                                 // Price per kWh
+    float hourPrice;                                // Price per hour of charging
+    float flatFee;                                  // Flat fee for (part of) charging session
+};
+
+struct IdlePrice
+{
+    unsigned int graceMinutes;                      // Grace period in minutes before idle time is charged
+    float hourPrice;                                // Price per hour while idle
+};
+
+struct NextPeriod
+{
+    unsigned char atTime[36];                       // Time when these prices become active
+    struct ChargingPrice chargingPrice;             // Price components while charging
+    struct IdlePrice idlePrice;                     // Price components while idle. Optional if no idle fee charged.
+};
+
+struct Triggers
+{
+    unsigned char atTime[36];                       // Time when these prices become active
+    float atEnergykWh;                              // Consumed energy amount in kWh upon which a meter value must be sent
+    float atPowerkW;                                // Power threshold in kW when meter value must be sent when crossing in downward or upward direction. Can either
+                                                    // be used to trigger a meter value when vehicle stops charging or when vehicle charges at a high power that requires a
+                                                    // different tariff.
+                                                    // It is recommended to implement a hysteresis around this value to avoid repetitive triggers when the power fluctuates around this level.
+};
+
+struct StrcutRunningCost
+{
+    int                     txId;                   // Transaction to which this applies
+    unsigned char           timestamp[36];          // Timestamp of the meter value upon which this cost is based
+    unsigned int            meterValue;             // Meter value (Wh) upon which this cost is based
+    float                   cost;                   // Calculated total running cost
+    unsigned char           state[16];              // "Charging" or "Idle"
+    struct ChargingPrice    chargingPrice;          // Price components while charging
+    struct IdlePrice        idlePrice;              // (optional) Price components while not charging. Optional if no idle fee is charged.
+    struct NextPeriod       nextPeriod;             // (optional) Pricing for next period
+    struct Triggers         triggerMeterValue;      // (optional) Triggers to request a new meter value. Optional if no idle fee charged.
+    unsigned char           description[256];       // Compatible California pricing V1.0
+};
+
+struct StrcutFinalCost
 {
     int             txId;
     unsigned char   description[256];
@@ -4286,8 +4367,8 @@ struct StrcutRunningFinalCost
 struct StructCost
 {
     struct StrcutSetUserPrice       SetUserPrice;
-    struct StrcutRunningFinalCost   RunningCost[CONNECTOR_QUANTITY];
-    struct StrcutRunningFinalCost   FinalCost[CONNECTOR_QUANTITY];
+    struct StrcutRunningCost        RunningCost[CONNECTOR_QUANTITY];
+    struct StrcutFinalCost          FinalCost[CONNECTOR_QUANTITY];
 };
 
 struct CertificateHashDataType
@@ -4566,6 +4647,7 @@ struct OCPP16Data
     struct StructUpdateFirmware                     UpdateFirmware;
     struct OCPP16ConfigurationTable                 ConfigurationTable;
     struct StructChargingProfile                    SmartChargingProfile[CONNECTOR_QUANTITY];
+    struct StructChargingProfile                    MaxChargingProfile;
     struct StructCost                               Cost;
     struct StructCertificateSigned                  CertificateSigned;
     struct StructDeleteCertificate                  DeleteCertificate;
@@ -5950,6 +6032,7 @@ struct OCPP20Data
 	struct UnpublishFirmware_20					UnpublishFirmware;
 	struct UpdateFirmware_20					UpdateFirmware;
 	struct ChargingProfileType                  SmartChargingProfile[CONNECTOR_QUANTITY];
+	struct ChargingProfileType                  MaxChargingProfile;
 };
 
 

+ 4 - 4
EVSE/Projects/DD360/Apps/ReadCmdline.c

@@ -1266,11 +1266,11 @@ int main(void)
     ShmSelectGunInfo = (SelectGunInfo *)GetShmSelectGunInfo();
     ShmDcCommonData = (DcCommonInfo *)GetShmDcCommonData();
 
-    for (_GunIndex = 0; _GunIndex < pSysConfig->TotalConnectorCount; _GunIndex++) {
-        pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(_GunIndex);
+//    for (_GunIndex = 0; _GunIndex < pSysConfig->TotalConnectorCount; _GunIndex++) {
+//        pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(_GunIndex);
 
-        pDcChargingInfo->SystemStatus = S_IDLE;
-    }
+//        pDcChargingInfo->SystemStatus = S_IDLE;
+//    }
 
     while (isContinue) {
         if (readCmdKey(CMD_KEY_WAIT) == NO) {

BIN
EVSE/Projects/DD360/Images/ramdisk.gz


BIN
EVSE/Projects/DD360/output/FactoryConfig


BIN
EVSE/Projects/DD360/output/Module_DoComm


BIN
EVSE/Projects/DD360/output/Module_EvComm


BIN
EVSE/Projects/DD360/output/Module_EventLogging


BIN
EVSE/Projects/DD360/output/Module_InternalComm


BIN
EVSE/Projects/DD360/output/Module_LcmControl


BIN
EVSE/Projects/DD360/output/Module_PrimaryComm


BIN
EVSE/Projects/DD360/output/ReadCmdline


BIN
EVSE/Projects/DD360/output/main


+ 1 - 1
EVSE/Projects/DD360Audi/Apps/CSU/UpgradeFW.c

@@ -176,7 +176,7 @@ static int CheckUpdateProcess(void)
 
                                 if (pSysConfig->TotalConnectorCount == 1 &&
                                         ShmDcCommonData->CcsVersion == _CCS_VERSION_CHECK_TAG_V015S0) {
-                                    targetID += 1;
+                                    //targetID += 1;
                                 }
 
                                 system("echo 3 > /proc/sys/vm/drop_caches");

+ 1 - 1
EVSE/Projects/DD360Audi/Apps/CSU/main.c

@@ -77,7 +77,7 @@ uint8_t bd0_2_status = 0;
 uint8_t bd1_1_status = 0;
 uint8_t bd1_2_status = 0;
 
-char *fwVersion = "V1.12.00.0000.00"; // "V0.16.00.0000.00";
+char *fwVersion = "V1.13.00.0000.00"; // "V0.16.00.0000.00";
 
 //sqlite3 *localDb;
 bool isDb_ready;

+ 87 - 4
EVSE/Projects/DD360Audi/Apps/Define/define.h

@@ -293,6 +293,9 @@ enum CoreProfile {
      DefaultPrice,
      CustomDisplayCostAndPrice,
      CustomIdleFeeAfterStop,
+     TimeOffset,
+     NextTimeOffsetTransitionDateTime,
+     TimeOffsetNextTransition,
      ConfigurationVersion,
 	 _CoreProfile_CNT
 };
@@ -398,6 +401,18 @@ struct Schedule
 	unsigned char   isTriggerStop;    					// 0: disable; 1: enable
 };
 
+struct TTIA
+{
+    unsigned char   server_addr[512];                   // Target server address
+    unsigned int    server_port;                        // Target server port
+    unsigned int    busVenderId;                        // Bus vender id, 0~65535
+    unsigned char   EquipmentProvider[16];              // EVSE vender max 15 bytes
+    unsigned char   TransportationCompanyNo;            // Data provider company number
+    unsigned char   ChargeBoxId;                        // 1 byte
+    unsigned char   evseStation[16];                    // UTF-8 15 bytes, Chinese 5 words
+    unsigned char   isEnableTTIA:1;                     // TTIA function enable
+};
+
 struct LocalSharingInfo
 {
     unsigned short      AvailableShargingCurrent;       // 0 ~ rating value amp,  Synchronize from local sharing server
@@ -425,6 +440,26 @@ typedef struct
     unsigned char PowerCabinetReserved[32];
 }WiringInfoData;
 
+typedef struct
+{
+    unsigned int isCalibratedVaGain:1;                  // Voltage phase a gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedVbGain:1;                  // Voltage phase b gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedVcGain:1;                  // Voltage phase c gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedVaOffset:1;                // Voltage phase a offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedVbOffset:1;                // Voltage phase b offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedVcOffset:1;                // Voltage phase c offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedCaGain:1;                  // Current phase a gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedCbGain:1;                  // Current phase b gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedCcGain:1;                  // Current phase c gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedCaOffset:1;                // Current phase a offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedCbOffset:1;                // Current phase b offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedCcOffset:1;                // Current phase c offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedPa:1;                      // Phase angle a is calibrated, 0: default  1: Calibrated
+    unsigned int isCalibratedPb:1;                      // Phase angle b gain is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedPc:1;                      // Phase angle c gain is calibrated, 0: default 1: Calibrated
+    unsigned int :1;
+}MeterIcCalibration;
+
 struct SysConfigData
 {
 	/**************System***************/
@@ -488,7 +523,8 @@ struct SysConfigData
 	unsigned char           isReqFirstUpgrade;          //EVSE is request first upgrade from PH server
 	unsigned char           isEnableLocalPowerSharging; //0: Disable power sharing  1: Enable power sharing
 	unsigned char           StopChargingByButton;       //0: Disable  1: Enable
-	struct LCD_OVERRIDE     LcdOveride;                 // LCD override info
+    struct LCD_OVERRIDE     LcdOveride;                 // LCD override info
+    struct TTIA             TTIA_Info;                  // TTIA configuration struct
 
     /************PowerCabinet************/
     WiringInfoData          WiringInfo;
@@ -584,6 +620,7 @@ struct ChargingInfoData
 	float 				ConnectorMaxVoltage;			// 0~6553.5 volt
 	float 				ConnectorMaxCurrent;			// 0~6553.5 volt
 	unsigned char 		ModelType;
+    MeterIcCalibration  meterIcCalInfo;
 };
 
 typedef union
@@ -4277,7 +4314,51 @@ struct StrcutSetUserPrice
     unsigned char   price[256];
 };
 
-struct StrcutRunningFinalCost
+struct ChargingPrice
+{
+    float kWhPrice;                                 // Price per kWh
+    float hourPrice;                                // Price per hour of charging
+    float flatFee;                                  // Flat fee for (part of) charging session
+};
+
+struct IdlePrice
+{
+    unsigned int graceMinutes;                      // Grace period in minutes before idle time is charged
+    float hourPrice;                                // Price per hour while idle
+};
+
+struct NextPeriod
+{
+    unsigned char atTime[36];                       // Time when these prices become active
+    struct ChargingPrice chargingPrice;             // Price components while charging
+    struct IdlePrice idlePrice;                     // Price components while idle. Optional if no idle fee charged.
+};
+
+struct Triggers
+{
+    unsigned char atTime[36];                       // Time when these prices become active
+    float atEnergykWh;                              // Consumed energy amount in kWh upon which a meter value must be sent
+    float atPowerkW;                                // Power threshold in kW when meter value must be sent when crossing in downward or upward direction. Can either
+                                                    // be used to trigger a meter value when vehicle stops charging or when vehicle charges at a high power that requires a
+                                                    // different tariff.
+                                                    // It is recommended to implement a hysteresis around this value to avoid repetitive triggers when the power fluctuates around this level.
+};
+
+struct StrcutRunningCost
+{
+    int                     txId;                   // Transaction to which this applies
+    unsigned char           timestamp[36];          // Timestamp of the meter value upon which this cost is based
+    unsigned int            meterValue;             // Meter value (Wh) upon which this cost is based
+    float                   cost;                   // Calculated total running cost
+    unsigned char           state[16];              // "Charging" or "Idle"
+    struct ChargingPrice    chargingPrice;          // Price components while charging
+    struct IdlePrice        idlePrice;              // (optional) Price components while not charging. Optional if no idle fee is charged.
+    struct NextPeriod       nextPeriod;             // (optional) Pricing for next period
+    struct Triggers         triggerMeterValue;      // (optional) Triggers to request a new meter value. Optional if no idle fee charged.
+    unsigned char           description[256];       // Compatible California pricing V1.0
+};
+
+struct StrcutFinalCost
 {
     int             txId;
     unsigned char   description[256];
@@ -4286,8 +4367,8 @@ struct StrcutRunningFinalCost
 struct StructCost
 {
     struct StrcutSetUserPrice       SetUserPrice;
-    struct StrcutRunningFinalCost   RunningCost[CONNECTOR_QUANTITY];
-    struct StrcutRunningFinalCost   FinalCost[CONNECTOR_QUANTITY];
+    struct StrcutRunningCost        RunningCost[CONNECTOR_QUANTITY];
+    struct StrcutFinalCost          FinalCost[CONNECTOR_QUANTITY];
 };
 
 struct CertificateHashDataType
@@ -4566,6 +4647,7 @@ struct OCPP16Data
     struct StructUpdateFirmware                     UpdateFirmware;
     struct OCPP16ConfigurationTable                 ConfigurationTable;
     struct StructChargingProfile                    SmartChargingProfile[CONNECTOR_QUANTITY];
+    struct StructChargingProfile                    MaxChargingProfile;
     struct StructCost                               Cost;
     struct StructCertificateSigned                  CertificateSigned;
     struct StructDeleteCertificate                  DeleteCertificate;
@@ -5950,6 +6032,7 @@ struct OCPP20Data
 	struct UnpublishFirmware_20					UnpublishFirmware;
 	struct UpdateFirmware_20					UpdateFirmware;
 	struct ChargingProfileType                  SmartChargingProfile[CONNECTOR_QUANTITY];
+	struct ChargingProfileType                  MaxChargingProfile;
 };
 
 

+ 4 - 4
EVSE/Projects/DD360Audi/Apps/ReadCmdline.c

@@ -1266,11 +1266,11 @@ int main(void)
     ShmSelectGunInfo = (SelectGunInfo *)GetShmSelectGunInfo();
     ShmDcCommonData = (DcCommonInfo *)GetShmDcCommonData();
 
-    for (_GunIndex = 0; _GunIndex < pSysConfig->TotalConnectorCount; _GunIndex++) {
-        pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(_GunIndex);
+//    for (_GunIndex = 0; _GunIndex < pSysConfig->TotalConnectorCount; _GunIndex++) {
+//        pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(_GunIndex);
 
-        pDcChargingInfo->SystemStatus = S_IDLE;
-    }
+//        pDcChargingInfo->SystemStatus = S_IDLE;
+//    }
 
     while (isContinue) {
         if (readCmdKey(CMD_KEY_WAIT) == NO) {

BIN
EVSE/Projects/DD360Audi/Images/ramdisk.gz


BIN
EVSE/Projects/DD360Audi/output/FactoryConfig


BIN
EVSE/Projects/DD360Audi/output/Module_DoComm


BIN
EVSE/Projects/DD360Audi/output/Module_EvComm


BIN
EVSE/Projects/DD360Audi/output/Module_EventLogging


BIN
EVSE/Projects/DD360Audi/output/Module_InternalComm


BIN
EVSE/Projects/DD360Audi/output/Module_LcmControl


BIN
EVSE/Projects/DD360Audi/output/Module_PrimaryComm


BIN
EVSE/Projects/DD360Audi/output/ReadCmdline


BIN
EVSE/Projects/DD360Audi/output/main


+ 1 - 1
EVSE/Projects/DD360ComBox/Apps/CSU/UpgradeFW.c

@@ -176,7 +176,7 @@ static int CheckUpdateProcess(void)
 
                                 if (pSysConfig->TotalConnectorCount == 1 &&
                                         ShmDcCommonData->CcsVersion == _CCS_VERSION_CHECK_TAG_V015S0) {
-                                    targetID += 1;
+                                    //targetID += 1;
                                 }
 
                                 system("echo 3 > /proc/sys/vm/drop_caches");

+ 1 - 1
EVSE/Projects/DD360ComBox/Apps/CSU/main.c

@@ -77,7 +77,7 @@ uint8_t bd0_2_status = 0;
 uint8_t bd1_1_status = 0;
 uint8_t bd1_2_status = 0;
 
-char *fwVersion = "V1.12.00.0000.00"; // "V0.16.00.0000.00";
+char *fwVersion = "V1.13.00.0000.00"; // "V0.16.00.0000.00";
 
 //sqlite3 *localDb;
 bool isDb_ready;

+ 87 - 4
EVSE/Projects/DD360ComBox/Apps/Define/define.h

@@ -293,6 +293,9 @@ enum CoreProfile {
      DefaultPrice,
      CustomDisplayCostAndPrice,
      CustomIdleFeeAfterStop,
+     TimeOffset,
+     NextTimeOffsetTransitionDateTime,
+     TimeOffsetNextTransition,
      ConfigurationVersion,
 	 _CoreProfile_CNT
 };
@@ -398,6 +401,18 @@ struct Schedule
 	unsigned char   isTriggerStop;    					// 0: disable; 1: enable
 };
 
+struct TTIA
+{
+    unsigned char   server_addr[512];                   // Target server address
+    unsigned int    server_port;                        // Target server port
+    unsigned int    busVenderId;                        // Bus vender id, 0~65535
+    unsigned char   EquipmentProvider[16];              // EVSE vender max 15 bytes
+    unsigned char   TransportationCompanyNo;            // Data provider company number
+    unsigned char   ChargeBoxId;                        // 1 byte
+    unsigned char   evseStation[16];                    // UTF-8 15 bytes, Chinese 5 words
+    unsigned char   isEnableTTIA:1;                     // TTIA function enable
+};
+
 struct LocalSharingInfo
 {
     unsigned short      AvailableShargingCurrent;       // 0 ~ rating value amp,  Synchronize from local sharing server
@@ -425,6 +440,26 @@ typedef struct
     unsigned char PowerCabinetReserved[32];
 }WiringInfoData;
 
+typedef struct
+{
+    unsigned int isCalibratedVaGain:1;                  // Voltage phase a gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedVbGain:1;                  // Voltage phase b gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedVcGain:1;                  // Voltage phase c gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedVaOffset:1;                // Voltage phase a offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedVbOffset:1;                // Voltage phase b offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedVcOffset:1;                // Voltage phase c offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedCaGain:1;                  // Current phase a gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedCbGain:1;                  // Current phase b gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedCcGain:1;                  // Current phase c gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedCaOffset:1;                // Current phase a offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedCbOffset:1;                // Current phase b offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedCcOffset:1;                // Current phase c offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedPa:1;                      // Phase angle a is calibrated, 0: default  1: Calibrated
+    unsigned int isCalibratedPb:1;                      // Phase angle b gain is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedPc:1;                      // Phase angle c gain is calibrated, 0: default 1: Calibrated
+    unsigned int :1;
+}MeterIcCalibration;
+
 struct SysConfigData
 {
 	/**************System***************/
@@ -488,7 +523,8 @@ struct SysConfigData
 	unsigned char           isReqFirstUpgrade;          //EVSE is request first upgrade from PH server
 	unsigned char           isEnableLocalPowerSharging; //0: Disable power sharing  1: Enable power sharing
 	unsigned char           StopChargingByButton;       //0: Disable  1: Enable
-	struct LCD_OVERRIDE     LcdOveride;                 // LCD override info
+    struct LCD_OVERRIDE     LcdOveride;                 // LCD override info
+    struct TTIA             TTIA_Info;                  // TTIA configuration struct
 
     /************PowerCabinet************/
     WiringInfoData          WiringInfo;
@@ -584,6 +620,7 @@ struct ChargingInfoData
 	float 				ConnectorMaxVoltage;			// 0~6553.5 volt
 	float 				ConnectorMaxCurrent;			// 0~6553.5 volt
 	unsigned char 		ModelType;
+    MeterIcCalibration  meterIcCalInfo;
 };
 
 typedef union
@@ -4277,7 +4314,51 @@ struct StrcutSetUserPrice
     unsigned char   price[256];
 };
 
-struct StrcutRunningFinalCost
+struct ChargingPrice
+{
+    float kWhPrice;                                 // Price per kWh
+    float hourPrice;                                // Price per hour of charging
+    float flatFee;                                  // Flat fee for (part of) charging session
+};
+
+struct IdlePrice
+{
+    unsigned int graceMinutes;                      // Grace period in minutes before idle time is charged
+    float hourPrice;                                // Price per hour while idle
+};
+
+struct NextPeriod
+{
+    unsigned char atTime[36];                       // Time when these prices become active
+    struct ChargingPrice chargingPrice;             // Price components while charging
+    struct IdlePrice idlePrice;                     // Price components while idle. Optional if no idle fee charged.
+};
+
+struct Triggers
+{
+    unsigned char atTime[36];                       // Time when these prices become active
+    float atEnergykWh;                              // Consumed energy amount in kWh upon which a meter value must be sent
+    float atPowerkW;                                // Power threshold in kW when meter value must be sent when crossing in downward or upward direction. Can either
+                                                    // be used to trigger a meter value when vehicle stops charging or when vehicle charges at a high power that requires a
+                                                    // different tariff.
+                                                    // It is recommended to implement a hysteresis around this value to avoid repetitive triggers when the power fluctuates around this level.
+};
+
+struct StrcutRunningCost
+{
+    int                     txId;                   // Transaction to which this applies
+    unsigned char           timestamp[36];          // Timestamp of the meter value upon which this cost is based
+    unsigned int            meterValue;             // Meter value (Wh) upon which this cost is based
+    float                   cost;                   // Calculated total running cost
+    unsigned char           state[16];              // "Charging" or "Idle"
+    struct ChargingPrice    chargingPrice;          // Price components while charging
+    struct IdlePrice        idlePrice;              // (optional) Price components while not charging. Optional if no idle fee is charged.
+    struct NextPeriod       nextPeriod;             // (optional) Pricing for next period
+    struct Triggers         triggerMeterValue;      // (optional) Triggers to request a new meter value. Optional if no idle fee charged.
+    unsigned char           description[256];       // Compatible California pricing V1.0
+};
+
+struct StrcutFinalCost
 {
     int             txId;
     unsigned char   description[256];
@@ -4286,8 +4367,8 @@ struct StrcutRunningFinalCost
 struct StructCost
 {
     struct StrcutSetUserPrice       SetUserPrice;
-    struct StrcutRunningFinalCost   RunningCost[CONNECTOR_QUANTITY];
-    struct StrcutRunningFinalCost   FinalCost[CONNECTOR_QUANTITY];
+    struct StrcutRunningCost        RunningCost[CONNECTOR_QUANTITY];
+    struct StrcutFinalCost          FinalCost[CONNECTOR_QUANTITY];
 };
 
 struct CertificateHashDataType
@@ -4566,6 +4647,7 @@ struct OCPP16Data
     struct StructUpdateFirmware                     UpdateFirmware;
     struct OCPP16ConfigurationTable                 ConfigurationTable;
     struct StructChargingProfile                    SmartChargingProfile[CONNECTOR_QUANTITY];
+    struct StructChargingProfile                    MaxChargingProfile;
     struct StructCost                               Cost;
     struct StructCertificateSigned                  CertificateSigned;
     struct StructDeleteCertificate                  DeleteCertificate;
@@ -5950,6 +6032,7 @@ struct OCPP20Data
 	struct UnpublishFirmware_20					UnpublishFirmware;
 	struct UpdateFirmware_20					UpdateFirmware;
 	struct ChargingProfileType                  SmartChargingProfile[CONNECTOR_QUANTITY];
+	struct ChargingProfileType                  MaxChargingProfile;
 };
 
 

+ 4 - 4
EVSE/Projects/DD360ComBox/Apps/ReadCmdline.c

@@ -1266,11 +1266,11 @@ int main(void)
     ShmSelectGunInfo = (SelectGunInfo *)GetShmSelectGunInfo();
     ShmDcCommonData = (DcCommonInfo *)GetShmDcCommonData();
 
-    for (_GunIndex = 0; _GunIndex < pSysConfig->TotalConnectorCount; _GunIndex++) {
-        pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(_GunIndex);
+//    for (_GunIndex = 0; _GunIndex < pSysConfig->TotalConnectorCount; _GunIndex++) {
+//        pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(_GunIndex);
 
-        pDcChargingInfo->SystemStatus = S_IDLE;
-    }
+//        pDcChargingInfo->SystemStatus = S_IDLE;
+//    }
 
     while (isContinue) {
         if (readCmdKey(CMD_KEY_WAIT) == NO) {

BIN
EVSE/Projects/DD360ComBox/Images/ramdisk.gz


BIN
EVSE/Projects/DD360ComBox/output/FactoryConfig


BIN
EVSE/Projects/DD360ComBox/output/Module_DoComm


BIN
EVSE/Projects/DD360ComBox/output/Module_EvComm


BIN
EVSE/Projects/DD360ComBox/output/Module_EventLogging


BIN
EVSE/Projects/DD360ComBox/output/Module_InternalComm


BIN
EVSE/Projects/DD360ComBox/output/Module_LcmControl


BIN
EVSE/Projects/DD360ComBox/output/Module_PrimaryComm


BIN
EVSE/Projects/DD360ComBox/output/ReadCmdline


BIN
EVSE/Projects/DD360ComBox/output/main


+ 65 - 67
EVSE/Projects/define.h

@@ -293,9 +293,9 @@ enum CoreProfile {
      DefaultPrice,
      CustomDisplayCostAndPrice,
      CustomIdleFeeAfterStop,
-	 TimeOffset,
-	 NextTimeOffsetTransitionDateTime,
-	 TimeOffsetNextTransition,
+     TimeOffset,
+     NextTimeOffsetTransitionDateTime,
+     TimeOffsetNextTransition,
      ConfigurationVersion,
 	 _CoreProfile_CNT
 };
@@ -383,9 +383,9 @@ struct LED
 
 struct LCD_OVERRIDE
 {
-	unsigned char			page_index;					// LCD override page index
-	unsigned char			duration;					// LCD override duration
-	unsigned char			isOverideReq:1;				// LCD override request
+    unsigned char           page_index;                 // LCD override page index
+    unsigned char           duration;                   // LCD override duration
+    unsigned char           isOverideReq:1;             // LCD override request
 };
 
 struct Schedule
@@ -403,14 +403,14 @@ struct Schedule
 
 struct TTIA
 {
-	unsigned char	server_addr[512];					// Target server address
-	unsigned int	server_port;						// Target server port
-	unsigned int	busVenderId;						// Bus vender id, 0~65535
-	unsigned char	EquipmentProvider[16];				// EVSE vender max 15 bytes
-	unsigned char	TransportationCompanyNo;			// Data provider company number
-	unsigned char 	ChargeBoxId;						// 1 byte
-	unsigned char	evseStation[16];					// UTF-8 15 bytes, Chinese 5 words
-	unsigned char	isEnableTTIA:1;						// TTIA function enable
+    unsigned char   server_addr[512];                   // Target server address
+    unsigned int    server_port;                        // Target server port
+    unsigned int    busVenderId;                        // Bus vender id, 0~65535
+    unsigned char   EquipmentProvider[16];              // EVSE vender max 15 bytes
+    unsigned char   TransportationCompanyNo;            // Data provider company number
+    unsigned char   ChargeBoxId;                        // 1 byte
+    unsigned char   evseStation[16];                    // UTF-8 15 bytes, Chinese 5 words
+    unsigned char   isEnableTTIA:1;                     // TTIA function enable
 };
 
 struct LocalSharingInfo
@@ -442,22 +442,22 @@ typedef struct
 
 typedef struct
 {
-	unsigned int isCalibratedVaGain:1;					// Voltage phase a gain is calibrated, 0: default	1: Calibrated
-	unsigned int isCalibratedVbGain:1;					// Voltage phase b gain is calibrated, 0: default	1: Calibrated
-	unsigned int isCalibratedVcGain:1;					// Voltage phase c gain is calibrated, 0: default	1: Calibrated
-	unsigned int isCalibratedVaOffset:1;				// Voltage phase a offset is calibrated, 0: default	1: Calibrated
-	unsigned int isCalibratedVbOffset:1;				// Voltage phase b offset is calibrated, 0: default	1: Calibrated
-	unsigned int isCalibratedVcOffset:1;				// Voltage phase c offset is calibrated, 0: default	1: Calibrated
-	unsigned int isCalibratedCaGain:1;					// Current phase a gain is calibrated, 0: default	1: Calibrated
-	unsigned int isCalibratedCbGain:1;					// Current phase b gain is calibrated, 0: default	1: Calibrated
-	unsigned int isCalibratedCcGain:1;					// Current phase c gain is calibrated, 0: default	1: Calibrated
-	unsigned int isCalibratedCaOffset:1;				// Current phase a offset is calibrated, 0: default	1: Calibrated
-	unsigned int isCalibratedCbOffset:1;				// Current phase b offset is calibrated, 0: default	1: Calibrated
-	unsigned int isCalibratedCcOffset:1;				// Current phase c offset is calibrated, 0: default	1: Calibrated
-	unsigned int isCalibratedPa:1;						// Phase angle a is calibrated, 0: default	1: Calibrated
-	unsigned int isCalibratedPb:1;						// Phase angle b gain is calibrated, 0: default	1: Calibrated
-	unsigned int isCalibratedPc:1;						// Phase angle c gain is calibrated, 0: default	1: Calibrated
-	unsigned int :1;
+    unsigned int isCalibratedVaGain:1;                  // Voltage phase a gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedVbGain:1;                  // Voltage phase b gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedVcGain:1;                  // Voltage phase c gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedVaOffset:1;                // Voltage phase a offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedVbOffset:1;                // Voltage phase b offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedVcOffset:1;                // Voltage phase c offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedCaGain:1;                  // Current phase a gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedCbGain:1;                  // Current phase b gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedCcGain:1;                  // Current phase c gain is calibrated, 0: default   1: Calibrated
+    unsigned int isCalibratedCaOffset:1;                // Current phase a offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedCbOffset:1;                // Current phase b offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedCcOffset:1;                // Current phase c offset is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedPa:1;                      // Phase angle a is calibrated, 0: default  1: Calibrated
+    unsigned int isCalibratedPb:1;                      // Phase angle b gain is calibrated, 0: default 1: Calibrated
+    unsigned int isCalibratedPc:1;                      // Phase angle c gain is calibrated, 0: default 1: Calibrated
+    unsigned int :1;
 }MeterIcCalibration;
 
 struct SysConfigData
@@ -523,8 +523,8 @@ struct SysConfigData
 	unsigned char           isReqFirstUpgrade;          //EVSE is request first upgrade from PH server
 	unsigned char           isEnableLocalPowerSharging; //0: Disable power sharing  1: Enable power sharing
 	unsigned char           StopChargingByButton;       //0: Disable  1: Enable
-	struct LCD_OVERRIDE		LcdOveride;					// LCD override info
-	struct TTIA				TTIA_Info;					// TTIA configuration struct
+    struct LCD_OVERRIDE     LcdOveride;                 // LCD override info
+    struct TTIA             TTIA_Info;                  // TTIA configuration struct
 
     /************PowerCabinet************/
     WiringInfoData          WiringInfo;
@@ -620,7 +620,7 @@ struct ChargingInfoData
 	float 				ConnectorMaxVoltage;			// 0~6553.5 volt
 	float 				ConnectorMaxCurrent;			// 0~6553.5 volt
 	unsigned char 		ModelType;
-	MeterIcCalibration  meterIcCalInfo;
+    MeterIcCalibration  meterIcCalInfo;
 };
 
 typedef union
@@ -843,18 +843,16 @@ typedef struct
     unsigned int SoftwareRestart;               // 1: SoftwareRestart, Other value: no effect
 }CabinetMiscCommand;
 
-
 typedef struct DC_METER_INFO
 {
-	double presetVoltage;				// resolution: 1.000v
-	double presentCurrent;			// resolution: 1.000a
-	double presentPower;				// resolution: 1.000kw
-	double totlizeImportEnergy;	// resolution: 1.000kwh
-	double totlizeExportEnergy;	// resolution: 1.000kwh
-	unsigned char LinkStatus;		// 0 = unknow ,1 = link , 2 miss link
+    double presetVoltage;                       // resolution: 1.000v
+    double presentCurrent;                      // resolution: 1.000a
+    double presentPower;                        // resolution: 1.000kw
+    double totlizeImportEnergy;                 // resolution: 1.000kwh
+    double totlizeExportEnergy;                 // resolution: 1.000kwh
+    unsigned char LinkStatus;                   // 0 = unknow ,1 = link , 2 miss link
 }DC_Meter_Info;
 
-
 struct SysInfoData
 {
 	/**************System***************/
@@ -4310,46 +4308,46 @@ struct StrcutSetUserPrice
 
 struct ChargingPrice
 {
-	float kWhPrice;									// Price per kWh
-	float hourPrice;								// Price per hour of charging
-	float flatFee;									// Flat fee for (part of) charging session
+    float kWhPrice;                                 // Price per kWh
+    float hourPrice;                                // Price per hour of charging
+    float flatFee;                                  // Flat fee for (part of) charging session
 };
 
 struct IdlePrice
 {
-	unsigned int graceMinutes;						// Grace period in minutes before idle time is charged
-	float hourPrice;								// Price per hour while idle
+    unsigned int graceMinutes;                      // Grace period in minutes before idle time is charged
+    float hourPrice;                                // Price per hour while idle
 };
 
 struct NextPeriod
 {
-	unsigned char atTime[36];						// Time when these prices become active
-	struct ChargingPrice chargingPrice;				// Price components while charging
-	struct IdlePrice idlePrice;						// Price components while idle. Optional if no idle fee charged.
+    unsigned char atTime[36];                       // Time when these prices become active
+    struct ChargingPrice chargingPrice;             // Price components while charging
+    struct IdlePrice idlePrice;                     // Price components while idle. Optional if no idle fee charged.
 };
 
 struct Triggers
 {
-	unsigned char atTime[36];						// Time when these prices become active
-	float atEnergykWh;								// Consumed energy amount in kWh upon which a meter value must be sent
-	float atPowerkW;								// Power threshold in kW when meter value must be sent when crossing in downward or upward direction. Can either
-													// be used to trigger a meter value when vehicle stops charging	or when vehicle charges at a high power that requires a
-													// different tariff.
-													// It is recommended to implement a hysteresis around this value to avoid repetitive triggers when the power fluctuates around this level.
+    unsigned char atTime[36];                       // Time when these prices become active
+    float atEnergykWh;                              // Consumed energy amount in kWh upon which a meter value must be sent
+    float atPowerkW;                                // Power threshold in kW when meter value must be sent when crossing in downward or upward direction. Can either
+                                                    // be used to trigger a meter value when vehicle stops charging or when vehicle charges at a high power that requires a
+                                                    // different tariff.
+                                                    // It is recommended to implement a hysteresis around this value to avoid repetitive triggers when the power fluctuates around this level.
 };
 
 struct StrcutRunningCost
 {
-    int             		txId;					// Transaction to which this applies
-    unsigned char   		timestamp[36];			// Timestamp of the meter value upon which this cost is based
-    unsigned int			meterValue;				// Meter value (Wh) upon which this cost is based
-    float					cost;					// Calculated total running cost
-    unsigned char			state[16];				// "Charging" or "Idle"
-    struct ChargingPrice	chargingPrice;			// Price components while charging
-    struct IdlePrice		idlePrice;				// (optional) Price components while not charging. Optional if no idle fee is charged.
-    struct NextPeriod 		nextPeriod;				// (optional) Pricing for next period
-    struct Triggers			triggerMeterValue;		// (optional) Triggers to request a new meter value. Optional if no idle fee charged.
-    unsigned char   		description[256];		// Compatible California pricing V1.0
+    int                     txId;                   // Transaction to which this applies
+    unsigned char           timestamp[36];          // Timestamp of the meter value upon which this cost is based
+    unsigned int            meterValue;             // Meter value (Wh) upon which this cost is based
+    float                   cost;                   // Calculated total running cost
+    unsigned char           state[16];              // "Charging" or "Idle"
+    struct ChargingPrice    chargingPrice;          // Price components while charging
+    struct IdlePrice        idlePrice;              // (optional) Price components while not charging. Optional if no idle fee is charged.
+    struct NextPeriod       nextPeriod;             // (optional) Pricing for next period
+    struct Triggers         triggerMeterValue;      // (optional) Triggers to request a new meter value. Optional if no idle fee charged.
+    unsigned char           description[256];       // Compatible California pricing V1.0
 };
 
 struct StrcutFinalCost
@@ -4361,8 +4359,8 @@ struct StrcutFinalCost
 struct StructCost
 {
     struct StrcutSetUserPrice       SetUserPrice;
-    struct StrcutRunningCost   		RunningCost[CONNECTOR_QUANTITY];
-    struct StrcutFinalCost   		FinalCost[CONNECTOR_QUANTITY];
+    struct StrcutRunningCost        RunningCost[CONNECTOR_QUANTITY];
+    struct StrcutFinalCost          FinalCost[CONNECTOR_QUANTITY];
 };
 
 struct CertificateHashDataType