namespace InABox.DigitalMatter
{
    public class DMHelloResponse : DMMessage
    {
        public DMHelloResponse()
        {
            TimeStamp = SecondsSince2013UTC();
        }

        public override byte Type => 0x01;

        public uint TimeStamp { get; set; }

        public uint Flags { get; set; }

        protected override void DoEncode()
        {
            AddUInt32(TimeStamp);
            AddUInt32(Flags);
        }

        protected override void DoDecode()
        {
            TimeStamp = TakeUInt32();
            Flags = TakeUInt32();
        }
    }
}