namespace QC.QMSLPhone;

public class LogCGPSPrescibedDwellResults : LogMessage
{
	private const int baseIndex = 16;

	private const int indexRespType = 1;

	private const int indexTotalPackets = 2;

	private const int indexPacketsNum = 6;

	private const int baseDwellBlockIndex = 26;

	private const int indexFlags = 5;

	private const int indexCno = 9;

	public LogCGPSPrescibedDwellResults(LogMessage msgVal)
		: base(msgVal.msgID, msgVal.message)
	{
	}

	public byte getRespType()
	{
		return message[27];
	}

	public byte getFlags()
	{
		if (message[17] == 0)
		{
			return message[31];
		}
		return 0;
	}

	public double getCNO()
	{
		if (message[17] == 0 && (getFlags() & 1) == 1)
		{
			double num = (int)getWord(35);
			return num / 10.0;
		}
		return 0.0;
	}
}
