mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-14 21:03:34 +08:00
INode::injectTxFrame()
This commit is contained in:
@@ -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_; }
|
||||
|
||||
Reference in New Issue
Block a user