CTRE_Phoenix 5.20.2
com.ctre.phoenix.CANifier Class Reference

Classes

enum  GeneralPin
 
enum  LEDChannel
 
class  PinValues
 
enum  PWMChannel
 

Public Member Functions

 CANifier (int deviceId)
 
ErrorCode DestroyObject ()
 
void setLEDOutput (double percentOutput, LEDChannel ledChannel)
 
void setGeneralOutput (GeneralPin outputPin, boolean outputValue, boolean outputEnable)
 
void setGeneralOutputs (int outputBits, int isOutputBits)
 
void getGeneralInputs (PinValues allPins)
 
boolean getGeneralInput (GeneralPin inputPin)
 
ErrorCode getLastError ()
 
void setPWMOutput (int pwmChannel, double dutyCycle)
 
void enablePWMOutput (int pwmChannel, boolean bEnable)
 
void getPWMInput (PWMChannel pwmChannel, double[] pulseWidthAndPeriod)
 
int getQuadraturePosition ()
 
ErrorCode setQuadraturePosition (int newPosition, int timeoutMs)
 
int getQuadratureVelocity ()
 
ErrorCode configVelocityMeasurementPeriod (SensorVelocityMeasPeriod period, int timeoutMs)
 
ErrorCode configVelocityMeasurementPeriod (VelocityPeriod period, int timeoutMs)
 
ErrorCode configVelocityMeasurementPeriod (SensorVelocityMeasPeriod period)
 
ErrorCode configVelocityMeasurementPeriod (VelocityPeriod period)
 
ErrorCode configVelocityMeasurementWindow (int windowSize, int timeoutMs)
 
ErrorCode configVelocityMeasurementWindow (int windowSize)
 
ErrorCode configClearPositionOnLimitF (boolean clearPositionOnLimitF, int timeoutMs)
 
ErrorCode configClearPositionOnLimitR (boolean clearPositionOnLimitR, int timeoutMs)
 
ErrorCode configClearPositionOnQuadIdx (boolean clearPositionOnQuadIdx, int timeoutMs)
 
ErrorCode configSetCustomParam (int newValue, int paramIndex, int timeoutMs)
 
ErrorCode configSetCustomParam (int newValue, int paramIndex)
 
int configGetCustomParam (int paramIndex, int timeoutMs)
 
int configGetCustomParam (int paramIndex)
 
ErrorCode configSetParameter (ParamEnum param, double value, int subValue, int ordinal, int timeoutMs)
 
ErrorCode configSetParameter (ParamEnum param, double value, int subValue, int ordinal)
 
ErrorCode configSetParameter (int param, double value, int subValue, int ordinal, int timeoutMs)
 
ErrorCode configSetParameter (int param, double value, int subValue, int ordinal)
 
double configGetParameter (ParamEnum param, int ordinal, int timeoutMs)
 
double configGetParameter (ParamEnum param, int ordinal)
 
ErrorCode setStatusFramePeriod (CANifierStatusFrame statusFrame, int periodMs, int timeoutMs)
 
ErrorCode setStatusFramePeriod (CANifierStatusFrame statusFrame, int periodMs)
 
ErrorCode setStatusFramePeriod (int statusFrame, int periodMs, int timeoutMs)
 
ErrorCode setStatusFramePeriod (int statusFrame, int periodMs)
 
int getStatusFramePeriod (CANifierStatusFrame frame, int timeoutMs)
 
int getStatusFramePeriod (CANifierStatusFrame frame)
 
ErrorCode setControlFramePeriod (CANifierControlFrame frame, int periodMs)
 
ErrorCode setControlFramePeriod (int frame, int periodMs)
 
int getFirmwareVersion ()
 
boolean hasResetOccurred ()
 
ErrorCode getFaults (CANifierFaults toFill)
 
ErrorCode getStickyFaults (CANifierStickyFaults toFill)
 
ErrorCode clearStickyFaults (int timeoutMs)
 
double getBusVoltage ()
 
int getDeviceID ()
 
ErrorCode configAllSettings (CANifierConfiguration allConfigs, int timeoutMs)
 
ErrorCode configAllSettings (CANifierConfiguration allConfigs)
 
void getAllConfigs (CANifierConfiguration allConfigs, int timeoutMs)
 
void getAllConfigs (CANifierConfiguration allConfigs)
 
ErrorCode configFactoryDefault (int timeoutMs)
 
ErrorCode configFactoryDefault ()
 

Public Attributes

final int PWMChannelCount = 4
 

Detailed Description

CTRE CANifier

