Browse Source

2022-04-18 / Wendell

Actions
1. [add] shell customer code
2. [add] WebApiTrigger flag for ForceCharging
3. [add] misc command for default & user price string and receipt information
4. [add] AuthIdType

Files
1. As follow commit history
Wendell 2 years ago
parent
commit
a32dd8bc1d
2 changed files with 58 additions and 15 deletions
  1. 46 3
      EVSE/Projects/DO360/Apps/Config.h
  2. 12 12
      EVSE/Projects/define.h

+ 46 - 3
EVSE/Projects/DO360/Apps/Config.h

@@ -48,6 +48,7 @@ typedef unsigned char               byte;
 
 #define uSEC_VAL                    1000000
 #define mSEC_VAL                    1000
+#define MAX_GUN_QUANTITY            4
 #define MAX_GROUP_QUANTITY          4
 #define MAX_PSU_MODULE_QUANTITY     62
 #define MAX_MODULE_PER_GROUP        12
@@ -68,6 +69,10 @@ typedef unsigned char               byte;
 
 #define PARALLEL_RELAY_COUNT        6
 
+#define _PHIHONG_PRICE_SPLIT_KEY    ","
+#define _AUDI_PRICE_SPLIT_KEY       ";"
+#define _OIL_PRICE_SPLIT_KEY        "\n"
+
 // **********  Audi ********** //
 // Model Name: DOYC182000D2AD
 // Model Name: DDYC182V0UE2AD
@@ -346,6 +351,7 @@ enum _CUSTOMER_CODE
     _CUSTOMER_CODE_E4U          = 2,
     _CUSTOMER_CODE_UCar         = 3,
     _CUSTOMER_CODE_TCC          = 4,
+    _CUSTOMER_CODE_Oil          = 5,
 };
 
 #define STR_CABINET_ROLE_NONE       "Single"
@@ -418,7 +424,8 @@ typedef union
         unsigned int EnableForceCharging:1;         // 0: disable,                  1: enable force charging
         unsigned int StartForceCharging:1;          // 0: disable,                  1: start force charging
         unsigned int EnableReleaseAndExtend:1;      // 0: disable,                  1: enable Release And Extend when force charging
-        unsigned int res:29;
+        unsigned int WebApiTrigger:1;               // 0: no effect,                1: force charging is triggered by web api
+        unsigned int res:28;
     }bits;
 }ForceChargingControl;
 
@@ -941,6 +948,7 @@ typedef union
 #define MISC_DISP_CHANGE_LCM_INFO           0x00004000
 #define MISC_DISP_STATION_INFO              0x00008000
 #define MISC_DISP_TIME_OFFSET               0x00010000
+#define MISC_DISP_DEFAULT_PRICE_STRING      0x00020000
 
 typedef union
 {
@@ -965,7 +973,8 @@ typedef union
         unsigned int ChangeLcmInfo:1;                   // msic: 0x0107,    0: no request,  1: change lcm info request
         unsigned int ChargerStationInfo:1;              // msic: 0x0109,    0: no request,  1: charger station info request
         unsigned int TimeOffset:1;                      // msic: 0x0010,    0: no request,  1: time offset request
-        unsigned int res:15;
+        unsigned int DefaultPriceString:1;              // msic: 0x0010,    0: no request,  1: time offset request
+        unsigned int res:14;
     }bits;
 }DispenserMiscControl;
 
@@ -978,6 +987,8 @@ typedef union
 #define MISC_CONN_QRCODE_INFO               0x00000040
 #define MISC_CONN_FINAL_COST                0x00000080
 #define MISC_CONN_LINE_STATUS               0x00000100
+#define MISC_CONN_USER_PRICE_STRING         0x00000200
+#define MISC_CONN_RECEIPT                   0x00000400
 
 typedef union
 {
@@ -994,7 +1005,9 @@ typedef union
         unsigned int QRCodeRequest:1;                   // msic: 0x0108,    0: no request,  1: QR Code request
         unsigned int FinalCostRequest:1;                // msic: 0x010A,    0: no request,  1: Final Cost request
         unsigned int LineStatusRequest:1;               // msic: 0x010B,    0: no request,  1: Line Status request
-        unsigned int res:23;
+        unsigned int UserPriceStringRequest:1;          // msic: 0x010D,    0: no request,  1: User Price String request
+        unsigned int ReceiptRequest:1;                  // msic: 0x010E,    0: no request,  1: Receipt request
+        unsigned int res:21;
     }bits;
 }ConnectorMiscControl;
 
@@ -1115,6 +1128,35 @@ enum DeductResult
 #define STR_DEDUCT_PASS             "Deduct Pass"
 #define STR_DEDUCT_CANCEL           "PreAuth Cancel"
 #define STR_DEDUCT_PREAUTH          "PreAuth OK"
