for (int p = 3; p < cmnMsgIdsRYGbuses.Count; p++) { for (int i = 200; i < a5; i++) { if ((cmnMsgIdsRYGbuses[p] == CANMsgIdList[i].MsgId) && ((CANMsgIdList[i].Bus) == (Buses.CANBusRed) || (CANMsgIdList[i].Bus) == (Buses.CANBusYellow) || (CANMsgIdList[i].Bus) == (Buses.CANBusGreen) || (CANMsgIdList[i].Bus) == (Buses.CANBusOrange))) { for (int k = i + 1; k < b5; k++) { if ((cmnMsgIdsRYGbuses[p] == CANMsgIdList[k].MsgId) && ((CANMsgIdList[k].Bus) == (Buses.CANBusYellow)) && (CANMsgIdList[k].TimeStamp > CANMsgIdList[i].TimeStamp)) { for (int m = k + 1; m < c5; m++) { if ((cmnMsgIdsRYGbuses[p] == CANMsgIdList[m].MsgId) && ((CANMsgIdList[m].Bus) == (Buses.CANBusGreen)) && (CANMsgIdList[m].TimeStamp > CANMsgIdList[k].TimeStamp)) { //k = b5; //m = c5; for (int n = m + 1; n < d5; n++) { if ((cmnMsgIdsRYGbuses[p] == CANMsgIdList[n].MsgId) && ((CANMsgIdList[n].Bus) == (Buses.CANBusOrange)) && (CANMsgIdList[n].TimeStamp > CANMsgIdList[m].TimeStamp)) { //int i1 = i; int k1 = k; int m1 = m; for (int f = k + 1; f < m; f++) { if ((CANMsgIdList[i].MsgId == CANMsgIdList[f].MsgId)) { if ((CANMsgIdList[f].Bus) == (Buses.CANBusYellow)) { buffer1.Add(f); q6++; } if ((CANMsgIdList[f].Bus) != (Buses.CANBusYellow)) { check6 = "Invalid bus"; } } } for (int f = i + 1; f < k; f++) { if ((CANMsgIdList[i].MsgId == CANMsgIdList[f].MsgId)) { if ((CANMsgIdList[f].Bus) == (Buses.CANBusRed)) { buffer2.Add(f); q6++; } if ((CANMsgIdList[f].Bus) != (Buses.CANBusRed)) { check6 = "Invalid bus"; } } } for (int f = m + 1; f < n; f++) { if ((CANMsgIdList[i].MsgId == CANMsgIdList[f].MsgId)) { if ((CANMsgIdList[f].Bus) == (Buses.CANBusGreen)) { buffer5.Add(f); q6++; } if ((CANMsgIdList[f].Bus) != (Buses.CANBusGreen)) { check6 = "Invalid bus"; } } } if (buffer1.Count != 0) { int largestVal = buffer1[0]; foreach (int temp in buffer1) { if (temp > largestVal) largestVal = temp; f6 = largestVal; } for (int z = f6 + 1; z < k; z++) { if ((CANMsgIdList[i].MsgId == CANMsgIdList[z].MsgId)) { buffer3.Add(z); } } buffer1.Clear(); } if (buffer2.Count != 0) { int largestVal = buffer2[0]; foreach (int temp in buffer3) { if (temp > largestVal) largestVal = temp; g6 = largestVal; } for (int z = g6 + 1; z < m; z++) { if ((CANMsgIdList[i].MsgId == CANMsgIdList[z].MsgId)) { buffer4.Add(z); } } buffer2.Clear(); } if (buffer5.Count != 0) { int largestVal = buffer5[0]; foreach (int temp in buffer3) { if (temp > largestVal) largestVal = temp; j6 = largestVal; } for (int z = j6 + 1; z < n; z++) { if ((CANMsgIdList[i].MsgId == CANMsgIdList[z].MsgId)) { buffer6.Add(z); } } buffer5.Clear(); } if ((buffer3.Count != 0) || (buffer4.Count != 0) || (check6 == "Invalid bus") || (buffer5.Count != 0)) { k = b5; m = c5; n = d5; check6 = null; buffer3.Clear(); buffer4.Clear(); buffer6.Clear(); } else { yellowTimeStampRYGOcmnMsgIds.Add(CANMsgIdList[k].TimeStamp); redTimeStampRYGOcmnMsgIds.Add(CANMsgIdList[i].TimeStamp); greenTimeStampRYGOcmnMsgIds.Add(CANMsgIdList[m].TimeStamp); orangeTimeStampRYGOcmnMsgIds.Add(CANMsgIdList[n].TimeStamp); GatewayRYGOmsgId.Add(CANMsgIdList[i].MsgId); k = b5; i = a5; m = c5; n = d5; } } } } } } } } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)