Device for interfacing common devices to the CAN bus.

Constructor & Destructor Documentation

◆ CANifier()

com.ctre.phoenix.CANifier.CANifier ( int  deviceId)
inline

Constructor.

Parameters
deviceIdThe CAN Device ID of the CANifier.

Member Function Documentation

◆ clearStickyFaults()

ErrorCode com.ctre.phoenix.CANifier.clearStickyFaults ( int  timeoutMs)
inline

Clears the Sticky Faults

Parameters
timeoutMsTimeout 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() [1/2]

ErrorCode com.ctre.phoenix.CANifier.configAllSettings ( CANifierConfiguration  allConfigs)
inline

Configures all persistent settings (overloaded so timeoutMs is 50 ms).

Parameters
allConfigsObject with all of the persistant settings
Returns
Error Code generated by function. 0 indicates no error.

◆ configAllSettings() [2/2]

ErrorCode com.ctre.phoenix.CANifier.configAllSettings ( CANifierConfiguration  allConfigs,
int  timeoutMs 
)
inline

Configures all persistent settings.

Parameters
allConfigsObject with all of the persistant settings
timeoutMsTimeout 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.

◆ configClearPositionOnLimitF()

ErrorCode com.ctre.phoenix.CANifier.configClearPositionOnLimitF ( boolean  clearPositionOnLimitF,
int  timeoutMs 
)
inline

Enables clearing the position of the feedback sensor when the forward limit switch is triggered

Parameters
clearPositionOnLimitFWhether clearing is enabled, defaults false
timeoutMsTimeout 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.

◆ configClearPositionOnLimitR()

ErrorCode com.ctre.phoenix.CANifier.configClearPositionOnLimitR ( boolean  clearPositionOnLimitR,
int  timeoutMs 
)
inline

Enables clearing the position of the feedback sensor when the reverse limit switch is triggered

Parameters
clearPositionOnLimitRWhether clearing is enabled, defaults false
timeoutMsTimeout 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.

◆ configClearPositionOnQuadIdx()

ErrorCode com.ctre.phoenix.CANifier.configClearPositionOnQuadIdx ( boolean  clearPositionOnQuadIdx,
int  timeoutMs 
)
inline

Enables clearing the position of the feedback sensor when the quadrature index signal is detected

Parameters
clearPositionOnQuadIdxWhether clearing is enabled, defaults false
timeoutMsTimeout 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() [1/2]

ErrorCode com.ctre.phoenix.CANifier.configFactoryDefault ( )
inline

Configures all persistent settings to defaults (overloaded so timeoutMs is 50 ms).

Returns
Error Code generated by function. 0 indicates no error.

◆ configFactoryDefault() [2/2]

ErrorCode com.ctre.phoenix.CANifier.configFactoryDefault ( int  timeoutMs)
inline

Configures all persistent settings to defaults.

Parameters
timeoutMsTimeout 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.

◆ configGetCustomParam() [1/2]

int com.ctre.phoenix.CANifier.configGetCustomParam ( int  paramIndex)
inline

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
paramIndexIndex of custom parameter. [0-1]
Returns
Value of the custom param.

◆ configGetCustomParam() [2/2]

int com.ctre.phoenix.CANifier.configGetCustomParam ( int  paramIndex,
int  timeoutMs 
)
inline

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
paramIndexIndex of custom parameter. [0-1]
timeoutMsTimeout 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.

◆ configGetParameter() [1/2]

double com.ctre.phoenix.CANifier.configGetParameter ( ParamEnum  param,
int  ordinal 
)
inline

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
paramParameter enumeration.
ordinalOrdinal of parameter.
Returns
Value of parameter.

◆ configGetParameter() [2/2]

double com.ctre.phoenix.CANifier.configGetParameter ( ParamEnum  param,
int  ordinal,
int  timeoutMs 
)
inline

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
paramParameter enumeration.
ordinalOrdinal of parameter.
timeoutMsTimeout 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.

◆ configSetCustomParam() [1/2]

ErrorCode com.ctre.phoenix.CANifier.configSetCustomParam ( int  newValue,
int  paramIndex 
)
inline

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
newValueValue for custom parameter.
paramIndexIndex of custom parameter. [0-1]
Returns
Error Code generated by function. 0 indicates no error.

◆ configSetCustomParam() [2/2]

ErrorCode com.ctre.phoenix.CANifier.configSetCustomParam ( int  newValue,
int  paramIndex,
int  timeoutMs 
)
inline

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
newValueValue for custom parameter.
paramIndexIndex of custom parameter. [0-1]
timeoutMsTimeout 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() [1/4]

