mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-04 10:00:35 +08:00
CanIOManager::makePendingTxMask() made public
This commit is contained in:
@@ -154,7 +154,6 @@ class UAVCAN_EXPORT CanIOManager : Noncopyable
|
||||
|
||||
int sendToIface(uint8_t iface_index, const CanFrame& frame, MonotonicTime tx_deadline, CanIOFlags flags);
|
||||
int sendFromTxQueue(uint8_t iface_index);
|
||||
uint8_t makePendingTxMask() const;
|
||||
int callSelect(CanSelectMasks& inout_masks, MonotonicTime blocking_deadline);
|
||||
|
||||
public:
|
||||
@@ -168,6 +167,8 @@ public:
|
||||
const ICanDriver& getCanDriver() const { return driver_; }
|
||||
ICanDriver& getCanDriver() { return driver_; }
|
||||
|
||||
uint8_t makePendingTxMask() const;
|
||||
|
||||
/**
|
||||
* Returns:
|
||||
* 0 - rejected/timedout/enqueued
|
||||
|
||||
@@ -261,19 +261,6 @@ int CanIOManager::sendFromTxQueue(uint8_t iface_index)
|
||||
return res;
|
||||
}
|
||||
|
||||
uint8_t CanIOManager::makePendingTxMask() const
|
||||
{
|
||||
uint8_t write_mask = 0;
|
||||
for (uint8_t i = 0; i < getNumIfaces(); i++)
|
||||
{
|
||||
if (!tx_queues_[i]->isEmpty())
|
||||
{
|
||||
write_mask |= uint8_t(1 << i);
|
||||
}
|
||||
}
|
||||
return write_mask;
|
||||
}
|
||||
|
||||
int CanIOManager::callSelect(CanSelectMasks& inout_masks, MonotonicTime blocking_deadline)
|
||||
{
|
||||
const CanSelectMasks in_masks = inout_masks;
|
||||
@@ -312,6 +299,19 @@ CanIOManager::CanIOManager(ICanDriver& driver, IPoolAllocator& allocator, ISyste
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t CanIOManager::makePendingTxMask() const
|
||||
{
|
||||
uint8_t write_mask = 0;
|
||||
for (uint8_t i = 0; i < getNumIfaces(); i++)
|
||||
{
|
||||
if (!tx_queues_[i]->isEmpty())
|
||||
{
|
||||
write_mask |= uint8_t(1 << i);
|
||||
}
|
||||
}
|
||||
return write_mask;
|
||||
}
|
||||
|
||||
CanIfacePerfCounters CanIOManager::getIfacePerfCounters(uint8_t iface_index) const
|
||||
{
|
||||
ICanIface* const iface = driver_.getIface(iface_index);
|
||||
|
||||
Reference in New Issue
Block a user