123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- #ifndef ShareMemory_H
- #define ShareMemory_H
- struct AuthorizeRequest
- {
- unsigned char IdTag[20];
- };
- struct BootNotificationRequest{
- unsigned char CpVendor[20]; //chargePointVendor //mandatory
- unsigned char CpModel[20]; //chargePointModel //mandatory
- unsigned char CpSN[25]; //chargePointSerialNumber
- unsigned char CbSN[25]; //chargeBoxSerialNumber
- unsigned char CpFwVersion[50]; //firmwareVersion
- unsigned char CpIccid[20]; //iccid
- unsigned char CpImsi[20]; //imsi
- unsigned char CpMeterType[25]; //meterType
- unsigned char CpMeterSerialNumber[25]; //meterSerialNumber
- };
- struct DiagnosticsStatusNotificationRequest{
- unsigned char Status[16]; //Idle,Uploaded,UploadFailed,Uploading
- };
- struct StartTransactionRequest
- {
- int ConnectorId;
- unsigned char IdTag[20];
- int MeterStart;
- int ReservationId;
- unsigned char Timestamp[28];
- };
- struct StopTransactionRequest
- {
- unsigned char IdTag[20];
- int MeterStop;
- unsigned char Timestamp[28];
- int TransactionId;
- unsigned char StopReason; /* "EmergencyStop",
- "EVDisconnected",
- "HardReset",
- "Local",
- "Other",
- "PowerLoss",
- "Reboot",
- "Remote",
- "SoftReset",
- "UnlockCommand",
- "DeAuthorized"
- */
- struct StructMeterValue *TransactionData;
- };
- struct StatusNotificationRequest
- {
- int ConnectorId;
- unsigned char ErrorCode; /* "ConnectorLockFailure",
- "EVCommunicationError",
- "GroundFailure",
- "HighTemperature",
- "InternalError",
- "LocalListConflict",
- "NoError",
- "OtherError",
- "OverCurrentFailure",
- "PowerMeterFailure",
- "PowerSwitchFailure",
- "ReaderFailure",
- "ResetFailure",
- "UnderVoltage",
- "OverVoltage",
- "WeakSignal"
- */
- unsigned char Info[50];
- unsigned char Status; /* "Available",
- "Preparing",
- "Charging",
- "SuspendedEVSE",
- "SuspendedEV",
- "Finishing",
- "Reserved",
- "Unavailable",
- "Faulted"
- */
- unsigned char Timestamp[28];
- unsigned char VendorId[256];
- unsigned char VendorErrorCode[50];
- };
- struct AuthorizeResponse{
- unsigned char ExpiryDate[28];
- unsigned char ParentIdTag[20];
- unsigned char Status[16]; //Accepted, Blocked, Expired, Invalid, ConcurrentTx
- };
- struct BootNotificationResponse{
- unsigned char ResponseStatus[16]; //Accepted, Pending, Rejected
- unsigned char ResponseCurrentTime[28]; //currentTime //mandatory
- int ResponseHeartbeatInterval; //interval //mandatory
- };
- struct DataTransferResponse
- {
- unsigned char ResponseStatus[18]; //Accepted, Rejected,UnknownMessageId,UnknownVendorId
- unsigned char ResponseData[256];
- };
- struct HeartbeatResponse
- {
- unsigned char ResponseCurrentTime[28];
- };
- struct StartTransactionResponse
- {
- unsigned char ExpiryDate[28];
- unsigned char ParentIdTag[20];
- unsigned char Status[16]; //Accepted, Blocked, Expired, Invalid, ConcurrentTx
- int ResponseTransactionId;
- };
- struct StopTransactionResponse
- {
- unsigned char ExpiryDate[28];
- unsigned char ParentIdTag[20];
- unsigned char Status[16]; //Accepted, Blocked, Expired, Invalid, ConcurrentTx
- };
- //==========================================
- // Init all share memory
- //==========================================
- int InitShareMemory();
- int ProcessShareMemory();
- void CheckSystemValue(void);
- #endif
|