mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 12:13:34 +08:00
ReceivedDataStructure<> made noncopyable
This commit is contained in:
@@ -14,18 +14,16 @@
|
||||
template <typename DataType>
|
||||
class SubscriptionCollector : uavcan::Noncopyable
|
||||
{
|
||||
typedef uavcan::ReceivedDataStructure<DataType> ReceivedDataStructType;
|
||||
|
||||
void handler(const ReceivedDataStructType& msg)
|
||||
void handler(const DataType& msg)
|
||||
{
|
||||
this->msg.reset(new ReceivedDataStructType(msg));
|
||||
this->msg.reset(new DataType(msg));
|
||||
}
|
||||
|
||||
public:
|
||||
std::auto_ptr<ReceivedDataStructType> msg;
|
||||
std::auto_ptr<DataType> msg;
|
||||
|
||||
typedef uavcan::MethodBinder<SubscriptionCollector*,
|
||||
void (SubscriptionCollector::*)(const ReceivedDataStructType&)> Binder;
|
||||
void (SubscriptionCollector::*)(const DataType&)> Binder;
|
||||
|
||||
Binder bind() { return Binder(this, &SubscriptionCollector::handler); }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user