CTRE Phoenix 6 C++ 24.3.0
ctre::phoenix::platform::can Namespace Reference

Classes

struct  canframe_t
 "plain old data" container for holding a CAN Frame Event. More...
 

Functions

CTREXPORT int32_t RegisterCANbus (char const *canbus)
 
CTREXPORT std::string GetCANivoreDevName (char const *canbus)
 
CTREXPORT std::vector< std::string > GetCANbusList (void)
 
CTREXPORT void CANbus_GetStatus (float &busUtilPerc, uint32_t &busOffCount, uint32_t &txFullCount, uint32_t &rec, uint32_t &tec, int32_t &status, char const *canbus, bool printErr=true)
 
CTREXPORT int32_t CANbus_SendFrame (uint32_t messageID, uint8_t const *data, uint8_t dataSize, char const *canbus, bool printErr=true)
 
CTREXPORT void CANComm_SendMessage (uint32_t messageID, uint8_t const *data, uint8_t dataSize, int32_t *status, char const *canbus, bool printErr=true)
 
CTREXPORT void CANComm_SendPeriodicMessage (uint32_t messageID, uint8_t const *data, uint8_t dataSize, int32_t periodMs, int32_t *status, char const *canbus, bool printErr=true)
 
CTREXPORT void CANComm_StopPeriodicMessage (uint32_t messageID, uint8_t const *data, uint8_t dataSize, int32_t *status, char const *canbus, bool printErr=true)
 
CTREXPORT void CANComm_ReceiveMessage (uint32_t messageID, canframe_t &frame, int32_t *status, char const *canbus, bool printErr=true)
 
CTREXPORT void CANComm_WaitForMessages (std::set< uint32_t > const &messageIDs, uint16_t timeoutMs, int32_t *status, char const *canbus, bool printErr=true)
 
CTREXPORT void CANComm_OpenStreamSession (uint32_t *sessionHandle, uint32_t messageID, uint32_t messageIDMask, uint32_t maxMessages, int32_t *status, char const *canbus, bool printErr=true)
 
CTREXPORT void CANComm_CloseStreamSession (uint32_t sessionHandle, char const *canbus, bool printErr=true)
 
CTREXPORT void CANComm_ReadStreamSession (uint32_t sessionHandle, canframe_t *messages, uint32_t messagesToRead, uint32_t *messagesRead, int32_t *status, char const *canbus, bool printErr=true)
 
CTREXPORT int32_t CANComm_GetTxSchedulerStatus (void *unusedControlWorld, char const *canbus, bool printErr=true)
 
CTREXPORT int32_t CANComm_SetRxSchedPriority (int priority, bool useRoundRobin, char const *canbus, bool printErr=true)
 
CTREXPORT int32_t CANComm_SetTxSchedPriority (int priority, bool useRoundRobin, char const *canbus, bool printErr=true)
 
CTREXPORT StatusCode Network_GetLastTx (std::string const &canbus, uint32_t arbId, canframe_t &frame)
 
CTREXPORT bool Network_ChangeTxPeriod (std::string const &canbus, uint32_t arbId, int32_t periodMs)
 
CTREXPORT StatusCode Network_SendTxFrame (std::string const &canbus, canframe_t const &frame)
 
CTREXPORT StatusCode Network_SendPeriodicTxFrame (std::string const &canbus, canframe_t const &frame, int32_t periodMs)
 
CTREXPORT StatusCode Network_UpdatePeriodicTxFrame (std::string const &canbus, canframe_t const &frame)
 
CTREXPORT StatusCode Network_StopPeriodicTxFrame (std::string const &canbus, uint32_t arbId)
 
CTREXPORT StatusCode Network_GetRxFrame (char const *canbus, uint32_t arbId, canframe_t &frame, uint32_t timeoutMs)
 
CTREXPORT StatusCode Network_WaitForRxFrames (char const *canbus, std::set< uint32_t > const &arbIds, uint16_t timeoutMs)
 
CTREXPORT StatusCode Network_SetEnableSignalSchedPriority (int priority, bool useRoundRobin)
 

Function Documentation

◆ CANbus_GetStatus()

CTREXPORT void ctre::phoenix::platform::can::CANbus_GetStatus ( float &  busUtilPerc,
uint32_t &  busOffCount,
uint32_t &  txFullCount,
uint32_t &  rec,
uint32_t &  tec,
int32_t &  status,
char const *  canbus,
bool  printErr = true 
)

◆ CANbus_SendFrame()

CTREXPORT int32_t ctre::phoenix::platform::can::CANbus_SendFrame ( uint32_t  messageID,
uint8_t const *  data,
uint8_t  dataSize,
char const *  canbus,
bool  printErr = true 
)

◆ CANComm_CloseStreamSession()

CTREXPORT void ctre::phoenix::platform::can::CANComm_CloseStreamSession ( uint32_t  sessionHandle,
char const *  canbus,
bool  printErr = true 
)

◆ CANComm_GetTxSchedulerStatus()

CTREXPORT int32_t ctre::phoenix::platform::can::CANComm_GetTxSchedulerStatus ( void *  unusedControlWorld,
char const *  canbus,
bool  printErr = true 
)

