浏览代码

2020-01-22 / Folus Wen

Actions:
1. Module_InterComm.c ShmOCPP16Data initial implement.

Files:
1. As follow commit history.
FolusWen 5 年之前
父节点
当前提交
2cab734484
共有 1 个文件被更改,包括 18 次插入0 次删除
  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)
 	{