ErrorCode com.ctre.phoenix.CANifier.configSetParameter ( int  param,
double  value,
int  subValue,
int  ordinal 
)
inline

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
paramParameter enumeration.
valueValue of parameter.
subValueSubvalue for parameter. Maximum value of 255.
ordinalOrdinal of parameter.
Returns
Error Code generated by function. 0 indicates no error.

◆ configSetParameter() [2/4]

ErrorCode com.ctre.phoenix.CANifier.configSetParameter ( int  param,
double  value,
int  subValue,
int  ordinal,
int  timeoutMs 
)
inline

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
paramParameter enumeration.
valueValue of parameter.
subValueSubvalue for parameter. Maximum value of 255.
ordinalOrdinal of parameter.
timeoutMsTimeout 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() [3/4]

ErrorCode com.ctre.phoenix.CANifier.configSetParameter ( ParamEnum  param,
double  value,
int  subValue,
int  ordinal 
)
inline

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
paramParameter enumeration.
valueValue of parameter.
subValueSubvalue for parameter. Maximum value of 255.
ordinalOrdinal of parameter.
Returns
Error Code generated by function. 0 indicates no error.

◆ configSetParameter() [4/4]

ErrorCode com.ctre.phoenix.CANifier.configSetParameter ( ParamEnum  param,
double  value,
int  subValue,
int  ordinal,
int  timeoutMs 
)
inline

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
paramParameter enumeration.
valueValue of parameter.
subValueSubvalue for parameter. Maximum value of 255.
ordinalOrdinal of parameter.
timeoutMsTimeout 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.

◆ configVelocityMeasurementPeriod() [1/4]

ErrorCode com.ctre.phoenix.CANifier.configVelocityMeasurementPeriod ( SensorVelocityMeasPeriod  period)
inline

Configures the period of each velocity sample. Every 1ms a position value is sampled, and the delta between that sample and the position sampled kPeriod ms ago is inserted into a filter. kPeriod is configured with this function.

Parameters
periodDesired period for the velocity measurement.
See also
com.ctre.phoenix.sensor.SensorVelocityMeasPeriod
Returns
Error Code generated by function. 0 indicates no error.

◆ configVelocityMeasurementPeriod() [2/4]

ErrorCode com.ctre.phoenix.CANifier.configVelocityMeasurementPeriod ( SensorVelocityMeasPeriod  period,
int  timeoutMs 
)
inline

Configures the period of each velocity sample. Every 1ms a position value is sampled, and the delta between that sample and the position sampled kPeriod ms ago is inserted into a filter. kPeriod is configured with this function.

Parameters
periodDesired period for the velocity measurement.
See also
com.ctre.phoenix.sensors.SensorVelocityMeasPeriod
Parameters
timeoutMsTimeout 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.

◆ configVelocityMeasurementPeriod() [3/4]

ErrorCode com.ctre.phoenix.CANifier.configVelocityMeasurementPeriod ( VelocityPeriod  period)
inline

Configures the period of each velocity sample. Every 1ms a position value is sampled, and the delta between that sample and the position sampled kPeriod ms ago is inserted into a filter. kPeriod is configured with this function.

Deprecated:
Use the overload with SensorVelocityMeasPeriod instead.
Parameters
periodDesired period for the velocity measurement.
See also
com.ctre.phoenix.motorcontrol.VelocityMeasPeriod
Returns
Error Code generated by function. 0 indicates no error.

◆ configVelocityMeasurementPeriod() [4/4]

ErrorCode com.ctre.phoenix.CANifier.configVelocityMeasurementPeriod ( VelocityPeriod  period,
int  timeoutMs 
)
inline

Configures the period of each velocity sample. Every 1ms a position value is sampled, and the delta between that sample and the position sampled kPeriod ms ago is inserted into a filter. kPeriod is configured with this function.

Deprecated:
Use the overload with SensorVelocityMeasPeriod instead.
Parameters
periodDesired period for the velocity measurement.
See also
com.ctre.phoenix.VelocityMeasPeriod
Parameters
timeoutMsTimeout 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.

◆ configVelocityMeasurementWindow() [1/2]

ErrorCode com.ctre.phoenix.CANifier.configVelocityMeasurementWindow ( int  windowSize)
inline

Sets the number of velocity samples used in the rolling average velocity measurement.

Parameters
windowSizeNumber of samples in the rolling average of velocity measurement. Valid values are 1,2,4,8,16,32. If another value is specified, it will truncate to nearest support value.
Returns
Error Code generated by function. 0 indicates no error.