◆ CANComm_OpenStreamSession()

CTREXPORT void ctre::phoenix::platform::can::CANComm_OpenStreamSession ( uint32_t *  sessionHandle,
uint32_t  messageID,
uint32_t  messageIDMask,
uint32_t  maxMessages,
int32_t *  status,
char const *  canbus,
bool  printErr = true 
)

◆ CANComm_ReadStreamSession()

CTREXPORT void ctre::phoenix::platform::can::CANComm_ReadStreamSession ( uint32_t  sessionHandle,
canframe_t messages,
uint32_t  messagesToRead,
uint32_t *  messagesRead,
int32_t *  status,
char const *  canbus,
bool  printErr = true 
)

◆ CANComm_ReceiveMessage()

CTREXPORT void ctre::phoenix::platform::can::CANComm_ReceiveMessage ( uint32_t  messageID,
canframe_t frame,
int32_t *  status,
char const *  canbus,
bool  printErr = true 
)

◆ CANComm_SendMessage()

CTREXPORT void ctre::phoenix::platform::can::CANComm_SendMessage ( uint32_t  messageID,
uint8_t const *  data,
uint8_t  dataSize,
int32_t *  status,
char const *  canbus,
bool  printErr = true 
)

◆ CANComm_SendPeriodicMessage()

CTREXPORT void ctre::phoenix::platform::can::CANComm_SendPeriodicMessage ( uint32_t  messageID,
uint8_t const *  data,
uint8_t  dataSize,
int32_t  periodMs,
int32_t *  status,
char const *  canbus,
bool  printErr = true 
)

◆ CANComm_SetRxSchedPriority()

CTREXPORT int32_t ctre::phoenix::platform::can::CANComm_SetRxSchedPriority ( int  priority,
bool  useRoundRobin,
char const *  canbus,
bool  printErr = true 
)

◆ CANComm_SetTxSchedPriority()

CTREXPORT int32_t ctre::phoenix::platform::can::CANComm_SetTxSchedPriority ( int  priority,
bool  useRoundRobin,
char const *  canbus,
bool  printErr = true 
)

◆ CANComm_StopPeriodicMessage()

CTREXPORT void ctre::phoenix::platform::can::CANComm_StopPeriodicMessage ( uint32_t  messageID,
uint8_t const *  data,
uint8_t  dataSize,
int32_t *  status,
char const *  canbus,
bool  printErr = true 
)

◆ CANComm_WaitForMessages()

CTREXPORT void ctre::phoenix::platform::can::CANComm_WaitForMessages ( std::set< uint32_t > const &  messageIDs,
uint16_t  timeoutMs,
int32_t *  status,
char const *  canbus,
bool  printErr = true 
)

◆ GetCANbusList()

CTREXPORT std::vector< std::string > ctre::phoenix::platform::can::GetCANbusList ( void  )

◆ GetCANivoreDevName()

CTREXPORT std::string ctre::phoenix::platform::can::GetCANivoreDevName ( char const *  canbus)

◆ Network_ChangeTxPeriod()

CTREXPORT bool ctre::phoenix::platform::can::Network_ChangeTxPeriod ( std::string const &  canbus,
uint32_t  arbId,
int32_t  periodMs 
)

◆ Network_GetLastTx()

CTREXPORT StatusCode ctre::phoenix::platform::can::Network_GetLastTx ( std::string const &  canbus,
uint32_t  arbId,
canframe_t frame 
)

◆ Network_GetRxFrame()

CTREXPORT StatusCode ctre::phoenix::platform::can::Network_GetRxFrame ( char const *  canbus,
uint32_t  arbId,
canframe_t frame,
uint32_t  timeoutMs 
)

◆ Network_SendPeriodicTxFrame()

CTREXPORT StatusCode ctre::phoenix::platform::can::Network_SendPeriodicTxFrame ( std::string const &  canbus,
canframe_t const &  frame,
int32_t  periodMs 
)

◆ Network_SendTxFrame()

CTREXPORT StatusCode ctre::phoenix::platform::can::Network_SendTxFrame ( std::string const &  canbus,
canframe_t const &  frame 
)

◆ Network_SetEnableSignalSchedPriority()

CTREXPORT StatusCode ctre::phoenix::platform::can::Network_SetEnableSignalSchedPriority ( int  priority,
bool  useRoundRobin 
)

◆ Network_StopPeriodicTxFrame()

CTREXPORT StatusCode ctre::phoenix::platform::can::Network_StopPeriodicTxFrame ( std::string const &  canbus,
uint32_t  arbId 
)

◆ Network_UpdatePeriodicTxFrame()

CTREXPORT StatusCode ctre::phoenix::platform::can::Network_UpdatePeriodicTxFrame ( std::string const &  canbus,
canframe_t const &  frame 
)

◆ Network_WaitForRxFrames()

CTREXPORT StatusCode ctre::phoenix::platform::can::Network_WaitForRxFrames ( char const *  canbus,
std::set< uint32_t > const &  arbIds,
uint16_t  timeoutMs 
)

◆ RegisterCANbus()

CTREXPORT int32_t ctre::phoenix::platform::can::RegisterCANbus ( char const *  canbus)