using System;

namespace SL200_RTLogViewer.lib
{
	// Token: 0x02000025 RID: 37
	public class ACPU202
	{
		// Token: 0x0600013F RID: 319 RVA: 0x00024370 File Offset: 0x00022570
		public static ACPU202Class SetData(byte[] data)
		{
			ACPU202Class acpu202Class = new ACPU202Class();
			acpu202Class.seq = Convert.ToInt32(data[0]);
			acpu202Class.sel = ((data[1] & 64) > 0);
			acpu202Class.kur = ((data[1] & 32) > 0);
			acpu202Class.osc = ((data[1] & 16) > 0);
			acpu202Class.twctxe = ((data[1] & 8) > 0);
			acpu202Class.inching = ((data[1] & 4) > 0);
			acpu202Class.tasc = ((data[1] & 2) > 0);
			acpu202Class.trainberth = ((data[1] & 1) > 0);
			acpu202Class.rlyfbe = ((data[2] & 128) > 0);
			acpu202Class.drcle = ((data[2] & 64) > 0);
			acpu202Class.drope = ((data[2] & 32) > 0);
			acpu202Class.stncodee = ((data[2] & 16) > 0);
			acpu202Class.majorover = ((data[2] & 8) > 0);
			acpu202Class.minorover = ((data[2] & 4) > 0);
			acpu202Class.majorbelow = ((data[2] & 2) > 0);
			acpu202Class.minorbelow = ((data[2] & 1) > 0);
			acpu202Class.atcdxl = ((data[3] & 128) > 0);
			acpu202Class.atcar = ((data[3] & 64) > 0);
			acpu202Class.prebr = ((data[3] & 128) > 0);
			acpu202Class.limitdr = ((data[3] & 64) > 0);
			acpu202Class.tascdb = ((data[3] & 32) > 0);
			acpu202Class.pg32miss = ((data[3] & 16) > 0);
			acpu202Class.pg2miss = ((data[3] & 8) > 0);
			acpu202Class.pg1miss = ((data[3] & 4) > 0);
			acpu202Class.atoante = ((data[3] & 2) > 0);
			acpu202Class.atostope = ((data[3] & 1) > 0);
			bool tasc = acpu202Class.tasc;
			if (tasc)
			{
				acpu202Class.dtg = Convert.ToDouble((int)data[4] << 8 | (int)data[5]) / 100.0;
			}
			else
			{
				acpu202Class.dtg = Convert.ToDouble((int)data[4] << 8 | (int)data[5]) / 10.0;
			}
			acpu202Class.liveoscf = Convert.ToDouble((int)(data[6] ^ 99) << 8 | (int)(data[7] ^ 100)) / 10.0;
			return acpu202Class;
		}
	}
}
