public void AssembleDataFromVehicle_ValidData_ValidOutput()
        {
            VehicleDataPacket result = ArrayConverter.AssembleDataFromVehicle(FakeVehicleBytePacket);

            Assert.Equal(Device.EncoderLeft, result.DeviceAddress);
            Assert.Equal(MessageCode.NoMessage, result.Code);
            Assert.Equal(int.MaxValue, result.Integers[0]);
            Assert.Equal(int.MinValue, result.Integers[1]);
            Assert.Equal(0, result.Integers[2]);
            Assert.Equal(100, result.Integers[3]);
            Assert.Equal(-100, result.Integers[4]);
        }
        public VehicleDataPacket Read()
        {
            byte[] receivedData = new byte[DataRequestSize];
            _device.Read(receivedData);

            VehicleDataPacket decodedData = ArrayConverter.AssembleDataFromVehicle(receivedData);

            if (decodedData.DeviceAddress != _address)
            {
                throw new InvalidDataException($"Expected data from {_address}. Addess stamp on datapacket was {decodedData.DeviceAddress}.");
            }

            return(decodedData);
        }