private bool ProcessMessage_OBD(BlockMessage obd_msg, ref BlockMessage ResponseMessage) { bool bRet = false; switch ((ENUM_SID)obd_msg.GetSID()) { case ENUM_SID.ReadDiagnosticTroubleCodesByStatus: List <byte> in_list = obd_msg.GetDataList(); ReadDiagnosticTroubleCodesByStatus_OBD_StatusOfDTC = (uint)in_list.IndexOf(0); ReadDiagnosticTroubleCodesByStatus_OBD_GroupOfDTC = (uint)in_list.IndexOf(1) + ((uint)in_list.IndexOf(2)) << 8; PrepareResponse_ReadDiagnosticTroubleCodesByStatus_OBD(obd_msg, ref ResponseMessage); bRet = true; break; case ENUM_SID.StartCommunication: PrepareResponse_StartCommunication_OBD(obd_msg, ref ResponseMessage); bRet = true; break; case ENUM_SID.StopCommunication: PrepareResponse_StopCommunication_OBD(obd_msg, ref ResponseMessage); bRet = true; break; default: break; } return(bRet); }