Browse Source

2020-01-22 / Folus Wen

Actions:
1. Module_InterComm.c ShmOCPP16Data initial implement.

Files:
1. As follow commit history.
FolusWen 5 years ago
parent
commit
2cab734484
1 changed files with 18 additions and 0 deletions
  1. 18 0
      EVSE/Projects/AW-Regular/Apps/Module_InternalComm.c

+ 18 - 0
EVSE/Projects/AW-Regular/Apps/Module_InternalComm.c

@@ -200,6 +200,24 @@ int InitShareMemory()
 		result = FAIL;
 	}
 
+	//Initial ShmOCPP16Data
+	if ((MeterSMId = shmget(ShmOcppModuleKey, sizeof(struct OCPP16Data),  0777)) < 0)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("shmget ShmOCPP16Data NG");
+		#endif
+		result = FAIL;
+	}
+	else if ((ShmOCPP16Data = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+	{
+		#ifdef SystemLogMessage
+		DEBUG_ERROR("shmat ShmOCPP16Data NG");
+		#endif
+		result = FAIL;
+	}
+	else
+	{}
+
 	//Initial ShmCharger
 	if ((MeterSMId = shmget(ShmChargerKey, sizeof(struct Charger), IPC_CREAT | 0777)) < 0)
 	{