CanIOFlagAbortOnError - automatically enforced by TransferSender if the node is in passive mode

This commit is contained in:
Pavel Kirienko
2015-07-03 10:41:39 +03:00
parent b927c1de5f
commit 71b62ede9c
5 changed files with 30 additions and 3 deletions
+9 -1
View File
@@ -114,9 +114,17 @@ struct UAVCAN_EXPORT CanSelectMasks
/**
* Special IO flags.
*
* @ref CanIOFlagLoopback - Send the frame back to RX with true TX timestamps.
*
* @ref CanIOFlagAbortOnError - Abort transmission on first bus error instead of retransmitting. This does not
* affect the case of arbitration loss, in which case the retransmission will work
* as usual. This flag is used together with anonymous messages which allows to
* implement CSMA bus access. Read the spec for details.
*/
typedef uint16_t CanIOFlags;
static const CanIOFlags CanIOFlagLoopback = 1; ///< Send the frame back to RX with true TX timestamps
static const CanIOFlags CanIOFlagLoopback = 1;
static const CanIOFlags CanIOFlagAbortOnError = 2;
/**
* Single non-blocking CAN interface.
@@ -100,6 +100,10 @@ public:
/**
* Send with automatic Transfer ID.
*
* Note that as long as the local node operates in passive mode, the
* flag @ref CanIOFlagAbortOnError will be set implicitly for all outgoing frames.
*
* TID is managed by OutgoingTransferRegistry.
*/
int send(const uint8_t* payload, unsigned payload_len, MonotonicTime tx_deadline,