4 #ifndef FLATBUFFERS_GENERATED_BTLOGGER_SERIALIZATION_H_ 5 #define FLATBUFFERS_GENERATED_BTLOGGER_SERIALIZATION_H_ 25 struct StatusChangeLog;
47 static const char *
const names[] = {
59 const size_t index =
static_cast<int>(e);
87 static const char *
const names[] = {
101 const size_t index =
static_cast<int>(e);
123 static const char *
const names[] = {
134 const size_t index =
static_cast<int>(e);
140 uint64_t usec_since_epoch_;
144 memset(
this, 0,
sizeof(Timestamp));
146 Timestamp(uint64_t _usec_since_epoch)
147 : usec_since_epoch_(flatbuffers::EndianScalar(_usec_since_epoch)) {
149 uint64_t usec_since_epoch()
const {
150 return flatbuffers::EndianScalar(usec_since_epoch_);
161 Timestamp timestamp_;
165 memset(
this, 0,
sizeof(StatusChange));
167 StatusChange(uint16_t _uid,
NodeStatus _prev_status,
NodeStatus _status,
const Timestamp &_timestamp)
168 : uid_(flatbuffers::EndianScalar(_uid)),
169 prev_status_(flatbuffers::EndianScalar(static_cast<int8_t>(_prev_status))),
170 status_(flatbuffers::EndianScalar(static_cast<int8_t>(_status))),
172 timestamp_(_timestamp) {
175 uint16_t uid()
const {
176 return flatbuffers::EndianScalar(uid_);
179 return static_cast<NodeStatus>(flatbuffers::EndianScalar(prev_status_));
182 return static_cast<NodeStatus>(flatbuffers::EndianScalar(status_));
184 const Timestamp ×tamp()
const {
191 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
198 return GetPointer<const flatbuffers::String *>(
VT_PORT_NAME);
204 return GetPointer<const flatbuffers::String *>(
VT_TYPE_INFO);
207 return GetPointer<const flatbuffers::String *>(VT_DESCRIPTION);
209 bool Verify(flatbuffers::Verifier &verifier)
const {
210 return VerifyTableStart(verifier) &&
212 verifier.VerifyString(port_name()) &&
215 verifier.VerifyString(type_info()) &&
216 VerifyOffset(verifier, VT_DESCRIPTION) &&
217 verifier.VerifyString(description()) &&
235 fbb_.AddOffset(PortModel::VT_DESCRIPTION, description);
239 start_ = fbb_.StartTable();
243 const auto end = fbb_.EndTable(start_);
265 const char *port_name =
nullptr,
267 const char *type_info =
nullptr,
268 const char *description =
nullptr) {
269 auto port_name__ = port_name ? _fbb.
CreateString(port_name) : 0;
270 auto type_info__ = type_info ? _fbb.
CreateString(type_info) : 0;
271 auto description__ = description ? _fbb.
CreateString(description) : 0;
280 struct PortConfig FLATBUFFERS_FINAL_CLASS :
private flatbuffers::Table {
281 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
286 return GetPointer<const flatbuffers::String *>(
VT_PORT_NAME);
289 return GetPointer<const flatbuffers::String *>(VT_REMAP);
291 bool Verify(flatbuffers::Verifier &verifier)
const {
292 return VerifyTableStart(verifier) &&
294 verifier.VerifyString(port_name()) &&
295 VerifyOffset(verifier, VT_REMAP) &&
296 verifier.VerifyString(remap()) &&
308 fbb_.AddOffset(PortConfig::VT_REMAP, remap);
312 start_ = fbb_.StartTable();
316 const auto end = fbb_.EndTable(start_);
334 const char *port_name =
nullptr,
335 const char *remap =
nullptr) {
336 auto port_name__ = port_name ? _fbb.
CreateString(port_name) : 0;
344 struct TreeNode FLATBUFFERS_FINAL_CLASS :
private flatbuffers::Table {
345 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
354 return GetField<uint16_t>(
VT_UID, 0);
357 return GetPointer<const flatbuffers::Vector<uint16_t> *>(
VT_CHILDREN_UID);
369 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<PortConfig>> *>(VT_PORT_REMAPS);
371 bool Verify(flatbuffers::Verifier &verifier)
const {
372 return VerifyTableStart(verifier) &&
373 VerifyField<uint16_t>(verifier,
VT_UID) &&
375 verifier.VerifyVector(children_uid()) &&
376 VerifyField<int8_t>(verifier,
VT_STATUS) &&
378 verifier.VerifyString(instance_name()) &&
380 verifier.VerifyString(registration_name()) &&
381 VerifyOffset(verifier, VT_PORT_REMAPS) &&
382 verifier.VerifyVector(port_remaps()) &&
383 verifier.VerifyVectorOfTables(port_remaps()) &&
407 fbb_.AddOffset(TreeNode::VT_PORT_REMAPS, port_remaps);
411 start_ = fbb_.StartTable();
415 const auto end = fbb_.EndTable(start_);
444 const std::vector<uint16_t> *children_uid =
nullptr,
446 const char *instance_name =
nullptr,
447 const char *registration_name =
nullptr,
449 auto children_uid__ = children_uid ? _fbb.
CreateVector<uint16_t>(*children_uid) : 0;
450 auto instance_name__ = instance_name ? _fbb.
CreateString(instance_name) : 0;
451 auto registration_name__ = registration_name ? _fbb.
CreateString(registration_name) : 0;
463 struct NodeModel FLATBUFFERS_FINAL_CLASS :
private flatbuffers::Table {
464 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
476 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<PortModel>> *>(VT_PORTS);
478 bool Verify(flatbuffers::Verifier &verifier)
const {
479 return VerifyTableStart(verifier) &&
481 verifier.VerifyString(registration_name()) &&
482 VerifyField<int8_t>(verifier,
VT_TYPE) &&
483 VerifyOffset(verifier, VT_PORTS) &&
484 verifier.VerifyVector(ports()) &&
485 verifier.VerifyVectorOfTables(ports()) &&
500 fbb_.AddOffset(NodeModel::VT_PORTS, ports);
504 start_ = fbb_.StartTable();
508 const auto end = fbb_.EndTable(start_);
529 const char *registration_name =
nullptr,
532 auto registration_name__ = registration_name ? _fbb.
CreateString(registration_name) : 0;
541 struct BehaviorTree FLATBUFFERS_FINAL_CLASS :
private flatbuffers::Table {
542 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
551 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<TreeNode>> *>(
VT_NODES);
554 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<NodeModel>> *>(VT_NODE_MODELS);
556 bool Verify(flatbuffers::Verifier &verifier)
const {
557 return VerifyTableStart(verifier) &&
560 verifier.VerifyVector(nodes()) &&
561 verifier.VerifyVectorOfTables(nodes()) &&
562 VerifyOffset(verifier, VT_NODE_MODELS) &&
563 verifier.VerifyVector(node_models()) &&
564 verifier.VerifyVectorOfTables(node_models()) &&
579 fbb_.AddOffset(BehaviorTree::VT_NODE_MODELS, node_models);
583 start_ = fbb_.StartTable();
587 const auto end = fbb_.EndTable(start_);
595 uint16_t root_uid = 0,
607 uint16_t root_uid = 0,
619 struct StatusChangeLog FLATBUFFERS_FINAL_CLASS :
private flatbuffers::Table {
620 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
628 return GetPointer<const flatbuffers::Vector<const StatusChange *> *>(VT_STATE_CHANGES);
630 bool Verify(flatbuffers::Verifier &verifier)
const {
631 return VerifyTableStart(verifier) &&
633 verifier.VerifyTable(behavior_tree()) &&
634 VerifyOffset(verifier, VT_STATE_CHANGES) &&
635 verifier.VerifyVector(state_changes()) &&
647 fbb_.AddOffset(StatusChangeLog::VT_STATE_CHANGES, state_changes);
651 start_ = fbb_.StartTable();
655 const auto end = fbb_.EndTable(start_);
674 const std::vector<StatusChange> *state_changes =
nullptr) {
683 return flatbuffers::GetRoot<Serialization::BehaviorTree>(buf);
687 return flatbuffers::GetSizePrefixedRoot<Serialization::BehaviorTree>(buf);
691 flatbuffers::Verifier &verifier) {
692 return verifier.VerifyBuffer<Serialization::BehaviorTree>(
nullptr);
696 flatbuffers::Verifier &verifier) {
697 return verifier.VerifySizePrefixedBuffer<Serialization::BehaviorTree>(
nullptr);
714 #endif // FLATBUFFERS_GENERATED_BTLOGGER_SERIALIZATION_H_ flatbuffers::Offset< StatusChangeLog > CreateStatusChangeLogDirect(flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset< BehaviorTree > behavior_tree=0, const std::vector< StatusChange > *state_changes=nullptr)
flatbuffers::Offset< NodeModel > CreateNodeModel(flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset< flatbuffers::String > registration_name=0, NodeType type=NodeType::UNDEFINED, flatbuffers::Offset< flatbuffers::Vector< flatbuffers::Offset< PortModel >>> ports=0)
flatbuffers::Offset< BehaviorTree > CreateBehaviorTree(flatbuffers::FlatBufferBuilder &_fbb, uint16_t root_uid=0, flatbuffers::Offset< flatbuffers::Vector< flatbuffers::Offset< TreeNode >>> nodes=0, flatbuffers::Offset< flatbuffers::Vector< flatbuffers::Offset< NodeModel >>> node_models=0)
flatbuffers::Offset< PortModel > Finish()
flatbuffers::Offset< PortConfig > Finish()
void add_direction(PortDirection direction)
void add_node_models(flatbuffers::Offset< flatbuffers::Vector< flatbuffers::Offset< NodeModel >>> node_models)
bool VerifyBehaviorTreeBuffer(flatbuffers::Verifier &verifier)
const NodeType(& EnumValuesNodeType())[6]
flatbuffers::Offset< BehaviorTree > Finish()
flatbuffers::uoffset_t start_
const flatbuffers::Vector< uint16_t > * children_uid() const
const char *const * EnumNamesNodeType()
void add_type_info(flatbuffers::Offset< flatbuffers::String > type_info)
void FinishBehaviorTreeBuffer(flatbuffers::FlatBufferBuilder &fbb, flatbuffers::Offset< Serialization::BehaviorTree > root)
void Finish(Offset< T > root, const char *file_identifier=nullptr)
Finish serializing a buffer by writing the root offset.
void add_port_remaps(flatbuffers::Offset< flatbuffers::Vector< flatbuffers::Offset< PortConfig >>> port_remaps)
void add_status(NodeStatus status)
void add_registration_name(flatbuffers::Offset< flatbuffers::String > registration_name)
const flatbuffers::Vector< const StatusChange * > * state_changes() const
flatbuffers::Offset< TreeNode > CreateTreeNode(flatbuffers::FlatBufferBuilder &_fbb, uint16_t uid=0, flatbuffers::Offset< flatbuffers::Vector< uint16_t >> children_uid=0, NodeStatus status=NodeStatus::IDLE, flatbuffers::Offset< flatbuffers::String > instance_name=0, flatbuffers::Offset< flatbuffers::String > registration_name=0, flatbuffers::Offset< flatbuffers::Vector< flatbuffers::Offset< PortConfig >>> port_remaps=0)
Offset< String > CreateString(const char *str, size_t len)
Store a string in the buffer, which can contain any binary data.
uint16_t root_uid() const
StatusChangeLogBuilder(flatbuffers::FlatBufferBuilder &_fbb)
const PortDirection(& EnumValuesPortDirection())[3]
const flatbuffers::Vector< flatbuffers::Offset< PortModel > > * ports() const
TreeNodeBuilder(flatbuffers::FlatBufferBuilder &_fbb)
PortConfigBuilder(flatbuffers::FlatBufferBuilder &_fbb)
flatbuffers::Offset< NodeModel > Finish()
flatbuffers::FlatBufferBuilder & fbb_
NodeStatus status() const
FLATBUFFERS_STRUCT_END(Timestamp, 8)
flatbuffers::Offset< TreeNode > CreateTreeNodeDirect(flatbuffers::FlatBufferBuilder &_fbb, uint16_t uid=0, const std::vector< uint16_t > *children_uid=nullptr, NodeStatus status=NodeStatus::IDLE, const char *instance_name=nullptr, const char *registration_name=nullptr, const std::vector< flatbuffers::Offset< PortConfig >> *port_remaps=nullptr)
void add_root_uid(uint16_t root_uid)
void add_instance_name(flatbuffers::Offset< flatbuffers::String > instance_name)
flatbuffers::Offset< StatusChangeLog > CreateStatusChangeLog(flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset< BehaviorTree > behavior_tree=0, flatbuffers::Offset< flatbuffers::Vector< const StatusChange * >> state_changes=0)
const char *const * EnumNamesPortDirection()
PortDirection direction() const
Helper class to hold data needed in creation of a FlatBuffer. To serialize data, you typically call o...
flatbuffers::Offset< BehaviorTree > CreateBehaviorTreeDirect(flatbuffers::FlatBufferBuilder &_fbb, uint16_t root_uid=0, const std::vector< flatbuffers::Offset< TreeNode >> *nodes=nullptr, const std::vector< flatbuffers::Offset< NodeModel >> *node_models=nullptr)
BehaviorTreeBuilder(flatbuffers::FlatBufferBuilder &_fbb)
flatbuffers::uoffset_t start_
PortModelBuilder(flatbuffers::FlatBufferBuilder &_fbb)
void add_state_changes(flatbuffers::Offset< flatbuffers::Vector< const StatusChange * >> state_changes)
const flatbuffers::String * type_info() const
const Serialization::BehaviorTree * GetSizePrefixedBehaviorTree(const void *buf)
flatbuffers::Offset< NodeModel > CreateNodeModelDirect(flatbuffers::FlatBufferBuilder &_fbb, const char *registration_name=nullptr, NodeType type=NodeType::UNDEFINED, const std::vector< flatbuffers::Offset< PortModel >> *ports=nullptr)
const Serialization::BehaviorTree * GetBehaviorTree(const void *buf)
bool VerifySizePrefixedBehaviorTreeBuffer(flatbuffers::Verifier &verifier)
flatbuffers::Offset< PortConfig > CreatePortConfig(flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset< flatbuffers::String > port_name=0, flatbuffers::Offset< flatbuffers::String > remap=0)
void add_registration_name(flatbuffers::Offset< flatbuffers::String > registration_name)
flatbuffers::uoffset_t start_
const flatbuffers::Vector< flatbuffers::Offset< PortConfig > > * port_remaps() const
const flatbuffers::String * registration_name() const
const flatbuffers::String * instance_name() const
Offset< Vector< const T * > > CreateVectorOfStructs(const T *v, size_t len)
Serialize an array of structs into a FlatBuffer vector.
void add_port_name(flatbuffers::Offset< flatbuffers::String > port_name)
flatbuffers::FlatBufferBuilder & fbb_
flatbuffers::Offset< TreeNode > Finish()
const NodeStatus(& EnumValuesNodeStatus())[4]
const flatbuffers::Vector< flatbuffers::Offset< TreeNode > > * nodes() const
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) Timestamp FLATBUFFERS_FINAL_CLASS
void add_ports(flatbuffers::Offset< flatbuffers::Vector< flatbuffers::Offset< PortModel >>> ports)
const flatbuffers::String * description() const
void add_children_uid(flatbuffers::Offset< flatbuffers::Vector< uint16_t >> children_uid)
Offset< Vector< T > > CreateVector(const T *v, size_t len)
Serialize an array into a FlatBuffer vector.
const flatbuffers::Vector< flatbuffers::Offset< NodeModel > > * node_models() const
flatbuffers::uoffset_t start_
flatbuffers::Offset< PortModel > CreatePortModel(flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset< flatbuffers::String > port_name=0, PortDirection direction=PortDirection::INPUT, flatbuffers::Offset< flatbuffers::String > type_info=0, flatbuffers::Offset< flatbuffers::String > description=0)
void add_uid(uint16_t uid)
const char * EnumNameNodeType(NodeType e)
void add_behavior_tree(flatbuffers::Offset< BehaviorTree > behavior_tree)
flatbuffers::FlatBufferBuilder & fbb_
flatbuffers::FlatBufferBuilder & fbb_
void FinishSizePrefixed(Offset< T > root, const char *file_identifier=nullptr)
Finish a buffer with a 32 bit size field pre-fixed (size of the buffer following the size field)...
bool Verify(flatbuffers::Verifier &verifier) const
const flatbuffers::String * port_name() const
const char * EnumNameNodeStatus(NodeStatus e)
flatbuffers::uoffset_t start_
flatbuffers::FlatBufferBuilder & fbb_
const char * EnumNamePortDirection(PortDirection e)
const flatbuffers::String * remap() const
void add_nodes(flatbuffers::Offset< flatbuffers::Vector< flatbuffers::Offset< TreeNode >>> nodes)
flatbuffers::uoffset_t start_
flatbuffers::Offset< StatusChangeLog > Finish()
const BehaviorTree * behavior_tree() const
const char *const * EnumNamesNodeStatus()
void add_remap(flatbuffers::Offset< flatbuffers::String > remap)
flatbuffers::FlatBufferBuilder & fbb_
flatbuffers::Offset< PortModel > CreatePortModelDirect(flatbuffers::FlatBufferBuilder &_fbb, const char *port_name=nullptr, PortDirection direction=PortDirection::INPUT, const char *type_info=nullptr, const char *description=nullptr)
void add_description(flatbuffers::Offset< flatbuffers::String > description)
NodeModelBuilder(flatbuffers::FlatBufferBuilder &_fbb)
flatbuffers::Offset< PortConfig > CreatePortConfigDirect(flatbuffers::FlatBufferBuilder &_fbb, const char *port_name=nullptr, const char *remap=nullptr)
void FinishSizePrefixedBehaviorTreeBuffer(flatbuffers::FlatBufferBuilder &fbb, flatbuffers::Offset< Serialization::BehaviorTree > root)
void add_type(NodeType type)
void add_port_name(flatbuffers::Offset< flatbuffers::String > port_name)