Class CANdle

java.lang.Object
com.ctre.phoenix.led.CANdle

@Deprecated(since="2026", forRemoval=true) public class CANdle extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
This device's Phoenix 5 API is deprecated for removal in the 2027 season. Users should update to Phoenix 6 firmware and migrate to the Phoenix 6 API. A migration guide is available at https://v6.docs.ctr-electronics.com/en/stable/docs/migration/migration-guide/index.html.

If the Phoenix 5 API must be used for this device, the device must have 22.X firmware. This firmware is available in Tuner X after selecting Phoenix 5 in the firmware year dropdown.

CTRE CANdle Device for controlling LEDs from the CAN bus.
 
 // Example usage of a CANdle
 CANdle candle = new CANdle(0); // creates a new CANdle with ID 0

 CANdleConfiguration config = new CANdleConfiguration();
 config.stripType = LEDStripType.RGB; // set the strip type to RGB
 config.brightnessScalar = 0.5; // dim the LEDs to half brightness
 candle.configAllSettings(config);

 candle.setLEDs(255, 255, 255); // set the CANdle LEDs to white

 // create a rainbow animation:
 // - max brightness
 // - half speed
 // - 64 LEDs
 RainbowAnimation rainbowAnim = new RainbowAnimation(1, 0.5, 64);
 candle.animate(rainbowAnim);

 ErrorCode error = candle.getLastError(); // gets the last error generated by the CANdle
 CANdleFaults faults = new CANdleFaults();
 ErrorCode faultsError = candle.getFaults(faults); // fills faults with the current CANdle faults; returns the last error generated
 
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Deprecated, for removal: This API element is subject to removal in a future version.
    The various LED types that the CANdle can support
    static enum 
    Deprecated, for removal: This API element is subject to removal in a future version.
    The various methods of managing the VBat output behavior
  • Constructor Summary

    Constructors
    Constructor
    Description
    CANdle(int deviceId)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructor for a CANdle Device
    CANdle(int deviceId, String canbus)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructor for a CANdle Device
  • Method Summary

    Modifier and Type
    Method
    Description
    animate(Animation animation)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Animates the CANdle with the passed-in animation If the animation changes after calling this function, it must be passed into animate again for the changes to take effect
    animate(Animation animation, int animSlot)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Animates the CANdle with the passed-in animation If the animation changes after calling this function, it must be passed into animate again for the changes to take effect
    clearAnimation(int animSlot)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Clears the animation occurring in the selected selected animSlot.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Clears the sticky faults.
    clearStickyFaults(int timeoutMs)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Clears the sticky faults.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Configures all persistent settings.
    configAllSettings(CANdleConfiguration allConfigs, int timeoutMs)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Configures all persistent settings.
    configBrightnessScalar(double brightness)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Configures the brightness scalar to be applied to every LED output.
    configBrightnessScalar(double brightness, int timeoutMs)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Configures the brightness scalar to be applied to every LED output.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Configures all persistent settings to defaults.
    configFactoryDefault(int timeoutMs)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Configures all persistent settings to defaults.
    int
    configGetCustomParam(int paramIndex)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the value of a custom parameter.
    int
    configGetCustomParam(int paramIndex, int timeoutMs)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the value of a custom parameter.
    double
    configGetParameter(ParamEnum param, int ordinal)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets a parameter.
    double
    configGetParameter(ParamEnum param, int ordinal, int timeoutMs)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets a parameter.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Configures the type of LED the CANdle controls
    configLEDType(CANdle.LEDStripType type, int timeoutMs)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Configures the type of LED the CANdle controls
    configLOSBehavior(boolean disableWhenLOS)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Configures what the CANdle should do if it loses communications to the Controller
    configLOSBehavior(boolean disableWhenLOS, int timeoutMs)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Configures what the CANdle should do if it loses communications to the Controller
    configSetCustomParam(int paramIndex, int value)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the value of a custom parameter.
    configSetCustomParam(int paramIndex, int value, int timeoutMs)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the value of a custom parameter.
    configSetParameter(ParamEnum param, double value, int subValue, int ordinal)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets a parameter.
    configSetParameter(ParamEnum param, double value, int subValue, int ordinal, int timeoutMs)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets a parameter.
    configStatusLedState(boolean disableWhenRunning)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Configures how the status led will behave when the CANdle is actively controlling LEDs If the CANdle is LOS or not actively commanded a value, it will always turn on its status LED.
    configStatusLedState(boolean disableWhenRunning, int timeoutMs)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Configures how the status led will behave when the CANdle is actively controlling LEDs If the CANdle is LOS or not actively commanded a value, it will always turn on its status LED.
    configV5Enabled(boolean enable5V)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Configures the enable state for the 5V rail.
    configV5Enabled(boolean enable5V, int timeoutMs)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Configures the enable state for the 5V rail.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Configures how the VBat Output will behave
    Deprecated, for removal: This API element is subject to removal in a future version.
    Configures how the VBat Output will behave
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    double
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the Voltage of the 5V line as measured by CANdle
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets all persistant settings.
    void
    getAllConfigs(CANdleConfiguration allConfigs, int timeoutMs)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets all persistant settings.
    double
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the Voltage of VBat as measured by CANdle
    double
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the low-side current as measured by CANdle
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the CANdle fault status
    Deprecated, for removal: This API element is subject to removal in a future version.
    Call GetLastError() generated by this object.
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the maximum number of simultaneous animations this version of CANdle firmware supports.
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the period of the given status frame.
    int
    getStatusFramePeriod(CANdleStatusFrame frame, int timeoutMs)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the period of the given status frame.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the CANdle sticky fault status
    double
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the temperature of the CANdle in Celcius
    double
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the applied vbat modulation in percent.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns true if the device has reset since last call.
    modulateVBatOutput(double dutyCyclePrcnt)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Modulates the VBat output to the specified duty cycle percentage This function will only do something if the CANdle's VBatOutput is configured to Modulated
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the period of the given control frame.
    setLEDs(int r, int g, int b)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets a block of LEDs to the specified color.
    setLEDs(int r, int g, int b, int w, int startIdx, int count)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets a block of LEDs to the specified color
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the period of the given status frame.
    setStatusFramePeriod(CANdleStatusFrame frame, int periodMs, int timeoutMs)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the period of the given status frame.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CANdle

      public CANdle(int deviceId, String canbus)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructor for a CANdle Device
      Parameters:
      deviceId - The Device ID of the CANdle
      canbus - Name of the CANbus; can be a SocketCAN interface (on Linux), or a CANivore device name or serial number
    • CANdle

      public CANdle(int deviceId)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructor for a CANdle Device
      Parameters:
      deviceId - The Device ID of the CANdle
  • Method Details

    • destroyObject

      Deprecated, for removal: This API element is subject to removal in a future version.
    • getBusVoltage

      public double getBusVoltage()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the Voltage of VBat as measured by CANdle
      Returns:
      Voltage of VBat
    • get5VRailVoltage

      public double get5VRailVoltage()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the Voltage of the 5V line as measured by CANdle
      Returns:
      Voltage of the 5V line
    • getCurrent

      public double getCurrent()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the low-side current as measured by CANdle
      Returns:
      Current in Amps
    • getTemperature

      public double getTemperature()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the temperature of the CANdle in Celcius
      Returns:
      Temperature in Celcius
    • getVBatModulation

      public double getVBatModulation()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the applied vbat modulation in percent. If the CANdle is configured to always enable VBat, this returns 1 If the CANdle is confgigured to always disable VBat, this returns 0 Otherwise it returns the last set Modulation as a value [0, 1]
      Returns:
      VBat Output Modulation
    • getMaxSimultaneousAnimationCount

      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the maximum number of simultaneous animations this version of CANdle firmware supports. If you specify an animation slot >= to this return, Phoenix will error out. You can also get the maximum count from a self-test snapshot.
      Returns:
      Maximum number of simultaneous animations this version of firmware supports.
    • animate

      public ErrorCode animate(Animation animation)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Animates the CANdle with the passed-in animation If the animation changes after calling this function, it must be passed into animate again for the changes to take effect
      Parameters:
      animation - The animation that CANdle will run. If this is null, it will clear the animation at the specified slot
      Returns:
      ErrorCode generated by function. OK indicates no error.
    • animate

      public ErrorCode animate(Animation animation, int animSlot)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Animates the CANdle with the passed-in animation If the animation changes after calling this function, it must be passed into animate again for the changes to take effect
      Parameters:
      animation - The animation that CANdle will run. If this is null, it will clear the animation at the specified slot
      animSlot - The animation slot to use for the animation, range is [0, getMaxSimultaneousAnimationCount()) exclusive
      Returns:
      ErrorCode generated by function. OK indicates no error.
    • clearAnimation

      public ErrorCode clearAnimation(int animSlot)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Clears the animation occurring in the selected selected animSlot.
      Parameters:
      animSlot - Animation slot to clear
      Returns:
      ErrorCode generated by function. OK indicates no error.
    • setLEDs

      public ErrorCode setLEDs(int r, int g, int b, int w, int startIdx, int count)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets a block of LEDs to the specified color
      Parameters:
      r - The amount of Red to set, range is [0, 255]
      g - The amount of Green to set, range is [0, 255]
      b - The amount of Blue to set, range is [0, 255]
      w - The amount of White to set, range is [0, 255]. This only applies for LED strips with white in them.
      startIdx - Where to start setting the LEDs
      count - The number of LEDs to apply this to
      Returns:
      ErrorCode generated by function. OK indicates no error.
    • setLEDs

      public ErrorCode setLEDs(int r, int g, int b)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets a block of LEDs to the specified color.
      Parameters:
      r - The amount of Red to set, range is [0, 255]
      g - The amount of Green to set, range is [0, 255]
      b - The amount of Blue to set, range is [0, 255]
      Returns:
      ErrorCode generated by function. OK indicates no error.
    • modulateVBatOutput

      public ErrorCode modulateVBatOutput(double dutyCyclePrcnt)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Modulates the VBat output to the specified duty cycle percentage This function will only do something if the CANdle's VBatOutput is configured to Modulated
      Parameters:
      dutyCyclePrcnt - The duty cycle of the output modulation [0, 1]
      Returns:
      ErrorCode generated by function. OK indicates no error.
    • configLOSBehavior

      public ErrorCode configLOSBehavior(boolean disableWhenLOS, int timeoutMs)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Configures what the CANdle should do if it loses communications to the Controller
      Parameters:
      disableWhenLOS - Set to true to disable the LEDs on Loss of Signal.
      timeoutMs - Timeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
      Returns:
      ErrorCode generated by function. OK indicates no error.
    • configLOSBehavior

      public ErrorCode configLOSBehavior(boolean disableWhenLOS)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Configures what the CANdle should do if it loses communications to the Controller
      Parameters:
      disableWhenLOS - Set to true to disable the LEDs on Loss of Signal.
      Returns:
      ErrorCode generated by function. OK indicates no error.
    • configLEDType

      public ErrorCode configLEDType(CANdle.LEDStripType type, int timeoutMs)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Configures the type of LED the CANdle controls
      Parameters:
      type - The type of the LEDs the CANdle controls
      timeoutMs - Timeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
      Returns:
      ErrorCode generated by function. OK indicates no error.
    • configLEDType

      Deprecated, for removal: This API element is subject to removal in a future version.
      Configures the type of LED the CANdle controls
      Parameters:
      type - The type of the LEDs the CANdle controls
      Returns:
      ErrorCode generated by function. OK indicates no error.
    • configBrightnessScalar

      public ErrorCode configBrightnessScalar(double brightness, int timeoutMs)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Configures the brightness scalar to be applied to every LED output. This value is bounded to [0, 1]. Setting this to 1 will allow the LEDs to function at max brightness. Setting this to 0.5 will scale all values to half their applied value. Setting this to 0 will turn off the LEDs. Forcing the LEDs off this way may be useful in certain testing circumstances but is generally not necessary. Self-test (Tuner) may be used to verify what the effective scalar is in case user forgot to restore the scalar to a non-zero value.
      Parameters:
      brightness - Value from [0, 1] that will scale the LED output.
      timeoutMs - Timeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
      Returns:
      Error Code generated by function. 0 indicates no error.
    • configBrightnessScalar

      public ErrorCode configBrightnessScalar(double brightness)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Configures the brightness scalar to be applied to every LED output. This value is bounded to [0, 1]. Setting this to 1 will allow the LEDs to function at max brightness. Setting this to 0.5 will scale all values to half their applied value. Setting this to 0 will turn off the LEDs. Forcing the LEDs off this way may be useful in certain testing circumstances but is generally not necessary. Self-test (Tuner) may be used to verify what the effective scalar is in case user forgot to restore the scalar to a non-zero value.
      Parameters:
      brightness - Value from [0, 1] that will scale the LED output.
      Returns:
      Error Code generated by function. 0 indicates no error.
    • configStatusLedState

      public ErrorCode configStatusLedState(boolean disableWhenRunning, int timeoutMs)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Configures how the status led will behave when the CANdle is actively controlling LEDs If the CANdle is LOS or not actively commanded a value, it will always turn on its status LED.
      Parameters:
      disableWhenRunning - Disables the status LED when the CANdle is running
      timeoutMs - Timeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
      Returns:
      Error Code generated by function. 0 indicates no error.
    • configStatusLedState

      public ErrorCode configStatusLedState(boolean disableWhenRunning)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Configures how the status led will behave when the CANdle is actively controlling LEDs If the CANdle is LOS or not actively commanded a value, it will always turn on its status LED.
      Parameters:
      disableWhenRunning - Disables the status LED when the CANdle is running
      Returns:
      Error Code generated by function. 0 indicates no error.
    • configVBatOutput

      public ErrorCode configVBatOutput(CANdle.VBatOutputMode mode, int timeoutMs)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Configures how the VBat Output will behave
      Parameters:
      mode - VBat Output Behavior
      timeoutMs - Timeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
      Returns:
      Error Code generated by function. 0 indicates no error.
    • configVBatOutput

      Deprecated, for removal: This API element is subject to removal in a future version.
      Configures how the VBat Output will behave
      Parameters:
      mode - VBat Output Behavior
      Returns:
      Error Code generated by function. 0 indicates no error.
    • configV5Enabled

      public ErrorCode configV5Enabled(boolean enable5V, int timeoutMs)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Configures the enable state for the 5V rail. This also affects the on-board LEDs.
      Parameters:
      enable5V - True to enable the 5V rail.
      timeoutMs - Timeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
      Returns:
      ErrorCode generated by function. OK indicates no error.
    • configV5Enabled

      public ErrorCode configV5Enabled(boolean enable5V)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Configures the enable state for the 5V rail. This also disables the on-board LEDs.
      Parameters:
      enable5V - True to enable the 5V rail.
      Returns:
      ErrorCode generated by function. OK indicates no error.
    • configGetParameter

      public double configGetParameter(ParamEnum param, int ordinal, int timeoutMs)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets a parameter. Generally this is not used. This can be utilized in - Using new features without updating API installation. - Errata workarounds to circumvent API implementation. - Allows for rapid testing / unit testing of firmware.
      Parameters:
      param - Parameter enumeration.
      ordinal - Ordinal of parameter.
      timeoutMs - Timeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
      Returns:
      Value of parameter.
    • configGetParameter

      public double configGetParameter(ParamEnum param, int ordinal)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets a parameter. Generally this is not used. This can be utilized in - Using new features without updating API installation. - Errata workarounds to circumvent API implementation. - Allows for rapid testing / unit testing of firmware.
      Parameters:
      param - Parameter enumeration.
      ordinal - Ordinal of parameter.
      Returns:
      Value of parameter.
    • configSetParameter

      public ErrorCode configSetParameter(ParamEnum param, double value, int subValue, int ordinal, int timeoutMs)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets a parameter. Generally this is not used. This can be utilized in - Using new features without updating API installation. - Errata workarounds to circumvent API implementation. - Allows for rapid testing / unit testing of firmware.
      Parameters:
      param - Parameter enumeration.
      value - Value of parameter.
      subValue - Subvalue for parameter. Maximum value of 255.
      ordinal - Ordinal of parameter.
      timeoutMs - Timeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
      Returns:
      Error Code generated by function. 0 indicates no error.
    • configSetParameter

      public ErrorCode configSetParameter(ParamEnum param, double value, int subValue, int ordinal)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets a parameter. Generally this is not used. This can be utilized in - Using new features without updating API installation. - Errata workarounds to circumvent API implementation. - Allows for rapid testing / unit testing of firmware.
      Parameters:
      param - Parameter enumeration.
      value - Value of parameter.
      subValue - Subvalue for parameter. Maximum value of 255.
      ordinal - Ordinal of parameter.
      Returns:
      Error Code generated by function. 0 indicates no error.
    • configGetCustomParam

      public int configGetCustomParam(int paramIndex, int timeoutMs)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the value of a custom parameter. This is for arbitrary use. Sometimes it is necessary to save calibration/duty cycle/output information in the device. Particularly if the device is part of a subsystem that can be replaced.
      Parameters:
      paramIndex - Index of custom parameter. [0-1]
      timeoutMs - Timeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
      Returns:
      Value of the custom param.
    • configGetCustomParam

      public int configGetCustomParam(int paramIndex)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the value of a custom parameter. This is for arbitrary use. Sometimes it is necessary to save calibration/duty cycle/output information in the device. Particularly if the device is part of a subsystem that can be replaced.
      Parameters:
      paramIndex - Index of custom parameter. [0-1]
      Returns:
      Value of the custom param.
    • configSetCustomParam

      public ErrorCode configSetCustomParam(int paramIndex, int value, int timeoutMs)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the value of a custom parameter. This is for arbitrary use. Sometimes it is necessary to save calibration/duty cycle/output information in the device. Particularly if the device is part of a subsystem that can be replaced.
      Parameters:
      paramIndex - Index of custom parameter. [0-1]
      value - Value for custom parameter.
      timeoutMs - Timeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
      Returns:
      Error Code generated by function. 0 indicates no error.
    • configSetCustomParam

      public ErrorCode configSetCustomParam(int paramIndex, int value)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the value of a custom parameter. This is for arbitrary use. Sometimes it is necessary to save calibration/duty cycle/output information in the device. Particularly if the device is part of a subsystem that can be replaced.
      Parameters:
      paramIndex - Index of custom parameter. [0-1]
      value - Value for custom parameter.
      Returns:
      Error Code generated by function. 0 indicates no error.
    • configFactoryDefault

      public ErrorCode configFactoryDefault(int timeoutMs)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Configures all persistent settings to defaults.
      Parameters:
      timeoutMs - Timeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
      Returns:
      Error Code generated by function. 0 indicates no error.
    • configFactoryDefault

      Deprecated, for removal: This API element is subject to removal in a future version.
      Configures all persistent settings to defaults.
      Returns:
      Error Code generated by function. 0 indicates no error.
    • getFaults

      public ErrorCode getFaults(CANdleFaults toFill)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the CANdle fault status
      Parameters:
      toFill - Container for fault statuses.
      Returns:
      Error Code generated by function. OK indicates no error.
    • getStickyFaults

      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the CANdle sticky fault status
      Parameters:
      toFill - Container for sticky fault statuses.
      Returns:
      Error Code generated by function. OK indicates no error.
    • clearStickyFaults

      public ErrorCode clearStickyFaults(int timeoutMs)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Clears the sticky faults.
      Parameters:
      timeoutMs - Timeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
      Returns:
      Error Code generated by function. 0 indicates no error.
    • clearStickyFaults

      Deprecated, for removal: This API element is subject to removal in a future version.
      Clears the sticky faults.
      Returns:
      Error Code generated by function. 0 indicates no error.
    • hasResetOccurred

      public boolean hasResetOccurred()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns true if the device has reset since last call.
      Returns:
      Has a Device Reset Occurred?
    • setStatusFramePeriod

      public ErrorCode setStatusFramePeriod(CANdleStatusFrame frame, int periodMs, int timeoutMs)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the period of the given status frame.
      Parameters:
      frame - Frame whose period is to be changed.
      periodMs - Period in ms for the given frame.
      timeoutMs - Timeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
      Returns:
      Error Code generated by function. 0 indicates no error.
    • setStatusFramePeriod

      public ErrorCode setStatusFramePeriod(CANdleStatusFrame frame, int periodMs)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the period of the given status frame.
      Parameters:
      frame - Frame whose period is to be changed.
      periodMs - Period in ms for the given frame.
      Returns:
      Error Code generated by function. 0 indicates no error.
    • getStatusFramePeriod

      public int getStatusFramePeriod(CANdleStatusFrame frame, int timeoutMs)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the period of the given status frame.
      Parameters:
      frame - Frame to get the period of.
      timeoutMs - Timeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
      Returns:
      Period of the given status frame.
    • getStatusFramePeriod

      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the period of the given status frame.
      Parameters:
      frame - Frame to get the period of.
      Returns:
      Period of the given status frame.
    • setControlFramePeriod

      public ErrorCode setControlFramePeriod(CANdleControlFrame frame, int periodMs)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the period of the given control frame.
      Parameters:
      frame - Frame whose period is to be changed.
      periodMs - Period in ms for the given frame.
      Returns:
      Error Code generated by function. 0 indicates no error.
    • configAllSettings

      public ErrorCode configAllSettings(CANdleConfiguration allConfigs, int timeoutMs)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Configures all persistent settings.
      Parameters:
      allConfigs - Object with all of the persistant settings
      timeoutMs - Timeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
      Returns:
      Error Code generated by function. 0 indicates no error.
    • configAllSettings

      Deprecated, for removal: This API element is subject to removal in a future version.
      Configures all persistent settings.
      Parameters:
      allConfigs - Object with all of the persistant settings
      Returns:
      Error Code generated by function. 0 indicates no error.
    • getAllConfigs

      public void getAllConfigs(CANdleConfiguration allConfigs, int timeoutMs)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets all persistant settings.
      Parameters:
      allConfigs - Object with all of the persistant settings
      timeoutMs - Timeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
    • getAllConfigs

      public void getAllConfigs(CANdleConfiguration allConfigs)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets all persistant settings.
      Parameters:
      allConfigs - Object with all of the persistant settings
    • getLastError

      Deprecated, for removal: This API element is subject to removal in a future version.
      Call GetLastError() generated by this object. Not all functions return an error code but can potentially report errors. This function can be used to retrieve those error codes.
      Returns:
      The last ErrorCode generated.