◆ configVelocityMeasurementWindow() [2/2]

ErrorCode com.ctre.phoenix.CANifier.configVelocityMeasurementWindow ( int  windowSize,
int  timeoutMs 
)
inline

Sets the number of velocity samples used in the rolling average velocity measurement.

Parameters
windowSizeNumber of samples in the rolling average of velocity measurement. Valid values are 1,2,4,8,16,32. If another value is specified, it will truncate to nearest support value.
timeoutMsTimeout 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.

◆ DestroyObject()

ErrorCode com.ctre.phoenix.CANifier.DestroyObject ( )
inline

Destructor

Returns
Error Code generated by function. 0 indicates no error.

◆ enablePWMOutput()

void com.ctre.phoenix.CANifier.enablePWMOutput ( int  pwmChannel,
boolean  bEnable 
)
inline

Enables PWM Outputs Currently supports PWM 0, PWM 1, and PWM 2

Parameters
pwmChannelIndex of the PWM channel to enable.
bEnable"True" enables output on the pwm channel.

◆ getAllConfigs() [1/2]

void com.ctre.phoenix.CANifier.getAllConfigs ( CANifierConfiguration  allConfigs)
inline

Gets all persistant settings (overloaded so timeoutMs is 50 ms).

Parameters
allConfigsObject with all of the persistant settings

◆ getAllConfigs() [2/2]

void com.ctre.phoenix.CANifier.getAllConfigs ( CANifierConfiguration  allConfigs,
int  timeoutMs 
)
inline

Gets all persistant settings.

Parameters
allConfigsObject with all of the persistant settings
timeoutMsTimeout 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.

◆ getBusVoltage()

double com.ctre.phoenix.CANifier.getBusVoltage ( )
inline

Gets the bus voltage seen by the device.

Returns
The bus voltage value (in volts).

◆ getDeviceID()

int com.ctre.phoenix.CANifier.getDeviceID ( )
inline
Returns
The Device Number

◆ getFaults()

ErrorCode com.ctre.phoenix.CANifier.getFaults ( CANifierFaults  toFill)
inline

Gets the CANifier fault status

Parameters
toFillContainer for fault statuses.
Returns
Error Code generated by function. 0 indicates no error.

◆ getFirmwareVersion()

int com.ctre.phoenix.CANifier.getFirmwareVersion ( )
inline

Gets the firmware version of the device.

Returns
Firmware version of device.

◆ getGeneralInput()

boolean com.ctre.phoenix.CANifier.getGeneralInput ( GeneralPin  inputPin)
inline

Gets the state of the specified pin

Parameters
inputPinThe index of the pin.
Returns
The state of the pin.

◆ getGeneralInputs()

void com.ctre.phoenix.CANifier.getGeneralInputs ( PinValues  allPins)
inline

Gets the state of all General Pins

Parameters
allPinsA structure to fill with the current state of all pins.

◆ getLastError()

ErrorCode com.ctre.phoenix.CANifier.getLastError ( )
inline

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.

◆ getPWMInput()

void com.ctre.phoenix.CANifier.getPWMInput ( PWMChannel  pwmChannel,
double[]  pulseWidthAndPeriod 
)
inline

Gets the PWM Input

Parameters
pwmChannelPWM channel to get.
pulseWidthAndPeriodDouble array to hold Duty Cycle [0] and Period [1].

◆ getQuadraturePosition()

int com.ctre.phoenix.CANifier.getQuadraturePosition ( )
inline

Gets the quadrature encoder's position

Returns
Position of encoder

◆ getQuadratureVelocity()

int com.ctre.phoenix.CANifier.getQuadratureVelocity ( )
inline

Gets the quadrature encoder's velocity

Returns
Velocity of encoder

◆ getStatusFramePeriod() [1/2]

int com.ctre.phoenix.CANifier.getStatusFramePeriod ( CANifierStatusFrame  frame)
inline

Gets the period of the given status frame.

Parameters
frameFrame to get the period of.
Returns
Period of the given status frame.

◆ getStatusFramePeriod() [2/2]

int com.ctre.phoenix.CANifier.getStatusFramePeriod ( CANifierStatusFrame  frame,
int  timeoutMs 
)
inline

Gets the period of the given status frame.

Parameters
frameFrame to get the period of.
timeoutMsTimeout 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.

◆ getStickyFaults()

ErrorCode com.ctre.phoenix.CANifier.getStickyFaults ( CANifierStickyFaults  toFill)
inline

Gets the CANifier sticky fault status

