WPILibC++  unspecified
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
CtreCanNode Class Reference
Inheritance diagram for CtreCanNode:
PCM PDP

Classes

class  recMsg
 
class  txTask
 

Public Member Functions

 CtreCanNode (UINT8 deviceNumber)
 
UINT8 GetDeviceNumber ()
 

Protected Member Functions

void RegisterRx (uint32_t arbId)
 
void RegisterTx (uint32_t arbId, uint32_t periodMs)
 Schedule a CAN Frame for periodic transmit. More...
 
void RegisterTx (uint32_t arbId, uint32_t periodMs, uint32_t dlc, const uint8_t *initialFrame)
 Schedule a CAN Frame for periodic transmit. More...
 
void UnregisterTx (uint32_t arbId)
 
CTR_Code GetRx (uint32_t arbId, uint8_t *dataBytes, uint32_t timeoutMs)
 
void FlushTx (uint32_t arbId)
 
bool ChangeTxPeriod (uint32_t arbId, uint32_t periodMs)
 
template<typename T >
txTask< T > GetTx (uint32_t arbId)
 
template<class T >
void FlushTx (T &par)
 
template<class T >
recMsg< T > GetRx (uint32_t arbId, uint32_t timeoutMs)
 

Protected Attributes

UINT8 _deviceNumber
 

Member Function Documentation

void CtreCanNode::RegisterTx ( uint32_t  arbId,
uint32_t  periodMs 
)
protected

Schedule a CAN Frame for periodic transmit.

Assume eight byte DLC and zero value for initial transmission.

Parameters
arbIdCAN Frame Arbitration ID. Set BIT31 for 11bit ids, otherwise we use 29bit ids.
periodMsPeriod to transmit CAN frame. Pass 0 for one-shot, which also disables that ArbID's preceding periodic transmit.
void CtreCanNode::RegisterTx ( uint32_t  arbId,
uint32_t  periodMs,
uint32_t  dlc,
const uint8_t *  initialFrame 
)
protected

Schedule a CAN Frame for periodic transmit.

Parameters
arbIdCAN Frame Arbitration ID. Set BIT31 for 11bit ids, otherwise we use 29bit ids.
periodMsPeriod to transmit CAN frame. Pass 0 for one-shot, which also disables that ArbID's preceding periodic transmit.
dlcNumber of bytes to transmit (0 to 8).
initialFramePtr to the frame data to schedule for transmitting. Passing null will result in defaulting to zero data value.

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