+
+typedef struct
+{
+    char DefaultPriceString[512];                   // default price string
+    char UserPriceString[MAX_GUN_QUANTITY][512];    // connector user price string
+    char ReceiptUrl[MAX_GUN_QUANTITY][512];         // connector receipt url
+}PriceReceiptInfoData;
+
+typedef enum
+{
+    _Type_Central           = 0x0,
+    _Type_eMAID             = 0x1,
+    _Type_ISO14443          = 0x2,
+    _Type_ISO15693          = 0x3,
+    _Type_KeyCode           = 0x4,
+    _Type_Local             = 0x5,
+    _Type_MacAddress        = 0x6,
+    _Type_NoAuthorization   = 0x7,
+}UserIdType;
+
+#define STR_ID_TYPE_CENTRAL             "Central"
+#define STR_ID_TYPE_EMAID               "eMAID"
+#define STR_ID_TYPE_ISO14443            "ISO14443"
+#define STR_ID_TYPE_ISO15693            "ISO15693"
+#define STR_ID_TYPE_KEYCODE             "KeyCode"
+#define STR_ID_TYPE_LOCAL               "Local"
+#define STR_ID_TYPE_MAC_ADDRESS         "MacAddress"
+#define STR_ID_TYPE_NO_AUTHORIZATION    "NoAuthorization"
+
 // ************************************************************************************************* //
 
 typedef struct
@@ -1137,6 +1179,7 @@ typedef struct
     DeductResultInfoData ReDeductReq;
     DeductResultInfoData ReaderStatus[MAX_GROUP_QUANTITY];
     LineApiStatusInfo LineApi;
+    PriceReceiptInfoData PriceAndReceiptInfo;
 }ChargerInfoData;
 
 #endif /* CONFIG_H_ */

+ 12 - 12
EVSE/Projects/define.h

@@ -187,7 +187,7 @@ Storage							0x0A200000-0x7FFFFFFF		1886 MB
 #define ShmOcpp20ModuleKey		1012
 #define ShmRelay2BdKey			1013
 #define ShmYesCustomKey         1014
-#define ShmOcppPHModuleKey		1015
+#define ShmOcppPHModuleKey      1015
 
 #define FaultCodeLength         5
 #define AlarmCodeLength         20
@@ -328,10 +328,10 @@ enum CoreProfile {
      MaintainServer,
      StatusNotificationPeriodically,
      StatusNotificationInterval,
-	 PreAuthAmount,
-	 isEnableLocalPowerSharing,
-	 PowerSharingServerIP,
-	 EVCCID_PREFIX,
+     PreAuthAmount,
+     isEnableLocalPowerSharing,
+     PowerSharingServerIP,
+     EVCCID_PREFIX,
      ConfigurationVersion,
 	 _CoreProfile_CNT
 };
@@ -345,10 +345,10 @@ enum OCPP_START_ID_TYPE {
     IdTokenType_Central=0,
     IdTokenType_eMAID,
     IdTokenType_ISO14443,
-	IdTokenType_ISO15693,
+    IdTokenType_ISO15693,
     IdTokenType_KeyCode,
     IdTokenType_Local,
-	IdTokenType_MacAddress,
+    IdTokenType_MacAddress,
     IdTokenType_NoAuthorization
 };
 /**************************************************************************************/
@@ -577,7 +577,7 @@ struct SysConfigData
 	struct LED				LedInfo;					// LED configuration info
 	unsigned char			ShowInformation;
 	unsigned char           isReqFirstUpgrade;          //EVSE is request first upgrade from PH server
-	unsigned char           isEnableLocalPowerSharing; //0: Disable power sharing  1: Master	2: Slave
+	unsigned char           isEnableLocalPowerSharing;  //0: Disable power sharing  1: Master   2: Slave
 	unsigned char           StopChargingByButton;       //0: Disable  1: Enable
     struct LCD_NOUSE        Legacy_LcdOveride;          // LCD override info (no use anymore)
     struct TTIA             TTIA_Info;                  // TTIA configuration struct
@@ -590,7 +590,7 @@ struct SysConfigData
     unsigned char           MaintainServerURL[512];             // ws: non-secure OCPP 1.6-J, wss: secure OCPP 1.6-J"
     unsigned char           MaintainServerSecurityProfile;      // Maintain server security profile 0~3
     unsigned char           MaintainServerSecurityPassword[41]; // Maintain server AuthorizationKey for security profile
-    unsigned char			PowerSharingServerIP[512];			// Local power sharing server ip address
+    unsigned char           PowerSharingServerIP[512];          // Local power sharing server ip address
 };
 
 struct ChargingInfoData
@@ -706,7 +706,7 @@ typedef struct
     unsigned char       AuthType;                       // 0: _AuthType_None,   1: _AuthType_RFID, 2: _AuthType_RemoteStart
     unsigned char       AuthResult;                     // 0: _AuthResult_None, 1: _AuthResult_Valid,   2: _AuthResult_Invalid
     unsigned char       AuthRequest;                    // 0: no request, 1: authorize request
-    unsigned char       res;
+    unsigned char       AuthIdType;
 }AuthorizingInfoData;
 
 typedef union
@@ -4452,7 +4452,7 @@ struct StrcutRunningCost
     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[1024];       // Compatible California pricing V1.0
+    unsigned char           description[1024];      // Compatible California pricing V1.0
 };
 
 struct StrcutFinalCost
@@ -5134,7 +5134,7 @@ struct ChargingScheduleType
 
 struct ChargingProfileType
 {
-	int id;											// Required. Id of ChargingProfile.
+	int id;											                // Required. Id of ChargingProfile.
 	unsigned short int stackLevel;									// Required. Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0.
 	unsigned char chargingProfilePurpose[36];						// Required. Defines the purpose of the schedule transferred by this profile
 	unsigned char chargingProfileKind[16];							// Required. Indicates the kind of schedule.