using System;

namespace SL200_RTLogViewer.lib
{
	// Token: 0x02000031 RID: 49
	public class CCC150
	{
		// Token: 0x06000151 RID: 337 RVA: 0x00024EB8 File Offset: 0x000230B8
		public static CCC150Class SetData(byte[] data)
		{
			CCC150Class ccc150Class = new CCC150Class();
			ccc150Class.seq = Convert.ToInt32(data[0]);
			ccc150Class.source = Convert.ToInt32((int)(data[1] & 240));
			ccc150Class.destination = Convert.ToInt32((int)(data[1] & 15));
			bool flag = data[2] == 0;
			if (flag)
			{
				ccc150Class.atccode = "02";
			}
			else
			{
				bool flag2 = data[2] == 1;
				if (flag2)
				{
					ccc150Class.atccode = "01";
				}
				else
				{
					bool flag3 = data[2] == 2;
					if (flag3)
					{
						ccc150Class.atccode = "25";
					}
					else
					{
						bool flag4 = data[2] == 3;
						if (flag4)
						{
							ccc150Class.atccode = "40";
						}
						else
						{
							bool flag5 = data[2] == 4;
							if (flag5)
							{
								ccc150Class.atccode = "55";
							}
							else
							{
								bool flag6 = data[2] == 5;
								if (flag6)
								{
									ccc150Class.atccode = "65";
								}
								else
								{
									bool flag7 = data[2] == 6;
									if (flag7)
									{
										ccc150Class.atccode = "75";
									}
									else
									{
										bool flag8 = data[2] == 7;
										if (flag8)
										{
											ccc150Class.atccode = "DE";
										}
										else
										{
											bool flag9 = data[2] == 8;
											if (flag9)
											{
												ccc150Class.atccode = "DW";
											}
											else
											{
												ccc150Class.atccode = "-";
											}
										}
									}
								}
							}
						}
					}
				}
			}
			ccc150Class.trainspeed = Convert.ToInt32(data[3]);
			ccc150Class.atclimit = Convert.ToInt32(data[4]);
			ccc150Class.tachopulse = Convert.ToDouble((int)data[5] << 8 | (int)data[6]);
			ccc150Class.wheeldia = (int)(860U - (Convert.ToUInt32(data[7]) - 1U) * 5U);
			return ccc150Class;
		}
	}
}
