INode::injectTxFrame()

This commit is contained in:
Pavel Kirienko
2015-06-07 17:28:37 +03:00
parent 988e404586
commit e8e0653022
2 changed files with 28 additions and 0 deletions
@@ -86,6 +86,33 @@ public:
{
return getScheduler().spinOnce();
}
/**
* This method allows to directly transmit a raw CAN frame circumventing the whole UAVCAN stack.
* Mandatory parameters:
*
* @param frame CAN frame to be transmitted.
*
* @param tx_deadline The frame will be discarded if it could not be transmitted by this time.
*
* @param iface_mask This bitmask allows to select what CAN interfaces this frame should go into.
* Example:
* - 1 - the frame will be sent only to iface 0.
* - 4 - the frame will be sent only to iface 2.
* - 3 - the frame will be sent to ifaces 0 and 1.
*
* Optional parameters:
*
* @param qos Quality of service. Please refer to the CAN IO manager for details.
*
* @param flags CAN IO flags. Please refer to the CAN driver API for details.
*/
int injectTxFrame(const CanFrame& frame, MonotonicTime tx_deadline, uint8_t iface_mask,
CanTxQueue::Qos qos = CanTxQueue::Volatile,
CanIOFlags flags = 0)
{
return getDispatcher().getCanIOManager().send(frame, tx_deadline, MonotonicTime(), iface_mask, qos, flags);
}
};
}
@@ -196,6 +196,7 @@ public:
ISystemClock& getSystemClock() { return sysclock_; }
const CanIOManager& getCanIOManager() const { return canio_; }
CanIOManager& getCanIOManager() { return canio_; }
const TransferPerfCounter& getTransferPerfCounter() const { return perf_; }
TransferPerfCounter& getTransferPerfCounter() { return perf_; }