Support for different DTID limits depending on data type kind; tests are failing now!

This commit is contained in:
Pavel Kirienko
2015-04-29 03:08:07 +03:00
parent feb534a45f
commit eafcfa1733
11 changed files with 86 additions and 17 deletions
@@ -61,7 +61,7 @@ GlobalDataTypeRegistry::RegistrationResult GlobalDataTypeRegistry::remove(Entry*
GlobalDataTypeRegistry::RegistrationResult GlobalDataTypeRegistry::registImpl(Entry* dtd)
{
if (!dtd || (dtd->descriptor.getID() > DataTypeID::Max))
if (!dtd || !dtd->descriptor.isValid())
{
UAVCAN_ASSERT(0);
return RegistrationResultInvalidParams;
@@ -241,7 +241,7 @@ DataTypeSignature GlobalDataTypeRegistry::computeAggregateSignature(DataTypeKind
p = p->getNextListNode();
}
prev_dtid++;
while (prev_dtid <= DataTypeID::Max)
while (unsigned(prev_dtid) < inout_id_mask.size())
{
inout_id_mask[unsigned(prev_dtid++)] = false;
}