CTRE Phoenix 6 C++ 24.50.0-alpha-2
ctre::phoenix6 Namespace Reference

Namespaces

namespace  configs
 
namespace  controls
 
namespace  hardware
 
namespace  mechanisms
 
namespace  networking
 
namespace  signals
 
namespace  sim
 
namespace  spns
 
namespace  swerve
 
namespace  wpiutils
 

Classes

class  AllTimestamps
 A collection of timestamps for a received signal. More...
 
class  BaseStatusSignal
 Class that provides operations to retrieve information about a status signal. More...
 
class  CANBus
 Class for getting information about an available CAN bus. More...
 
class  HootReplay
 Static class for controlling Phoenix 6 hoot log replay. More...
 
class  ISerializable
 
class  Orchestra
 Orchestra is used to play music through devices. More...
 
class  SignalLogger
 Static class for controlling the Phoenix 6 signal logger. More...
 
struct  SignalMeasurement
 Information from a single measurement of a status signal. More...
 
class  StatusSignal
 Represents a status signal with data of type T, and operations available to retrieve information about the signal. More...
 
class  Timestamp
 Information about the timestamp of a signal. More...
 

Enumerations

enum class  MechanismState { OK , Disabled , RequiresUserAction }
 Possible states of a mechanism. More...
 

Functions

CTREXPORT double GetCurrentTimeSeconds ()
 Get the current timestamp in seconds. More...
 
CTREXPORT double GetSystemTimeSeconds ()
 Get the system timestamp in seconds. More...
 
CTREXPORT bool IsSimulation ()
 Get whether the program is running in simulation. More...
 
CTREXPORT bool IsReplay ()
 Get whether the program is running in replay mode. More...
 

Enumeration Type Documentation

◆ MechanismState

enum class ctre::phoenix6::MechanismState
strong

Possible states of a mechanism.

Enumerator
OK 

The mechanism is running normally.

Disabled 

The mechanism is temporarily disabled due to an issue.

RequiresUserAction 

The mechanism is disabled and requires user action.

Function Documentation

◆ GetCurrentTimeSeconds()

CTREXPORT double ctre::phoenix6::GetCurrentTimeSeconds ( )

Get the current timestamp in seconds.

This is the time source used for status signals.

This time source is typically continuous and monotonic. However, it may be overridden in simulation to use a non-monotonic, non-continuous source.

Returns
Current time in seconds.

◆ GetSystemTimeSeconds()

CTREXPORT double ctre::phoenix6::GetSystemTimeSeconds ( )

Get the system timestamp in seconds.

This is NOT the time source used for status signals. Use GetCurrentTImeSeconds instead when working with status signal timing.

This time source is guaranteed to be continuous and monotonic, making it useful for measuring time deltas in a robot program.

Returns
System time in seconds.

◆ IsReplay()

CTREXPORT bool ctre::phoenix6::IsReplay ( )

Get whether the program is running in replay mode.

Returns
true if in replay mode

◆ IsSimulation()

CTREXPORT bool ctre::phoenix6::IsSimulation ( )

Get whether the program is running in simulation.

Returns
true if in simulation