mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 00:13:34 +08:00
CATS and network compatibility checker removed
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
#include <uavcan/error.hpp>
|
||||
#include <uavcan/std.hpp>
|
||||
#include <uavcan/data_type.hpp>
|
||||
#include <uavcan/util/bitset.hpp>
|
||||
#include <uavcan/util/templates.hpp>
|
||||
#include <uavcan/util/linked_list.hpp>
|
||||
#if UAVCAN_DEBUG
|
||||
@@ -18,11 +17,6 @@
|
||||
|
||||
namespace uavcan
|
||||
{
|
||||
/**
|
||||
* Bit mask where bit at index X is set if there's a Data Type with ID X.
|
||||
*/
|
||||
typedef BitSet<DataTypeID::MaxPossibleDataTypeIDValue + 1> DataTypeIDMask;
|
||||
|
||||
/**
|
||||
* This singleton is shared among all existing node instances. It is instantiated automatically
|
||||
* when the C++ runtime executes contstructors before main().
|
||||
@@ -151,28 +145,6 @@ public:
|
||||
*/
|
||||
const DataTypeDescriptor* find(DataTypeKind kind, DataTypeID dtid) const;
|
||||
|
||||
/**
|
||||
* Computes Aggregate Signature for all known data types selected by the mask.
|
||||
* Extra bits will be zeroed.
|
||||
* Please read the DSDL specification.
|
||||
* @param[in] kind Data Type Kind - messages or services.
|
||||
* @param[inout] inout_id_mask Data types to compute aggregate signature for; bits at
|
||||
* the positions of unknown data types will be cleared.
|
||||
* @return Computed data type signature.
|
||||
*/
|
||||
DataTypeSignature computeAggregateSignature(DataTypeKind kind, DataTypeIDMask& inout_id_mask) const;
|
||||
|
||||
/**
|
||||
* Sets the mask so that only bits corresponding to known data types will be set.
|
||||
* In other words:
|
||||
* for data_type_id := [0, 1023]
|
||||
* mask[data_type_id] := data_type_exists(data_type_id)
|
||||
*
|
||||
* @param[in] kind Data Type Kind - messages or services.
|
||||
* @param[out] mask Output mask of known data types.
|
||||
*/
|
||||
void getDataTypeIDMask(DataTypeKind kind, DataTypeIDMask& mask) const;
|
||||
|
||||
/**
|
||||
* Returns the number of registered message types.
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
# include <uavcan/protocol/logger.hpp>
|
||||
# include <uavcan/protocol/restart_request_server.hpp>
|
||||
# include <uavcan/protocol/transport_stats_provider.hpp>
|
||||
# include <uavcan/protocol/network_compat_checker.hpp>
|
||||
#endif
|
||||
|
||||
#if !defined(UAVCAN_CPP_VERSION) || !defined(UAVCAN_CPP11)
|
||||
@@ -150,15 +149,6 @@ public:
|
||||
*/
|
||||
int start(const TransferPriority node_status_transfer_priority = TransferPriority::Default);
|
||||
|
||||
#if !UAVCAN_TINY
|
||||
/**
|
||||
* Please read the specs to learn about Network Compatibility Check.
|
||||
* Returns negative error code.
|
||||
* @param[out] result Check result (output).
|
||||
*/
|
||||
int checkNetworkCompatibility(NetworkCompatibilityCheckResult& result);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sets the node name, e.g. "com.example.product_name". The node name can be set only once.
|
||||
* Must be executed before the node is started, otherwise the node will refuse to start up.
|
||||
@@ -305,32 +295,6 @@ fail:
|
||||
return res;
|
||||
}
|
||||
|
||||
#if !UAVCAN_TINY
|
||||
|
||||
template <std::size_t MemPoolSize_, unsigned OutgoingTransferRegistryStaticEntries>
|
||||
int Node<MemPoolSize_, OutgoingTransferRegistryStaticEntries>::
|
||||
checkNetworkCompatibility(NetworkCompatibilityCheckResult& result)
|
||||
{
|
||||
if (!started_)
|
||||
{
|
||||
return -ErrNotInited;
|
||||
}
|
||||
|
||||
int res = NetworkCompatibilityChecker::publishGlobalDiscoveryRequest(*this);
|
||||
if (res < 0)
|
||||
{
|
||||
return res;
|
||||
}
|
||||
|
||||
NetworkCompatibilityChecker checker(*this);
|
||||
StaticAssert<(sizeof(checker) < 2048)>::check(); // Making sure that the code footprint doesn't explode
|
||||
res = checker.execute();
|
||||
result = checker.getResult();
|
||||
return res;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif // UAVCAN_NODE_NODE_HPP_INCLUDED
|
||||
|
||||
Reference in New Issue
Block a user