|
@@ -1484,6 +1484,7 @@ int main(int argc, char *argv[]) {
|
|
|
struct json_object *EvBatterySoc[3];
|
|
|
struct json_object *SystemStatus[3];
|
|
|
struct json_object *EvBatterytargetCurrent[3];
|
|
|
+ struct json_object *PowerConsumption[3];
|
|
|
/* for DO & DD*/
|
|
|
struct json_object *DDChargingInfo1;
|
|
|
struct json_object *DDChargingInfo2;
|
|
@@ -1505,6 +1506,7 @@ int main(int argc, char *argv[]) {
|
|
|
struct json_object *DDEvBatterySoc[4];
|
|
|
struct json_object *DDSystemStatus[4];
|
|
|
struct json_object *DDEvBatterytargetCurrent[4];
|
|
|
+ struct json_object *DDPowerConsumption[4];
|
|
|
|
|
|
//network
|
|
|
struct json_object *InternetConn;
|
|
@@ -1756,6 +1758,7 @@ int main(int argc, char *argv[]) {
|
|
|
else{
|
|
|
ConnectorTemp[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].ConnectorTemp-60);
|
|
|
}
|
|
|
+ PowerConsumption[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PowerConsumption);
|
|
|
CcsGunQty++;
|
|
|
}
|
|
|
else if(connectorType1 == 2){//GB
|
|
@@ -1781,6 +1784,7 @@ int main(int argc, char *argv[]) {
|
|
|
else{
|
|
|
ConnectorTemp[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].ConnectorTemp-60);
|
|
|
}
|
|
|
+ PowerConsumption[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PowerConsumption);
|
|
|
GbGunQty++;
|
|
|
}
|
|
|
else if(connectorType1 == 3){//CHAdeMO
|
|
@@ -1806,6 +1810,7 @@ int main(int argc, char *argv[]) {
|
|
|
else{
|
|
|
ConnectorTemp[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].ConnectorTemp-60);
|
|
|
}
|
|
|
+ PowerConsumption[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PowerConsumption);
|
|
|
CHAdeMOGunQty++;
|
|
|
}
|
|
|
else if(connectorType1 == 4){//AC
|
|
@@ -1825,6 +1830,7 @@ int main(int argc, char *argv[]) {
|
|
|
StopDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StopDateTime);
|
|
|
StartMethod[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartMethod);
|
|
|
ConnectorTemp[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].ConnectorTemp);
|
|
|
+ PowerConsumption[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PowerConsumption);
|
|
|
AcGunQty++;
|
|
|
}
|
|
|
}
|
|
@@ -1852,6 +1858,7 @@ int main(int argc, char *argv[]) {
|
|
|
else{
|
|
|
ConnectorTemp[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].ConnectorTemp-60);
|
|
|
}
|
|
|
+ PowerConsumption[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PowerConsumption);
|
|
|
CcsGunQty++;
|
|
|
}
|
|
|
else if(connectorType2 == 2){//GB
|
|
@@ -1877,6 +1884,7 @@ int main(int argc, char *argv[]) {
|
|
|
else{
|
|
|
ConnectorTemp[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].ConnectorTemp-60);
|
|
|
}
|
|
|
+ PowerConsumption[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PowerConsumption);
|
|
|
GbGunQty++;
|
|
|
}
|
|
|
else if(connectorType2 == 3){//CHAdeMO
|
|
@@ -1902,6 +1910,7 @@ int main(int argc, char *argv[]) {
|
|
|
else{
|
|
|
ConnectorTemp[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].ConnectorTemp-60);
|
|
|
}
|
|
|
+ PowerConsumption[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PowerConsumption);
|
|
|
CHAdeMOGunQty++;
|
|
|
}
|
|
|
else if(connectorType2 == 4){//AC
|
|
@@ -1921,6 +1930,7 @@ int main(int argc, char *argv[]) {
|
|
|
StopDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StopDateTime);
|
|
|
StartMethod[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartMethod);
|
|
|
ConnectorTemp[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].ConnectorTemp);
|
|
|
+ PowerConsumption[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PowerConsumption);
|
|
|
AcGunQty++;
|
|
|
}
|
|
|
}
|
|
@@ -1948,6 +1958,7 @@ int main(int argc, char *argv[]) {
|
|
|
else{
|
|
|
ConnectorTemp[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].ConnectorTemp-60);
|
|
|
}
|
|
|
+ PowerConsumption[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PowerConsumption);
|
|
|
CcsGunQty++;
|
|
|
}
|
|
|
else if(connectorType3 == 2){//GB
|
|
@@ -1973,6 +1984,7 @@ int main(int argc, char *argv[]) {
|
|
|
else{
|
|
|
ConnectorTemp[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].ConnectorTemp-60);
|
|
|
}
|
|
|
+ PowerConsumption[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].PowerConsumption);
|
|
|
GbGunQty++;
|
|
|
}
|
|
|
else if(connectorType3 == 3){//CHAdeMO
|
|
@@ -1998,6 +2010,7 @@ int main(int argc, char *argv[]) {
|
|
|
else{
|
|
|
ConnectorTemp[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].ConnectorTemp-60);
|
|
|
}
|
|
|
+ PowerConsumption[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].PowerConsumption);
|
|
|
CHAdeMOGunQty++;
|
|
|
}
|
|
|
else if(connectorType3 == 4){//AC
|
|
@@ -2017,6 +2030,7 @@ int main(int argc, char *argv[]) {
|
|
|
StopDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StopDateTime);
|
|
|
StartMethod[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartMethod);
|
|
|
ConnectorTemp[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].ConnectorTemp);
|
|
|
+ PowerConsumption[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PowerConsumption);
|
|
|
AcGunQty++;
|
|
|
}
|
|
|
}
|
|
@@ -2046,6 +2060,7 @@ int main(int argc, char *argv[]) {
|
|
|
else{
|
|
|
ConnectorTemp[i] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[i].GeneralChargingData.ConnectorTemp-60);
|
|
|
}
|
|
|
+ DDPowerConsumption[i] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[i].GeneralChargingData.PowerConsumption);
|
|
|
}
|
|
|
}
|
|
|
//network
|
|
@@ -2255,6 +2270,7 @@ int main(int argc, char *argv[]) {
|
|
|
json_object_object_add(ChargingInfo1,"EvBatterySoc",EvBatterySoc[0]);
|
|
|
json_object_object_add(ChargingInfo1,"SystemStatus",SystemStatus[0]);
|
|
|
json_object_object_add(ChargingInfo1,"EvBatterytargetCurrent",EvBatterytargetCurrent[0]);
|
|
|
+ json_object_object_add(ChargingInfo1,"PowerConsumption",PowerConsumption[0]);
|
|
|
json_object_object_add(jobj2,"ChargingInfo1",ChargingInfo1);
|
|
|
}
|
|
|
if(connectorType2 != 0){
|
|
@@ -2274,6 +2290,7 @@ int main(int argc, char *argv[]) {
|
|
|
json_object_object_add(ChargingInfo2,"EvBatterySoc",EvBatterySoc[1]);
|
|
|
json_object_object_add(ChargingInfo2,"SystemStatus",SystemStatus[1]);
|
|
|
json_object_object_add(ChargingInfo2,"EvBatterytargetCurrent",EvBatterytargetCurrent[1]);
|
|
|
+ json_object_object_add(ChargingInfo2,"PowerConsumption",PowerConsumption[1]);
|
|
|
json_object_object_add(jobj2,"ChargingInfo2",ChargingInfo2);
|
|
|
}
|
|
|
if(connectorType3 != 0){
|
|
@@ -2293,6 +2310,7 @@ int main(int argc, char *argv[]) {
|
|
|
json_object_object_add(ChargingInfo3,"EvBatterySoc",EvBatterySoc[2]);
|
|
|
json_object_object_add(ChargingInfo3,"SystemStatus",SystemStatus[2]);
|
|
|
json_object_object_add(ChargingInfo3,"EvBatterytargetCurrent",EvBatterytargetCurrent[2]);
|
|
|
+ json_object_object_add(ChargingInfo3,"PowerConsumption",PowerConsumption[2]);
|
|
|
json_object_object_add(jobj2,"ChargingInfo3",ChargingInfo3);
|
|
|
}
|
|
|
if(strcmp(IsDO, "DO") == 0){
|
|
@@ -2319,6 +2337,7 @@ int main(int argc, char *argv[]) {
|
|
|
json_object_object_add(DDChargingInfo1,"EvBatterySoc",DDEvBatterySoc[0]);
|
|
|
json_object_object_add(DDChargingInfo1,"SystemStatus",DDSystemStatus[0]);
|
|
|
json_object_object_add(DDChargingInfo1,"EvBatterytargetCurrent",DDEvBatterytargetCurrent[0]);
|
|
|
+ json_object_object_add(DDChargingInfo1,"PowerConsumption",DDPowerConsumption[0]);
|
|
|
json_object_object_add(jobj2,"DDChargingInfo1",DDChargingInfo1);
|
|
|
}
|
|
|
if(DDTotalConnectorQuantity>1){
|
|
@@ -2338,6 +2357,7 @@ int main(int argc, char *argv[]) {
|
|
|
json_object_object_add(DDChargingInfo2,"EvBatterySoc",DDEvBatterySoc[1]);
|
|
|
json_object_object_add(DDChargingInfo2,"SystemStatus",DDSystemStatus[1]);
|
|
|
json_object_object_add(DDChargingInfo2,"EvBatterytargetCurrent",DDEvBatterytargetCurrent[1]);
|
|
|
+ json_object_object_add(DDChargingInfo2,"PowerConsumption",DDPowerConsumption[1]);
|
|
|
json_object_object_add(jobj2,"DDChargingInfo2",DDChargingInfo2);
|
|
|
}
|
|
|
if(DDTotalConnectorQuantity>2){
|
|
@@ -2357,6 +2377,7 @@ int main(int argc, char *argv[]) {
|
|
|
json_object_object_add(DDChargingInfo3,"EvBatterySoc",DDEvBatterySoc[2]);
|
|
|
json_object_object_add(DDChargingInfo3,"SystemStatus",DDSystemStatus[2]);
|
|
|
json_object_object_add(DDChargingInfo3,"EvBatterytargetCurrent",DDEvBatterytargetCurrent[2]);
|
|
|
+ json_object_object_add(DDChargingInfo3,"PowerConsumption",DDPowerConsumption[2]);
|
|
|
json_object_object_add(jobj2,"DDChargingInfo3",DDChargingInfo3);
|
|
|
}
|
|
|
if(DDTotalConnectorQuantity>3){
|
|
@@ -2376,6 +2397,7 @@ int main(int argc, char *argv[]) {
|
|
|
json_object_object_add(DDChargingInfo4,"EvBatterySoc",DDEvBatterySoc[3]);
|
|
|
json_object_object_add(DDChargingInfo4,"SystemStatus",DDSystemStatus[3]);
|
|
|
json_object_object_add(DDChargingInfo4,"EvBatterytargetCurrent",DDEvBatterytargetCurrent[3]);
|
|
|
+ json_object_object_add(DDChargingInfo4,"PowerConsumption",DDPowerConsumption[3]);
|
|
|
json_object_object_add(jobj2,"DDChargingInfo4",DDChargingInfo4);
|
|
|
}
|
|
|
}
|