using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace skyscraper5.Rds.Messages
{
    [RdsMessage(0x0a,RdsMessageHeaderType.DsnPsnMel)]
    class RT : RdsMessage, IDsn, IPsn
    {
        public RT(byte[] buffer)
        {
            BufferConfiguration = (buffer[0] & 0x60) >> 5;
            NumberOfTransmissions = (buffer[0] & 0x1f);
            Text = Encoding.ASCII.GetString(buffer, 1, buffer.Length - 1);
        }

        public string Text { get; private set; }

        public int NumberOfTransmissions { get; private set; }

        public int BufferConfiguration { get; private set; }
        public byte DataSetNumber { get; set; }
        public byte ProgrammeServiceNumber { get; set; }
    }
}
