Files
firmware/components/flatbuffers/include/flatbuffers_generated/Topology_generated.h
2026-01-31 11:32:40 -05:00

230 lines
8.0 KiB
C++

// automatically generated by the FlatBuffers compiler, do not modify
#ifndef FLATBUFFERS_GENERATED_TOPOLOGY_TOPOLOGY_H_
#define FLATBUFFERS_GENERATED_TOPOLOGY_TOPOLOGY_H_
#include "flatbuffers/flatbuffers.h"
// Ensure the included flatbuffers.h is the same version as when this file was
// generated, otherwise it may not be compatible.
static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
FLATBUFFERS_VERSION_MINOR == 12 &&
FLATBUFFERS_VERSION_REVISION == 19,
"Non-compatible flatbuffers version included");
namespace Topology {
struct ChannelBoardConn;
struct NeighbourBlob;
struct NeighbourBlobBuilder;
struct TopologyInfo;
struct TopologyInfoBuilder;
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(2) ChannelBoardConn FLATBUFFERS_FINAL_CLASS {
private:
uint8_t channel_;
int8_t padding0__;
uint16_t board_id_;
public:
ChannelBoardConn()
: channel_(0),
padding0__(0),
board_id_(0) {
(void)padding0__;
}
ChannelBoardConn(uint8_t _channel, uint16_t _board_id)
: channel_(::flatbuffers::EndianScalar(_channel)),
padding0__(0),
board_id_(::flatbuffers::EndianScalar(_board_id)) {
(void)padding0__;
}
uint8_t channel() const {
return ::flatbuffers::EndianScalar(channel_);
}
uint16_t board_id() const {
return ::flatbuffers::EndianScalar(board_id_);
}
};
FLATBUFFERS_STRUCT_END(ChannelBoardConn, 4);
struct NeighbourBlob FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
typedef NeighbourBlobBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_CURR_BOARD_ID = 4,
VT_NUM_CONNECTIONS = 6,
VT_NEIGHBOUR_CONNECTIONS = 8
};
uint16_t curr_board_id() const {
return GetField<uint16_t>(VT_CURR_BOARD_ID, 0);
}
uint8_t num_connections() const {
return GetField<uint8_t>(VT_NUM_CONNECTIONS, 0);
}
const ::flatbuffers::Vector<const Topology::ChannelBoardConn *> *neighbour_connections() const {
return GetPointer<const ::flatbuffers::Vector<const Topology::ChannelBoardConn *> *>(VT_NEIGHBOUR_CONNECTIONS);
}
template <bool B = false>
bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
return VerifyTableStart(verifier) &&
VerifyField<uint16_t>(verifier, VT_CURR_BOARD_ID, 2) &&
VerifyField<uint8_t>(verifier, VT_NUM_CONNECTIONS, 1) &&
VerifyOffset(verifier, VT_NEIGHBOUR_CONNECTIONS) &&
verifier.VerifyVector(neighbour_connections()) &&
verifier.EndTable();
}
};
struct NeighbourBlobBuilder {
typedef NeighbourBlob Table;
::flatbuffers::FlatBufferBuilder &fbb_;
::flatbuffers::uoffset_t start_;
void add_curr_board_id(uint16_t curr_board_id) {
fbb_.AddElement<uint16_t>(NeighbourBlob::VT_CURR_BOARD_ID, curr_board_id, 0);
}
void add_num_connections(uint8_t num_connections) {
fbb_.AddElement<uint8_t>(NeighbourBlob::VT_NUM_CONNECTIONS, num_connections, 0);
}
void add_neighbour_connections(::flatbuffers::Offset<::flatbuffers::Vector<const Topology::ChannelBoardConn *>> neighbour_connections) {
fbb_.AddOffset(NeighbourBlob::VT_NEIGHBOUR_CONNECTIONS, neighbour_connections);
}
explicit NeighbourBlobBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
::flatbuffers::Offset<NeighbourBlob> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = ::flatbuffers::Offset<NeighbourBlob>(end);
return o;
}
};
inline ::flatbuffers::Offset<NeighbourBlob> CreateNeighbourBlob(
::flatbuffers::FlatBufferBuilder &_fbb,
uint16_t curr_board_id = 0,
uint8_t num_connections = 0,
::flatbuffers::Offset<::flatbuffers::Vector<const Topology::ChannelBoardConn *>> neighbour_connections = 0) {
NeighbourBlobBuilder builder_(_fbb);
builder_.add_neighbour_connections(neighbour_connections);
builder_.add_curr_board_id(curr_board_id);
builder_.add_num_connections(num_connections);
return builder_.Finish();
}
inline ::flatbuffers::Offset<NeighbourBlob> CreateNeighbourBlobDirect(
::flatbuffers::FlatBufferBuilder &_fbb,
uint16_t curr_board_id = 0,
uint8_t num_connections = 0,
const std::vector<Topology::ChannelBoardConn> *neighbour_connections = nullptr) {
auto neighbour_connections__ = neighbour_connections ? _fbb.CreateVectorOfStructs<Topology::ChannelBoardConn>(*neighbour_connections) : 0;
return Topology::CreateNeighbourBlob(
_fbb,
curr_board_id,
num_connections,
neighbour_connections__);
}
struct TopologyInfo FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
typedef TopologyInfoBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_NUM_BOARDS = 4,
VT_BOARDS = 6
};
uint16_t num_boards() const {
return GetField<uint16_t>(VT_NUM_BOARDS, 0);
}
const ::flatbuffers::Vector<::flatbuffers::Offset<Topology::NeighbourBlob>> *boards() const {
return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<Topology::NeighbourBlob>> *>(VT_BOARDS);
}
template <bool B = false>
bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
return VerifyTableStart(verifier) &&
VerifyField<uint16_t>(verifier, VT_NUM_BOARDS, 2) &&
VerifyOffset(verifier, VT_BOARDS) &&
verifier.VerifyVector(boards()) &&
verifier.VerifyVectorOfTables(boards()) &&
verifier.EndTable();
}
};
struct TopologyInfoBuilder {
typedef TopologyInfo Table;
::flatbuffers::FlatBufferBuilder &fbb_;
::flatbuffers::uoffset_t start_;
void add_num_boards(uint16_t num_boards) {
fbb_.AddElement<uint16_t>(TopologyInfo::VT_NUM_BOARDS, num_boards, 0);
}
void add_boards(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<Topology::NeighbourBlob>>> boards) {
fbb_.AddOffset(TopologyInfo::VT_BOARDS, boards);
}
explicit TopologyInfoBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
::flatbuffers::Offset<TopologyInfo> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = ::flatbuffers::Offset<TopologyInfo>(end);
return o;
}
};
inline ::flatbuffers::Offset<TopologyInfo> CreateTopologyInfo(
::flatbuffers::FlatBufferBuilder &_fbb,
uint16_t num_boards = 0,
::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<Topology::NeighbourBlob>>> boards = 0) {
TopologyInfoBuilder builder_(_fbb);
builder_.add_boards(boards);
builder_.add_num_boards(num_boards);
return builder_.Finish();
}
inline ::flatbuffers::Offset<TopologyInfo> CreateTopologyInfoDirect(
::flatbuffers::FlatBufferBuilder &_fbb,
uint16_t num_boards = 0,
const std::vector<::flatbuffers::Offset<Topology::NeighbourBlob>> *boards = nullptr) {
auto boards__ = boards ? _fbb.CreateVector<::flatbuffers::Offset<Topology::NeighbourBlob>>(*boards) : 0;
return Topology::CreateTopologyInfo(
_fbb,
num_boards,
boards__);
}
inline const Topology::TopologyInfo *GetTopologyInfo(const void *buf) {
return ::flatbuffers::GetRoot<Topology::TopologyInfo>(buf);
}
inline const Topology::TopologyInfo *GetSizePrefixedTopologyInfo(const void *buf) {
return ::flatbuffers::GetSizePrefixedRoot<Topology::TopologyInfo>(buf);
}
template <bool B = false>
inline bool VerifyTopologyInfoBuffer(
::flatbuffers::VerifierTemplate<B> &verifier) {
return verifier.template VerifyBuffer<Topology::TopologyInfo>(nullptr);
}
template <bool B = false>
inline bool VerifySizePrefixedTopologyInfoBuffer(
::flatbuffers::VerifierTemplate<B> &verifier) {
return verifier.template VerifySizePrefixedBuffer<Topology::TopologyInfo>(nullptr);
}
inline void FinishTopologyInfoBuffer(
::flatbuffers::FlatBufferBuilder &fbb,
::flatbuffers::Offset<Topology::TopologyInfo> root) {
fbb.Finish(root);
}
inline void FinishSizePrefixedTopologyInfoBuffer(
::flatbuffers::FlatBufferBuilder &fbb,
::flatbuffers::Offset<Topology::TopologyInfo> root) {
fbb.FinishSizePrefixed(root);
}
} // namespace Topology
#endif // FLATBUFFERS_GENERATED_TOPOLOGY_TOPOLOGY_H_