mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 10:53:34 +08:00
CATS and network compatibility checker removed
This commit is contained in:
@@ -196,75 +196,4 @@ const DataTypeDescriptor* GlobalDataTypeRegistry::find(DataTypeKind kind, DataTy
|
||||
return NULL;
|
||||
}
|
||||
|
||||
DataTypeSignature GlobalDataTypeRegistry::computeAggregateSignature(DataTypeKind kind,
|
||||
DataTypeIDMask& inout_id_mask) const
|
||||
{
|
||||
UAVCAN_ASSERT(isFrozen()); // Computing the signature if the registry is not frozen is pointless
|
||||
|
||||
const List* list = selectList(kind);
|
||||
if (!list)
|
||||
{
|
||||
UAVCAN_ASSERT(0);
|
||||
return DataTypeSignature();
|
||||
}
|
||||
|
||||
int prev_dtid = -1;
|
||||
DataTypeSignature signature;
|
||||
bool signature_initialized = false;
|
||||
Entry* p = list->get();
|
||||
while (p)
|
||||
{
|
||||
const DataTypeDescriptor& desc = p->descriptor;
|
||||
const int dtid = desc.getID().get();
|
||||
|
||||
if (inout_id_mask[unsigned(dtid)])
|
||||
{
|
||||
if (signature_initialized)
|
||||
{
|
||||
signature.extend(desc.getSignature());
|
||||
}
|
||||
else
|
||||
{
|
||||
signature = DataTypeSignature(desc.getSignature());
|
||||
}
|
||||
signature_initialized = true;
|
||||
}
|
||||
|
||||
UAVCAN_ASSERT(prev_dtid < dtid); // Making sure that list is ordered properly
|
||||
prev_dtid++;
|
||||
while (prev_dtid < dtid)
|
||||
{
|
||||
inout_id_mask[unsigned(prev_dtid++)] = false; // Erasing bits for missing types
|
||||
}
|
||||
UAVCAN_ASSERT(prev_dtid == dtid);
|
||||
|
||||
p = p->getNextListNode();
|
||||
}
|
||||
prev_dtid++;
|
||||
while (unsigned(prev_dtid) < inout_id_mask.size())
|
||||
{
|
||||
inout_id_mask[unsigned(prev_dtid++)] = false;
|
||||
}
|
||||
|
||||
return signature;
|
||||
}
|
||||
|
||||
void GlobalDataTypeRegistry::getDataTypeIDMask(DataTypeKind kind, DataTypeIDMask& mask) const
|
||||
{
|
||||
(void)mask.reset();
|
||||
const List* list = selectList(kind);
|
||||
if (!list)
|
||||
{
|
||||
UAVCAN_ASSERT(0);
|
||||
return;
|
||||
}
|
||||
Entry* p = list->get();
|
||||
while (p)
|
||||
{
|
||||
UAVCAN_ASSERT(p->descriptor.getKind() == kind);
|
||||
mask[p->descriptor.getID().get()] = true;
|
||||
p = p->getNextListNode();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user