JointState_generated.h
Go to the documentation of this file.
1 // automatically generated by the FlatBuffers compiler, do not modify
2 
3 #ifndef FLATBUFFERS_GENERATED_JOINTSTATE_GRL_FLATBUFFER_H_
4 #define FLATBUFFERS_GENERATED_JOINTSTATE_GRL_FLATBUFFER_H_
5 
6 #include "flatbuffers/flatbuffers.h"
7 
8 
9 namespace grl {
10 namespace flatbuffer {
11 
12 struct JointState;
13 
14 struct JointState FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
15  const flatbuffers::Vector<double> *position() const { return GetPointer<const flatbuffers::Vector<double> *>(4); }
16  const flatbuffers::Vector<double> *velocity() const { return GetPointer<const flatbuffers::Vector<double> *>(6); }
17  const flatbuffers::Vector<double> *acceleration() const { return GetPointer<const flatbuffers::Vector<double> *>(8); }
18  const flatbuffers::Vector<double> *torque() const { return GetPointer<const flatbuffers::Vector<double> *>(10); }
19  bool Verify(flatbuffers::Verifier &verifier) const {
20  return VerifyTableStart(verifier) &&
21  VerifyField<flatbuffers::uoffset_t>(verifier, 4 /* position */) &&
22  verifier.Verify(position()) &&
23  VerifyField<flatbuffers::uoffset_t>(verifier, 6 /* velocity */) &&
24  verifier.Verify(velocity()) &&
25  VerifyField<flatbuffers::uoffset_t>(verifier, 8 /* acceleration */) &&
26  verifier.Verify(acceleration()) &&
27  VerifyField<flatbuffers::uoffset_t>(verifier, 10 /* torque */) &&
28  verifier.Verify(torque()) &&
29  verifier.EndTable();
30  }
31 };
32 
34  flatbuffers::FlatBufferBuilder &fbb_;
35  flatbuffers::uoffset_t start_;
36  void add_position(flatbuffers::Offset<flatbuffers::Vector<double>> position) { fbb_.AddOffset(4, position); }
37  void add_velocity(flatbuffers::Offset<flatbuffers::Vector<double>> velocity) { fbb_.AddOffset(6, velocity); }
38  void add_acceleration(flatbuffers::Offset<flatbuffers::Vector<double>> acceleration) { fbb_.AddOffset(8, acceleration); }
39  void add_torque(flatbuffers::Offset<flatbuffers::Vector<double>> torque) { fbb_.AddOffset(10, torque); }
40  JointStateBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); }
41  JointStateBuilder &operator=(const JointStateBuilder &);
42  flatbuffers::Offset<JointState> Finish() {
43  auto o = flatbuffers::Offset<JointState>(fbb_.EndTable(start_, 4));
44  return o;
45  }
46 };
47 
48 inline flatbuffers::Offset<JointState> CreateJointState(flatbuffers::FlatBufferBuilder &_fbb,
49  flatbuffers::Offset<flatbuffers::Vector<double>> position = 0,
50  flatbuffers::Offset<flatbuffers::Vector<double>> velocity = 0,
51  flatbuffers::Offset<flatbuffers::Vector<double>> acceleration = 0,
52  flatbuffers::Offset<flatbuffers::Vector<double>> torque = 0) {
53  JointStateBuilder builder_(_fbb);
54  builder_.add_torque(torque);
56  builder_.add_velocity(velocity);
57  builder_.add_position(position);
58  return builder_.Finish();
59 }
60 
61 inline const grl::flatbuffer::JointState *GetJointState(const void *buf) { return flatbuffers::GetRoot<grl::flatbuffer::JointState>(buf); }
62 
63 inline bool VerifyJointStateBuffer(flatbuffers::Verifier &verifier) { return verifier.VerifyBuffer<grl::flatbuffer::JointState>(); }
64 
65 inline void FinishJointStateBuffer(flatbuffers::FlatBufferBuilder &fbb, flatbuffers::Offset<grl::flatbuffer::JointState> root) { fbb.Finish(root); }
66 
67 } // namespace flatbuffer
68 } // namespace grl
69 
70 #endif // FLATBUFFERS_GENERATED_JOINTSTATE_GRL_FLATBUFFER_H_
void FinishJointStateBuffer(flatbuffers::FlatBufferBuilder &fbb, flatbuffers::Offset< grl::flatbuffer::JointState > root)
JointStateBuilder(flatbuffers::FlatBufferBuilder &_fbb)
bool VerifyJointStateBuffer(flatbuffers::Verifier &verifier)
const flatbuffers::Vector< double > * acceleration() const
void add_acceleration(flatbuffers::Offset< flatbuffers::Vector< double >> acceleration)
bool Verify(flatbuffers::Verifier &verifier) const
void add_position(flatbuffers::Offset< flatbuffers::Vector< double >> position)
const flatbuffers::Vector< double > * torque() const
flatbuffers::FlatBufferBuilder & fbb_
const grl::flatbuffer::JointState * GetJointState(const void *buf)
void add_torque(flatbuffers::Offset< flatbuffers::Vector< double >> torque)
void add_velocity(flatbuffers::Offset< flatbuffers::Vector< double >> velocity)
flatbuffers::Offset< JointState > Finish()
flatbuffers::Offset< JointState > CreateJointState(flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset< flatbuffers::Vector< double >> position=0, flatbuffers::Offset< flatbuffers::Vector< double >> velocity=0, flatbuffers::Offset< flatbuffers::Vector< double >> acceleration=0, flatbuffers::Offset< flatbuffers::Vector< double >> torque=0)
const flatbuffers::Vector< double > * position() const
const flatbuffers::Vector< double > * velocity() const