using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using skyscraper5.Skyscraper.IO;

namespace skyscraper5.Rds.Messages
{
    [RdsMessage(0x40,RdsMessageHeaderType.None)]
    class OdaConfigurationAndShortMessageCommand : RdsMessage
    {
        public OdaConfigurationAndShortMessageCommand(byte[] buffer)
        {
            MemoryStream ms = new MemoryStream(buffer, false);
            ApplicationGroupType = ms.ReadUInt8();
            AID = ms.ReadUInt16BE();
            BufferConfiguration = ms.ReadUInt8();
            Message = ms.ReadBytes(2);
            OdaDataInputTimeout = ms.ReadUInt8();
        }

        public byte OdaDataInputTimeout { get; private set; }

        public byte[] Message { get; private set; }

        public byte BufferConfiguration { get; private set; }

        public ushort AID { get; private set; }

        public byte ApplicationGroupType { get; private set; }
        
    }
}
