﻿using System;

namespace GarminFmiLib.Commands
{
    class DataDestructor : Command, IDataDestructor
    {
        public DataDestructor(ISerialPacketWriter writer)
            : base(writer, 0x0230) { }

        public bool DataDeletion(int dataType)
        {
            var dataTypeBytes = BitConverter.GetBytes(dataType);
            var data = new byte[]
            {
                dataTypeBytes[0],
                dataTypeBytes[1],
                dataTypeBytes[2],
                dataTypeBytes[3]
            };

            return Write(data);
        }
    }
}
