

class MotController {

  void * m_handle;

public:
  void create1(int baseArbId) {
    m_handle = c_MotController_Create1(baseArbId);
  }

  std::tuple<ctre::phoenix::ErrorCode, int> getDeviceNumber() {
    int deviceNumber;
    auto __ret =  c_MotController_GetDeviceNumber(m_handle, &deviceNumber );
    return std::make_tuple(__ret, deviceNumber);
  }


  ctre::phoenix::ErrorCode setDemand(int mode, int demand0, int demand1) {
    
    auto __ret =  c_MotController_SetDemand(m_handle, mode, demand0, demand1 );
    return __ret;
  }


  void setNeutralMode(int neutralMode) {
    
     c_MotController_SetNeutralMode(m_handle, neutralMode );
    
  }


  void setSensorPhase(bool PhaseSensor) {
    
     c_MotController_SetSensorPhase(m_handle, PhaseSensor );
    
  }


  void setInverted(bool invert) {
    
     c_MotController_SetInverted(m_handle, invert );
    
  }


  ctre::phoenix::ErrorCode configOpenLoopRamp(double secondsFromNeutralToFull, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigOpenLoopRamp(m_handle, secondsFromNeutralToFull, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode configClosedLoopRamp(double secondsFromNeutralToFull, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigClosedLoopRamp(m_handle, secondsFromNeutralToFull, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode configPeakOutputForward(double percentOut, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigPeakOutputForward(m_handle, percentOut, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode configPeakOutputReverse(double percentOut, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigPeakOutputReverse(m_handle, percentOut, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode configNominalOutputForward(double percentOut, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigNominalOutputForward(m_handle, percentOut, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode configNominalOutputReverse(double percentOut, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigNominalOutputReverse(m_handle, percentOut, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode configNeutralDeadband(double percentDeadband, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigNeutralDeadband(m_handle, percentDeadband, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode configVoltageCompSaturation(double voltage, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigVoltageCompSaturation(m_handle, voltage, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode configVoltageMeasurementFilter(int filterWindowSamples, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigVoltageMeasurementFilter(m_handle, filterWindowSamples, timeoutMs );
    return __ret;
  }


  void enableVoltageCompensation(bool enable) {
    
     c_MotController_EnableVoltageCompensation(m_handle, enable );
    
  }


  std::tuple<ctre::phoenix::ErrorCode, double> getBusVoltage() {
    double voltage;
    auto __ret =  c_MotController_GetBusVoltage(m_handle, &voltage );
    return std::make_tuple(__ret, voltage);
  }


  std::tuple<ctre::phoenix::ErrorCode, double> getMotorOutputPercent() {
    double percentOutput;
    auto __ret =  c_MotController_GetMotorOutputPercent(m_handle, &percentOutput );
    return std::make_tuple(__ret, percentOutput);
  }


  std::tuple<ctre::phoenix::ErrorCode, double> getOutputCurrent() {
    double current;
    auto __ret =  c_MotController_GetOutputCurrent(m_handle, &current );
    return std::make_tuple(__ret, current);
  }


  std::tuple<ctre::phoenix::ErrorCode, double> getTemperature() {
    double temperature;
    auto __ret =  c_MotController_GetTemperature(m_handle, &temperature );
    return std::make_tuple(__ret, temperature);
  }


  ctre::phoenix::ErrorCode configSelectedFeedbackSensor(int feedbackDevice, int pidIdx, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigSelectedFeedbackSensor(m_handle, feedbackDevice, pidIdx, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode configRemoteFeedbackFilter(int deviceID, int remoteSensorSource, int remoteOrdinal, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigRemoteFeedbackFilter(m_handle, deviceID, remoteSensorSource, remoteOrdinal, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode configSensorTerm(int sensorTerm, int feedbackDevice, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigSensorTerm(m_handle, sensorTerm, feedbackDevice, timeoutMs );
    return __ret;
  }


  std::tuple<ctre::phoenix::ErrorCode, int> getSelectedSensorPosition(int pidIdx) {
    int param;
    auto __ret =  c_MotController_GetSelectedSensorPosition(m_handle, &param, pidIdx );
    return std::make_tuple(__ret, param);
  }


  std::tuple<ctre::phoenix::ErrorCode, int> getSelectedSensorVelocity(int pidIdx) {
    int param;
    auto __ret =  c_MotController_GetSelectedSensorVelocity(m_handle, &param, pidIdx );
    return std::make_tuple(__ret, param);
  }


  ctre::phoenix::ErrorCode setSelectedSensorPosition(int sensorPos, int pidIdx, int timeoutMs) {
    
    auto __ret =  c_MotController_SetSelectedSensorPosition(m_handle, sensorPos, pidIdx, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode setControlFramePeriod(int frame, int periodMs) {
    
    auto __ret =  c_MotController_SetControlFramePeriod(m_handle, frame, periodMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode setStatusFramePeriod(int frame, int periodMs, int timeoutMs) {
    
    auto __ret =  c_MotController_SetStatusFramePeriod(m_handle, frame, periodMs, timeoutMs );
    return __ret;
  }


  std::tuple<ctre::phoenix::ErrorCode, int> getStatusFramePeriod(int frame, int timeoutMs) {
    int periodMs;
    auto __ret =  c_MotController_GetStatusFramePeriod(m_handle, frame, &periodMs, timeoutMs );
    return std::make_tuple(__ret, periodMs);
  }


  ctre::phoenix::ErrorCode configVelocityMeasurementPeriod(int period, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigVelocityMeasurementPeriod(m_handle, period, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode configVelocityMeasurementWindow(int windowSize, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigVelocityMeasurementWindow(m_handle, windowSize, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode configForwardLimitSwitchSource(int type, int normalOpenOrClose, int deviceID, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigForwardLimitSwitchSource(m_handle, type, normalOpenOrClose, deviceID, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode configReverseLimitSwitchSource(int type, int normalOpenOrClose, int deviceID, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigReverseLimitSwitchSource(m_handle, type, normalOpenOrClose, deviceID, timeoutMs );
    return __ret;
  }


  void overrideLimitSwitchesEnable(bool enable) {
    
     c_MotController_OverrideLimitSwitchesEnable(m_handle, enable );
    
  }


  ctre::phoenix::ErrorCode configForwardSoftLimitThreshold(int forwardSensorLimit, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigForwardSoftLimitThreshold(m_handle, forwardSensorLimit, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode configReverseSoftLimitThreshold(int reverseSensorLimit, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigReverseSoftLimitThreshold(m_handle, reverseSensorLimit, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode configForwardSoftLimitEnable(bool enable, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigForwardSoftLimitEnable(m_handle, enable, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode configReverseSoftLimitEnable(bool enable, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigReverseSoftLimitEnable(m_handle, enable, timeoutMs );
    return __ret;
  }


  void overrideSoftLimitsEnable(bool enable) {
    
     c_MotController_OverrideSoftLimitsEnable(m_handle, enable );
    
  }


  ctre::phoenix::ErrorCode config_kP(int slotIdx, double value, int timeoutMs) {
    
    auto __ret =  c_MotController_Config_kP(m_handle, slotIdx, value, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode config_kI(int slotIdx, double value, int timeoutMs) {
    
    auto __ret =  c_MotController_Config_kI(m_handle, slotIdx, value, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode config_kD(int slotIdx, double value, int timeoutMs) {
    
    auto __ret =  c_MotController_Config_kD(m_handle, slotIdx, value, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode config_kF(int slotIdx, double value, int timeoutMs) {
    
    auto __ret =  c_MotController_Config_kF(m_handle, slotIdx, value, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode config_IntegralZone(int slotIdx, double izone, int timeoutMs) {
    
    auto __ret =  c_MotController_Config_IntegralZone(m_handle, slotIdx, izone, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode configAllowableClosedloopError(int slotIdx, int allowableClosedLoopError, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigAllowableClosedloopError(m_handle, slotIdx, allowableClosedLoopError, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode configMaxIntegralAccumulator(int slotIdx, double iaccum, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigMaxIntegralAccumulator(m_handle, slotIdx, iaccum, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode setIntegralAccumulator(double iaccum, int pidIdx, int timeoutMs) {
    
    auto __ret =  c_MotController_SetIntegralAccumulator(m_handle, iaccum, pidIdx, timeoutMs );
    return __ret;
  }


  std::tuple<ctre::phoenix::ErrorCode, int> getClosedLoopError(int pidIdx) {
    int closedLoopError;
    auto __ret =  c_MotController_GetClosedLoopError(m_handle, &closedLoopError, pidIdx );
    return std::make_tuple(__ret, closedLoopError);
  }


  std::tuple<ctre::phoenix::ErrorCode, double> getIntegralAccumulator(int pidIdx) {
    double iaccum;
    auto __ret =  c_MotController_GetIntegralAccumulator(m_handle, &iaccum, pidIdx );
    return std::make_tuple(__ret, iaccum);
  }


  std::tuple<ctre::phoenix::ErrorCode, double> getErrorDerivative(int pidIdx) {
    double derror;
    auto __ret =  c_MotController_GetErrorDerivative(m_handle, &derror, pidIdx );
    return std::make_tuple(__ret, derror);
  }


  ctre::phoenix::ErrorCode selectProfileSlot(int slotIdx, int pidIdx) {
    
    auto __ret =  c_MotController_SelectProfileSlot(m_handle, slotIdx, pidIdx );
    return __ret;
  }


  std::tuple<ctre::phoenix::ErrorCode, int> getActiveTrajectoryPosition() {
    int param;
    auto __ret =  c_MotController_GetActiveTrajectoryPosition(m_handle, &param );
    return std::make_tuple(__ret, param);
  }


  std::tuple<ctre::phoenix::ErrorCode, int> getActiveTrajectoryVelocity() {
    int param;
    auto __ret =  c_MotController_GetActiveTrajectoryVelocity(m_handle, &param );
    return std::make_tuple(__ret, param);
  }


  std::tuple<ctre::phoenix::ErrorCode, double> getActiveTrajectoryHeading() {
    double param;
    auto __ret =  c_MotController_GetActiveTrajectoryHeading(m_handle, &param );
    return std::make_tuple(__ret, param);
  }


  std::tuple<ctre::phoenix::ErrorCode, int, int, double> getActiveTrajectoryAll() {
    int vel;int pos;double heading;
    auto __ret =  c_MotController_GetActiveTrajectoryAll(m_handle, &vel, &pos, &heading );
    return std::make_tuple(__ret, vel, pos, heading);
  }


  ctre::phoenix::ErrorCode configMotionCruiseVelocity(int sensorUnitsPer100ms, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigMotionCruiseVelocity(m_handle, sensorUnitsPer100ms, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode configMotionAcceleration(int sensorUnitsPer100msPerSec, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigMotionAcceleration(m_handle, sensorUnitsPer100msPerSec, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode clearMotionProfileTrajectories() {
    
    auto __ret =  c_MotController_ClearMotionProfileTrajectories(m_handle );
    return __ret;
  }


  std::tuple<ctre::phoenix::ErrorCode, int> getMotionProfileTopLevelBufferCount() {
    int value;
    auto __ret =  c_MotController_GetMotionProfileTopLevelBufferCount(m_handle, &value );
    return std::make_tuple(__ret, value);
  }


  ctre::phoenix::ErrorCode pushMotionProfileTrajectory(double position, double velocity, double headingDeg, int profileSlotSelect, bool isLastPoint, bool zeroPos) {
    
    auto __ret =  c_MotController_PushMotionProfileTrajectory(m_handle, position, velocity, headingDeg, profileSlotSelect, isLastPoint, zeroPos );
    return __ret;
  }


  std::tuple<ctre::phoenix::ErrorCode, bool> isMotionProfileTopLevelBufferFull() {
    bool value;
    auto __ret =  c_MotController_IsMotionProfileTopLevelBufferFull(m_handle, &value );
    return std::make_tuple(__ret, value);
  }


  ctre::phoenix::ErrorCode processMotionProfileBuffer() {
    
    auto __ret =  c_MotController_ProcessMotionProfileBuffer(m_handle );
    return __ret;
  }


  std::tuple<ctre::phoenix::ErrorCode, int, int, int, bool, bool, bool, bool, int, int> getMotionProfileStatus() {
    int topBufferRem;int topBufferCnt;int btmBufferCnt;bool hasUnderrun;bool isUnderrun;bool activePointValid;bool isLast;int profileSlotSelect;int outputEnable;
    auto __ret =  c_MotController_GetMotionProfileStatus(m_handle, &topBufferRem, &topBufferCnt, &btmBufferCnt, &hasUnderrun, &isUnderrun, &activePointValid, &isLast, &profileSlotSelect, &outputEnable );
    return std::make_tuple(__ret, topBufferRem, topBufferCnt, btmBufferCnt, hasUnderrun, isUnderrun, activePointValid, isLast, profileSlotSelect, outputEnable);
  }


  ctre::phoenix::ErrorCode clearMotionProfileHasUnderrun(int timeoutMs) {
    
    auto __ret =  c_MotController_ClearMotionProfileHasUnderrun(m_handle, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode changeMotionControlFramePeriod(int periodMs) {
    
    auto __ret =  c_MotController_ChangeMotionControlFramePeriod(m_handle, periodMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode getLastError() {
    
    auto __ret =  c_MotController_GetLastError(m_handle );
    return __ret;
  }


  std::tuple<ctre::phoenix::ErrorCode, int> getFirmwareVersion() {
    int param0;
    auto __ret =  c_MotController_GetFirmwareVersion(m_handle, &param0 );
    return std::make_tuple(__ret, param0);
  }


  std::tuple<ctre::phoenix::ErrorCode, bool> hasResetOccurred() {
    bool param0;
    auto __ret =  c_MotController_HasResetOccurred(m_handle, &param0 );
    return std::make_tuple(__ret, param0);
  }


  ctre::phoenix::ErrorCode configSetCustomParam(int newValue, int paramIndex, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigSetCustomParam(m_handle, newValue, paramIndex, timeoutMs );
    return __ret;
  }


  std::tuple<ctre::phoenix::ErrorCode, int> configGetCustomParam(int paramIndex, int timoutMs) {
    int readValue;
    auto __ret =  c_MotController_ConfigGetCustomParam(m_handle, &readValue, paramIndex, timoutMs );
    return std::make_tuple(__ret, readValue);
  }


  ctre::phoenix::ErrorCode configSetParameter(int param, double value, int subValue, int ordinal, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigSetParameter(m_handle, param, value, subValue, ordinal, timeoutMs );
    return __ret;
  }


  std::tuple<ctre::phoenix::ErrorCode, double> configGetParameter(int param, int ordinal, int timeoutMs) {
    double value;
    auto __ret =  c_MotController_ConfigGetParameter(m_handle, param, &value, ordinal, timeoutMs );
    return std::make_tuple(__ret, value);
  }


  ctre::phoenix::ErrorCode configPeakCurrentLimit(int amps, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigPeakCurrentLimit(m_handle, amps, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode configPeakCurrentDuration(int milliseconds, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigPeakCurrentDuration(m_handle, milliseconds, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode configContinuousCurrentLimit(int amps, int timeoutMs) {
    
    auto __ret =  c_MotController_ConfigContinuousCurrentLimit(m_handle, amps, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode enableCurrentLimit(bool enable) {
    
    auto __ret =  c_MotController_EnableCurrentLimit(m_handle, enable );
    return __ret;
  }


  ctre::phoenix::ErrorCode setLastError(int error) {
    
    auto __ret =  c_MotController_SetLastError(m_handle, error );
    return __ret;
  }


  std::tuple<ctre::phoenix::ErrorCode, int> getAnalogIn() {
    int param;
    auto __ret =  c_MotController_GetAnalogIn(m_handle, &param );
    return std::make_tuple(__ret, param);
  }


  ctre::phoenix::ErrorCode setAnalogPosition(int newPosition, int timeoutMs) {
    
    auto __ret =  c_MotController_SetAnalogPosition(m_handle, newPosition, timeoutMs );
    return __ret;
  }


  std::tuple<ctre::phoenix::ErrorCode, int> getAnalogInRaw() {
    int param;
    auto __ret =  c_MotController_GetAnalogInRaw(m_handle, &param );
    return std::make_tuple(__ret, param);
  }


  std::tuple<ctre::phoenix::ErrorCode, int> getAnalogInVel() {
    int param;
    auto __ret =  c_MotController_GetAnalogInVel(m_handle, &param );
    return std::make_tuple(__ret, param);
  }


  std::tuple<ctre::phoenix::ErrorCode, int> getQuadraturePosition() {
    int param;
    auto __ret =  c_MotController_GetQuadraturePosition(m_handle, &param );
    return std::make_tuple(__ret, param);
  }


  ctre::phoenix::ErrorCode setQuadraturePosition(int newPosition, int timeoutMs) {
    
    auto __ret =  c_MotController_SetQuadraturePosition(m_handle, newPosition, timeoutMs );
    return __ret;
  }


  std::tuple<ctre::phoenix::ErrorCode, int> getQuadratureVelocity() {
    int param;
    auto __ret =  c_MotController_GetQuadratureVelocity(m_handle, &param );
    return std::make_tuple(__ret, param);
  }


  std::tuple<ctre::phoenix::ErrorCode, int> getPulseWidthPosition() {
    int param;
    auto __ret =  c_MotController_GetPulseWidthPosition(m_handle, &param );
    return std::make_tuple(__ret, param);
  }


  ctre::phoenix::ErrorCode setPulseWidthPosition(int newPosition, int timeoutMs) {
    
    auto __ret =  c_MotController_SetPulseWidthPosition(m_handle, newPosition, timeoutMs );
    return __ret;
  }


  std::tuple<ctre::phoenix::ErrorCode, int> getPulseWidthVelocity() {
    int param;
    auto __ret =  c_MotController_GetPulseWidthVelocity(m_handle, &param );
    return std::make_tuple(__ret, param);
  }


  std::tuple<ctre::phoenix::ErrorCode, int> getPulseWidthRiseToFallUs() {
    int param;
    auto __ret =  c_MotController_GetPulseWidthRiseToFallUs(m_handle, &param );
    return std::make_tuple(__ret, param);
  }


  std::tuple<ctre::phoenix::ErrorCode, int> getPulseWidthRiseToRiseUs() {
    int param;
    auto __ret =  c_MotController_GetPulseWidthRiseToRiseUs(m_handle, &param );
    return std::make_tuple(__ret, param);
  }


  std::tuple<ctre::phoenix::ErrorCode, int> getPinStateQuadA() {
    int param;
    auto __ret =  c_MotController_GetPinStateQuadA(m_handle, &param );
    return std::make_tuple(__ret, param);
  }


  std::tuple<ctre::phoenix::ErrorCode, int> getPinStateQuadB() {
    int param;
    auto __ret =  c_MotController_GetPinStateQuadB(m_handle, &param );
    return std::make_tuple(__ret, param);
  }


  std::tuple<ctre::phoenix::ErrorCode, int> getPinStateQuadIdx() {
    int param;
    auto __ret =  c_MotController_GetPinStateQuadIdx(m_handle, &param );
    return std::make_tuple(__ret, param);
  }


  std::tuple<ctre::phoenix::ErrorCode, int> isFwdLimitSwitchClosed() {
    int param;
    auto __ret =  c_MotController_IsFwdLimitSwitchClosed(m_handle, &param );
    return std::make_tuple(__ret, param);
  }


  std::tuple<ctre::phoenix::ErrorCode, int> isRevLimitSwitchClosed() {
    int param;
    auto __ret =  c_MotController_IsRevLimitSwitchClosed(m_handle, &param );
    return std::make_tuple(__ret, param);
  }


  std::tuple<ctre::phoenix::ErrorCode, int> getFaults() {
    int param;
    auto __ret =  c_MotController_GetFaults(m_handle, &param );
    return std::make_tuple(__ret, param);
  }


  std::tuple<ctre::phoenix::ErrorCode, int> getStickyFaults() {
    int param;
    auto __ret =  c_MotController_GetStickyFaults(m_handle, &param );
    return std::make_tuple(__ret, param);
  }


  ctre::phoenix::ErrorCode clearStickyFaults(int timeoutMs) {
    
    auto __ret =  c_MotController_ClearStickyFaults(m_handle, timeoutMs );
    return __ret;
  }


  ctre::phoenix::ErrorCode selectDemandType(bool enable) {
    
    auto __ret =  c_MotController_SelectDemandType(m_handle, enable );
    return __ret;
  }


  ctre::phoenix::ErrorCode setMPEOutput(int MpeOutput) {
    
    auto __ret =  c_MotController_SetMPEOutput(m_handle, MpeOutput );
    return __ret;
  }


  ctre::phoenix::ErrorCode enableHeadingHold(bool enable) {
    
    auto __ret =  c_MotController_EnableHeadingHold(m_handle, enable );
    return __ret;
  }


  std::tuple<ctre::phoenix::ErrorCode, int, int, int> getAnalogInAll() {
    int withOv;int raw;int vel;
    auto __ret =  c_MotController_GetAnalogInAll(m_handle, &withOv, &raw, &vel );
    return std::make_tuple(__ret, withOv, raw, vel);
  }


  std::tuple<ctre::phoenix::ErrorCode, int, int> getQuadratureSensor() {
    int pos;int vel;
    auto __ret =  c_MotController_GetQuadratureSensor(m_handle, &pos, &vel );
    return std::make_tuple(__ret, pos, vel);
  }


  std::tuple<ctre::phoenix::ErrorCode, int, int, int, int> getPulseWidthAll() {
    int pos;int vel;int riseToRiseUs;int riseToFallUs;
    auto __ret =  c_MotController_GetPulseWidthAll(m_handle, &pos, &vel, &riseToRiseUs, &riseToFallUs );
    return std::make_tuple(__ret, pos, vel, riseToRiseUs, riseToFallUs);
  }


  std::tuple<ctre::phoenix::ErrorCode, int, int, int> getQuadPinStates() {
    int quadA;int quadB;int quadIdx;
    auto __ret =  c_MotController_GetQuadPinStates(m_handle, &quadA, &quadB, &quadIdx );
    return std::make_tuple(__ret, quadA, quadB, quadIdx);
  }


  std::tuple<ctre::phoenix::ErrorCode, int, int> getLimitSwitchState() {
    int isFwdClosed;int isRevClosed;
    auto __ret =  c_MotController_GetLimitSwitchState(m_handle, &isFwdClosed, &isRevClosed );
    return std::make_tuple(__ret, isFwdClosed, isRevClosed);
  }


};