namespace Tinkerforge
{
    public static class EStepper
    {
        public static (int Acceleration, int Deacceleration) GetSpeedRamping(this BrickStepper stepper)
        {
            stepper.GetSpeedRamping(out int acceleration, out int deacceleration);
            return (acceleration, deacceleration);
        }

        public static (int CurrentVelocity, int CurrentPosition, int RemainingSteps, int StackVoltage, int
            ExternalVoltage, int CurrentConsumption) GetAllData(this BrickStepper stepper)
        {
            stepper.GetAllData(out int currentVelocity, out int currentPosition, out int remainingSteps,
                out int stackVoltage, out int externalVoltage, out int currentConsumption);
            return (currentVelocity, currentPosition, remainingSteps, stackVoltage, externalVoltage, currentConsumption);
        }

        public static (char Port, byte ProtocolVersion, byte[] FirmwareVersion, string Name) GetProtocol1BrickletName(
            this BrickStepper stepper, char port)
        {
            stepper.GetProtocol1BrickletName(port, out byte protocolVersion, out byte[] firmwareVersion, out string name);
            return (port, protocolVersion, firmwareVersion, name);
        }
    }
}
