CTRE Phoenix 6 C++ 25.0.0-beta-4
Loading...
Searching...
No Matches
ctre::phoenix6::swerve Namespace Reference

Namespaces

namespace  detail
 
namespace  impl
 
namespace  requests
 

Classes

class  circular_buffer
 This is a simple circular buffer so we don't need to "bucket brigade" copy old values. More...
 
class  LinearFilter
 This class implements a linear, digital filter. More...
 
class  PhoenixPIDController
 Phoenix-centric PID controller taken from WPI's frc::PIDController class. More...
 
class  SimSwerveDrivetrain
 Simplified swerve drive simulation class. More...
 
class  span
 
class  SwerveDrivetrain
 Swerve Drive class utilizing CTR Electronics Phoenix 6 API. More...
 
struct  SwerveDrivetrainConstants
 Common constants for a swerve drivetrain. More...
 
class  SwerveModule
 Swerve Module class that encapsulates a swerve module powered by CTR Electronics devices. More...
 
struct  SwerveModuleConstants
 All constants for a swerve module. More...
 
struct  SwerveModuleConstantsFactory
 Constants that are common across the swerve modules, used for creating instances of module-specific SwerveModuleConstants. More...
 
class  TimeInterpolatableBuffer
 The TimeInterpolatableBuffer provides an easy way to estimate past measurements. More...
 

Enumerations

enum class  ClosedLoopOutputType { Voltage = 0 , TorqueCurrentFOC = 1 }
 Supported closed-loop output types. More...
 
enum class  SteerFeedbackType { FusedCANcoder = 0 , SyncCANcoder = 1 , RemoteCANcoder = 2 }
 Supported feedback sensors for the steer motors. More...
 

Functions

template<class T , size_t N>
 span (T(&)[N]) -> span< T, N >
 
template<class T , size_t N>
 span (std::array< T, N > &) -> span< T, N >
 
template<class T , size_t N>
 span (const std::array< T, N > &) -> span< const T, N >
 
template<class Container >
 span (Container &) -> span< typename Container::value_type >
 
template<class Container >
 span (const Container &) -> span< const typename Container::value_type >
 
template<typename ElementType , std::size_t Extent>
span< const std::byte,((Extent==dynamic_extent) ? dynamic_extent :sizeof(ElementType) *Extent)> as_bytes (span< ElementType, Extent > s) noexcept
 
template<class ElementType , size_t Extent, typename std::enable_if<!std::is_const< ElementType >::value, int >::type = 0>
span< std::byte,((Extent==dynamic_extent) ? dynamic_extent :sizeof(ElementType) *Extent)> as_writable_bytes (span< ElementType, Extent > s) noexcept
 
template<std::size_t N, typename E , std::size_t S>
constexpr auto get (span< E, S > s) -> decltype(s[N])
 

Variables

constexpr std::size_t dynamic_extent = SIZE_MAX
 

Enumeration Type Documentation

◆ ClosedLoopOutputType

Supported closed-loop output types.

Enumerator
Voltage 
TorqueCurrentFOC 

Requires Pro.

◆ SteerFeedbackType

Supported feedback sensors for the steer motors.

Enumerator
FusedCANcoder 

Requires Pro; Use signals::FeedbackSensorSourceValue::FusedCANcoder for the steer motor.

SyncCANcoder 

Requires Pro; Use signals::FeedbackSensorSourceValue::SyncCANcoder for the steer motor.

RemoteCANcoder 

Use signals::FeedbackSensorSourceValue::RemoteCANcoder for the steer motor.

Function Documentation

◆ as_bytes()

template<typename ElementType , std::size_t Extent>
span< const std::byte,((Extent==dynamic_extent) ? dynamic_extent :sizeof(ElementType) *Extent)> ctre::phoenix6::swerve::as_bytes ( span< ElementType, Extent > s)
noexcept

◆ as_writable_bytes()

template<class ElementType , size_t Extent, typename std::enable_if<!std::is_const< ElementType >::value, int >::type = 0>
span< std::byte,((Extent==dynamic_extent) ? dynamic_extent :sizeof(ElementType) *Extent)> ctre::phoenix6::swerve::as_writable_bytes ( span< ElementType, Extent > s)
noexcept

◆ get()

template<std::size_t N, typename E , std::size_t S>
constexpr auto ctre::phoenix6::swerve::get ( span< E, S > s) -> decltype(s[N])
constexpr

◆ span() [1/5]

template<class Container >
ctre::phoenix6::swerve::span ( const Container & ) -> span< const typename Container::value_type >

◆ span() [2/5]

template<class T , size_t N>
ctre::phoenix6::swerve::span ( const std::array< T, N > & ) -> span< const T, N >

◆ span() [3/5]

template<class Container >
ctre::phoenix6::swerve::span ( Container & ) -> span< typename Container::value_type >

◆ span() [4/5]

template<class T , size_t N>
ctre::phoenix6::swerve::span ( std::array< T, N > & ) -> span< T, N >

◆ span() [5/5]

template<class T , size_t N>
ctre::phoenix6::swerve::span ( T(&) [N]) -> span< T, N >

Variable Documentation

◆ dynamic_extent

constexpr std::size_t ctre::phoenix6::swerve::dynamic_extent = SIZE_MAX
inlineconstexpr