CTRE Phoenix 6 C++ 25.0.0-beta-4
|
Namespaces | |
namespace | can |
Enumerations | |
enum | DeviceType { kDeviceTypeListInitializer } |
Enumeration of all supported device types. More... | |
enum | FrcUsageType { TalonSRX , PigeonIMU , CANifier , VictorSPX , CANcoder , TalonFX , CANdle , CANivore , Pigeon2 , TalonFXS , CANdi , CANrange , API_Swerve , API_LegacySwerve } |
Functions | |
CTREXPORT void | EnableConsoleUTF8Output () |
Enables UTF-8 console output. | |
CTREXPORT void | ReportError (int isError, int32_t errorCode, int isLVCode, const char *details, const char *location, const char *callStack) |
static void | SleepUs (int timeUs) |
std::chrono::steady_clock::duration | CurrentTimeRaw () |
The raw current time source. | |
template<typename DURATION = std::chrono::microseconds> | |
static auto | CurrentTime () |
Returns the current time of the system, converted to the given duration. | |
template<typename DURATION = std::chrono::microseconds> | |
static auto | SystemTime () |
Returns the monotonic time of the system, converted to the given duration. | |
CTREXPORT int | FRC_Report (int resource, int instanceNumber, std::string const &canbus="", int callerIdx=0, int context=0, const char *feature=nullptr) |
CTREXPORT int | FRC_Report (std::string const &model, int instanceNumber, std::string const &canbus="", int callerIdx=0, int context=0, const char *feature=nullptr) |
CTREXPORT std::string | GetStackTrace (int offset) |
Get a stack trace, ignoring the first "offset" symbols. | |
CTREXPORT int32_t | SimCreate (DeviceType type, int id) |
CTREXPORT int32_t | SimDestroy (DeviceType type, int id) |
CTREXPORT int32_t | SimDestroyAll () |
CTREXPORT int32_t | SimSetPhysicsInput (DeviceType type, int id, std::string_view physicsType, double value) |
CTREXPORT int32_t | SimGetPhysicsValue (DeviceType type, int id, std::string_view physicsType, double &value) |
CTREXPORT int32_t | SimGetLastError (DeviceType type, int id) |
CTREXPORT int32_t | ReplayLoadFile (char const *filepath) |
CTREXPORT void | ReplayCloseFile () |
CTREXPORT bool | ReplayIsFileLoaded () |
CTREXPORT int32_t | ReplayPlay () |
CTREXPORT int32_t | ReplayPause () |
CTREXPORT int32_t | ReplayStop () |
CTREXPORT bool | ReplayIsRunning (uint16_t timeoutMs) |
CTREXPORT void | ReplaySetSpeed (double speed) |
CTREXPORT int32_t | ReplayStepTiming (double stepTimeSeconds) |
|
inlinestatic |
Returns the current time of the system, converted to the given duration.
The default duration is in microseconds.
This time source is typically continuous and monotonic. However, it may be overridden in simulation to use a non-monotonic, non-continuous source.
std::chrono::steady_clock::duration ctre::phoenix::platform::CurrentTimeRaw | ( | ) |
The raw current time source.
CTREXPORT void ctre::phoenix::platform::EnableConsoleUTF8Output | ( | ) |
Enables UTF-8 console output.
CTREXPORT int ctre::phoenix::platform::FRC_Report | ( | int | resource, |
int | instanceNumber, | ||
std::string const & | canbus = "", | ||
int | callerIdx = 0, | ||
int | context = 0, | ||
const char * | feature = nullptr ) |
CTREXPORT int ctre::phoenix::platform::FRC_Report | ( | std::string const & | model, |
int | instanceNumber, | ||
std::string const & | canbus = "", | ||
int | callerIdx = 0, | ||
int | context = 0, | ||
const char * | feature = nullptr ) |
CTREXPORT std::string ctre::phoenix::platform::GetStackTrace | ( | int | offset | ) |
Get a stack trace, ignoring the first "offset" symbols.
offset | The number of symbols at the top of the stack to ignore |
CTREXPORT void ctre::phoenix::platform::ReplayCloseFile | ( | ) |
CTREXPORT bool ctre::phoenix::platform::ReplayIsFileLoaded | ( | ) |
CTREXPORT bool ctre::phoenix::platform::ReplayIsRunning | ( | uint16_t | timeoutMs | ) |
CTREXPORT int32_t ctre::phoenix::platform::ReplayLoadFile | ( | char const * | filepath | ) |
CTREXPORT int32_t ctre::phoenix::platform::ReplayPause | ( | ) |
CTREXPORT int32_t ctre::phoenix::platform::ReplayPlay | ( | ) |
CTREXPORT void ctre::phoenix::platform::ReplaySetSpeed | ( | double | speed | ) |
CTREXPORT int32_t ctre::phoenix::platform::ReplayStepTiming | ( | double | stepTimeSeconds | ) |
CTREXPORT int32_t ctre::phoenix::platform::ReplayStop | ( | ) |
CTREXPORT void ctre::phoenix::platform::ReportError | ( | int | isError, |
int32_t | errorCode, | ||
int | isLVCode, | ||
const char * | details, | ||
const char * | location, | ||
const char * | callStack ) |
CTREXPORT int32_t ctre::phoenix::platform::SimCreate | ( | DeviceType | type, |
int | id ) |
CTREXPORT int32_t ctre::phoenix::platform::SimDestroy | ( | DeviceType | type, |
int | id ) |
CTREXPORT int32_t ctre::phoenix::platform::SimDestroyAll | ( | ) |
CTREXPORT int32_t ctre::phoenix::platform::SimGetLastError | ( | DeviceType | type, |
int | id ) |
CTREXPORT int32_t ctre::phoenix::platform::SimGetPhysicsValue | ( | DeviceType | type, |
int | id, | ||
std::string_view | physicsType, | ||
double & | value ) |
CTREXPORT int32_t ctre::phoenix::platform::SimSetPhysicsInput | ( | DeviceType | type, |
int | id, | ||
std::string_view | physicsType, | ||
double | value ) |
|
inlinestatic |
timeUs | How long to yield current thread in microseconds (us). If platform cannot honor us resolution, round up to nearest value that platform can honor. |
|
inlinestatic |
Returns the monotonic time of the system, converted to the given duration.
The default duration is in microseconds.
This time source is guaranteed to be continuous and monotonic.