mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-21 23:00:34 +08:00
Padding optimization in TransferSender
This commit is contained in:
@@ -20,16 +20,17 @@ namespace uavcan
|
|||||||
class UAVCAN_EXPORT TransferSender
|
class UAVCAN_EXPORT TransferSender
|
||||||
{
|
{
|
||||||
const MonotonicDuration max_transfer_interval_;
|
const MonotonicDuration max_transfer_interval_;
|
||||||
DataTypeID data_type_id_;
|
|
||||||
|
Dispatcher& dispatcher_;
|
||||||
|
|
||||||
TransferPriority priority_;
|
TransferPriority priority_;
|
||||||
CanTxQueue::Qos qos_;
|
CanTxQueue::Qos qos_;
|
||||||
TransferCRC crc_base_;
|
TransferCRC crc_base_;
|
||||||
|
DataTypeID data_type_id_;
|
||||||
CanIOFlags flags_;
|
CanIOFlags flags_;
|
||||||
uint8_t iface_mask_;
|
uint8_t iface_mask_;
|
||||||
bool allow_anonymous_transfers_;
|
bool allow_anonymous_transfers_;
|
||||||
|
|
||||||
Dispatcher& dispatcher_;
|
|
||||||
|
|
||||||
void registerError() const;
|
void registerError() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -43,24 +44,24 @@ public:
|
|||||||
TransferSender(Dispatcher& dispatcher, const DataTypeDescriptor& data_type, CanTxQueue::Qos qos,
|
TransferSender(Dispatcher& dispatcher, const DataTypeDescriptor& data_type, CanTxQueue::Qos qos,
|
||||||
MonotonicDuration max_transfer_interval = getDefaultMaxTransferInterval())
|
MonotonicDuration max_transfer_interval = getDefaultMaxTransferInterval())
|
||||||
: max_transfer_interval_(max_transfer_interval)
|
: max_transfer_interval_(max_transfer_interval)
|
||||||
|
, dispatcher_(dispatcher)
|
||||||
, priority_(TransferPriorityNormal)
|
, priority_(TransferPriorityNormal)
|
||||||
, qos_(CanTxQueue::Qos())
|
, qos_(CanTxQueue::Qos())
|
||||||
, flags_(CanIOFlags(0))
|
, flags_(CanIOFlags(0))
|
||||||
, iface_mask_(AllIfacesMask)
|
, iface_mask_(AllIfacesMask)
|
||||||
, allow_anonymous_transfers_(false)
|
, allow_anonymous_transfers_(false)
|
||||||
, dispatcher_(dispatcher)
|
|
||||||
{
|
{
|
||||||
init(data_type, qos);
|
init(data_type, qos);
|
||||||
}
|
}
|
||||||
|
|
||||||
TransferSender(Dispatcher& dispatcher, MonotonicDuration max_transfer_interval = getDefaultMaxTransferInterval())
|
TransferSender(Dispatcher& dispatcher, MonotonicDuration max_transfer_interval = getDefaultMaxTransferInterval())
|
||||||
: max_transfer_interval_(max_transfer_interval)
|
: max_transfer_interval_(max_transfer_interval)
|
||||||
|
, dispatcher_(dispatcher)
|
||||||
, priority_(TransferPriorityNormal)
|
, priority_(TransferPriorityNormal)
|
||||||
, qos_(CanTxQueue::Qos())
|
, qos_(CanTxQueue::Qos())
|
||||||
, flags_(CanIOFlags(0))
|
, flags_(CanIOFlags(0))
|
||||||
, iface_mask_(AllIfacesMask)
|
, iface_mask_(AllIfacesMask)
|
||||||
, allow_anonymous_transfers_(false)
|
, allow_anonymous_transfers_(false)
|
||||||
, dispatcher_(dispatcher)
|
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
void init(const DataTypeDescriptor& dtid, CanTxQueue::Qos qos);
|
void init(const DataTypeDescriptor& dtid, CanTxQueue::Qos qos);
|
||||||
|
|||||||
Reference in New Issue
Block a user