mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 20:23:35 +08:00
Simplified structures in uavcan.protocol.*
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <stdint.h>
|
||||
#include <algorithm>
|
||||
#include <uavcan/internal/transport/crc.hpp>
|
||||
@@ -92,6 +93,7 @@ class DataTypeDescriptor
|
||||
|
||||
public:
|
||||
enum { MaxDataTypeID = Frame::MaxDataTypeID };
|
||||
enum { MaxFullNameLen = 80 };
|
||||
|
||||
DataTypeDescriptor()
|
||||
: kind_(DataTypeKind(0))
|
||||
@@ -108,6 +110,7 @@ public:
|
||||
assert(id <= MaxDataTypeID);
|
||||
assert(kind < NumDataTypeKinds);
|
||||
assert(name);
|
||||
assert(std::strlen(name) <= MaxFullNameLen);
|
||||
}
|
||||
|
||||
DataTypeKind getKind() const { return kind_; }
|
||||
|
||||
Reference in New Issue
Block a user