Parameters
toFillContainer for sticky fault statuses.
Returns
Error Code generated by function. 0 indicates no error.

◆ hasResetOccurred()

boolean com.ctre.phoenix.CANifier.hasResetOccurred ( )
inline

Returns true if the device has reset since last call.

Returns
Has a Device Reset Occurred?

◆ setControlFramePeriod() [1/2]

ErrorCode com.ctre.phoenix.CANifier.setControlFramePeriod ( CANifierControlFrame  frame,
int  periodMs 
)
inline

Sets the period of the given control frame.

Parameters
frameFrame whose period is to be changed.
periodMsPeriod in ms for the given frame.
Returns
Error Code generated by function. 0 indicates no error.

◆ setControlFramePeriod() [2/2]

ErrorCode com.ctre.phoenix.CANifier.setControlFramePeriod ( int  frame,
int  periodMs 
)
inline

Sets the period of the given control frame.

Parameters
frameFrame whose period is to be changed.
periodMsPeriod in ms for the given frame.
Returns
Error Code generated by function. 0 indicates no error.

◆ setGeneralOutput()

void com.ctre.phoenix.CANifier.setGeneralOutput ( GeneralPin  outputPin,
boolean  outputValue,
boolean  outputEnable 
)
inline

Sets the output of a General Pin

Parameters
outputPinThe pin to use as output.
outputValueThe desired output state.
outputEnableWhether this pin is an output. "True" enables output.

◆ setGeneralOutputs()

void com.ctre.phoenix.CANifier.setGeneralOutputs ( int  outputBits,
int  isOutputBits 
)
inline

Sets the output of all General Pins

Parameters
outputBitsA bit mask of all the output states. LSB->MSB is in the order of the com.ctre.phoenix.CANifier.GeneralPin enum.
isOutputBitsA boolean bit mask that sets the pins to be outputs or inputs. A bit of 1 enables output.

◆ setLEDOutput()

void com.ctre.phoenix.CANifier.setLEDOutput ( double  percentOutput,
LEDChannel  ledChannel 
)
inline

Sets the LED Output

Parameters
percentOutputOutput duty cycle expressed as percentage.
ledChannelChannel to set the output of.

◆ setPWMOutput()

void com.ctre.phoenix.CANifier.setPWMOutput ( int  pwmChannel,
double  dutyCycle 
)
inline

Sets the PWM Output Currently supports PWM 0, PWM 1, and PWM 2

Parameters
pwmChannelIndex of the PWM channel to output.
dutyCycleDuty Cycle (0 to 1) to output. Default period of the signal is 4.2 ms.

◆ setQuadraturePosition()

ErrorCode com.ctre.phoenix.CANifier.setQuadraturePosition ( int  newPosition,
int  timeoutMs 
)
inline

Sets the quadrature encoder's position

Parameters
newPositionPosition to set
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() [1/4]

ErrorCode com.ctre.phoenix.CANifier.setStatusFramePeriod ( CANifierStatusFrame  statusFrame,
int  periodMs 
)
inline

Sets the period of the given status frame.

Parameters
statusFrameFrame whose period is to be changed.
periodMsPeriod in ms for the given frame.
Returns
Error Code generated by function. 0 indicates no error.

◆ setStatusFramePeriod() [2/4]

ErrorCode com.ctre.phoenix.CANifier.setStatusFramePeriod ( CANifierStatusFrame  statusFrame,
int  periodMs,
int  timeoutMs 
)
inline

Sets the period of the given status frame.

Parameters
statusFrameFrame whose period is to be changed.
periodMsPeriod in ms for the given frame.
timeoutMsTimeout 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() [3/4]

ErrorCode com.ctre.phoenix.CANifier.setStatusFramePeriod ( int  statusFrame,
int  periodMs 
)
inline

Sets the period of the given status frame.

Parameters
statusFrameFrame whose period is to be changed.
periodMsPeriod in ms for the given frame.
Returns
Error Code generated by function. 0 indicates no error.

◆ setStatusFramePeriod() [4/4]

ErrorCode com.ctre.phoenix.CANifier.setStatusFramePeriod ( int  statusFrame,
int  periodMs,
int  timeoutMs 
)
inline

Sets the period of the given status frame.

Parameters
statusFrameFrame whose period is to be changed.
periodMsPeriod in ms for the given frame.
timeoutMsTimeout 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.

Member Data Documentation

◆ PWMChannelCount

final int com.ctre.phoenix.CANifier.PWMChannelCount = 4

Number of PWM channels available to CANifier


The documentation for this class was generated from the following file: