// automatically generated by the FlatBuffers compiler, do not modify


#ifndef FLATBUFFERS_GENERATED_IMUS_H_
#define FLATBUFFERS_GENERATED_IMUS_H_

#include "flatbuffers/flatbuffers.h"

struct Imu;

struct ImuPacket;

struct Imu FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
    VT_T = 4,
    VT_TEMPERATURE = 6,
    VT_ACCELEROMETER_X = 8,
    VT_ACCELEROMETER_Y = 10,
    VT_ACCELEROMETER_Z = 12,
    VT_GYROSCOPE_X = 14,
    VT_GYROSCOPE_Y = 16,
    VT_GYROSCOPE_Z = 18,
    VT_MAGNETOMETER_X = 20,
    VT_MAGNETOMETER_Y = 22,
    VT_MAGNETOMETER_Z = 24
  };
  int64_t t() const {
    return GetField<int64_t>(VT_T, 0);
  }
  float temperature() const {
    return GetField<float>(VT_TEMPERATURE, 0.0f);
  }
  float accelerometer_x() const {
    return GetField<float>(VT_ACCELEROMETER_X, 0.0f);
  }
  float accelerometer_y() const {
    return GetField<float>(VT_ACCELEROMETER_Y, 0.0f);
  }
  float accelerometer_z() const {
    return GetField<float>(VT_ACCELEROMETER_Z, 0.0f);
  }
  float gyroscope_x() const {
    return GetField<float>(VT_GYROSCOPE_X, 0.0f);
  }
  float gyroscope_y() const {
    return GetField<float>(VT_GYROSCOPE_Y, 0.0f);
  }
  float gyroscope_z() const {
    return GetField<float>(VT_GYROSCOPE_Z, 0.0f);
  }
  float magnetometer_x() const {
    return GetField<float>(VT_MAGNETOMETER_X, 0.0f);
  }
  float magnetometer_y() const {
    return GetField<float>(VT_MAGNETOMETER_Y, 0.0f);
  }
  float magnetometer_z() const {
    return GetField<float>(VT_MAGNETOMETER_Z, 0.0f);
  }
  bool Verify(flatbuffers::Verifier &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyField<int64_t>(verifier, VT_T) &&
           VerifyField<float>(verifier, VT_TEMPERATURE) &&
           VerifyField<float>(verifier, VT_ACCELEROMETER_X) &&
           VerifyField<float>(verifier, VT_ACCELEROMETER_Y) &&
           VerifyField<float>(verifier, VT_ACCELEROMETER_Z) &&
           VerifyField<float>(verifier, VT_GYROSCOPE_X) &&
           VerifyField<float>(verifier, VT_GYROSCOPE_Y) &&
           VerifyField<float>(verifier, VT_GYROSCOPE_Z) &&
           VerifyField<float>(verifier, VT_MAGNETOMETER_X) &&
           VerifyField<float>(verifier, VT_MAGNETOMETER_Y) &&
           VerifyField<float>(verifier, VT_MAGNETOMETER_Z) &&
           verifier.EndTable();
  }
};

struct ImuBuilder {
  flatbuffers::FlatBufferBuilder &fbb_;
  flatbuffers::uoffset_t start_;
  void add_t(int64_t t) {
    fbb_.AddElement<int64_t>(Imu::VT_T, t, 0);
  }
  void add_temperature(float temperature) {
    fbb_.AddElement<float>(Imu::VT_TEMPERATURE, temperature, 0.0f);
  }
  void add_accelerometer_x(float accelerometer_x) {
    fbb_.AddElement<float>(Imu::VT_ACCELEROMETER_X, accelerometer_x, 0.0f);
  }
  void add_accelerometer_y(float accelerometer_y) {
    fbb_.AddElement<float>(Imu::VT_ACCELEROMETER_Y, accelerometer_y, 0.0f);
  }
  void add_accelerometer_z(float accelerometer_z) {
    fbb_.AddElement<float>(Imu::VT_ACCELEROMETER_Z, accelerometer_z, 0.0f);
  }
  void add_gyroscope_x(float gyroscope_x) {
    fbb_.AddElement<float>(Imu::VT_GYROSCOPE_X, gyroscope_x, 0.0f);
  }
  void add_gyroscope_y(float gyroscope_y) {
    fbb_.AddElement<float>(Imu::VT_GYROSCOPE_Y, gyroscope_y, 0.0f);
  }
  void add_gyroscope_z(float gyroscope_z) {
    fbb_.AddElement<float>(Imu::VT_GYROSCOPE_Z, gyroscope_z, 0.0f);
  }
  void add_magnetometer_x(float magnetometer_x) {
    fbb_.AddElement<float>(Imu::VT_MAGNETOMETER_X, magnetometer_x, 0.0f);
  }
  void add_magnetometer_y(float magnetometer_y) {
    fbb_.AddElement<float>(Imu::VT_MAGNETOMETER_Y, magnetometer_y, 0.0f);
  }
  void add_magnetometer_z(float magnetometer_z) {
    fbb_.AddElement<float>(Imu::VT_MAGNETOMETER_Z, magnetometer_z, 0.0f);
  }
  explicit ImuBuilder(flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  ImuBuilder &operator=(const ImuBuilder &);
  flatbuffers::Offset<Imu> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = flatbuffers::Offset<Imu>(end);
    return o;
  }
};

inline flatbuffers::Offset<Imu> CreateImu(
    flatbuffers::FlatBufferBuilder &_fbb,
    int64_t t = 0,
    float temperature = 0.0f,
    float accelerometer_x = 0.0f,
    float accelerometer_y = 0.0f,
    float accelerometer_z = 0.0f,
    float gyroscope_x = 0.0f,
    float gyroscope_y = 0.0f,
    float gyroscope_z = 0.0f,
    float magnetometer_x = 0.0f,
    float magnetometer_y = 0.0f,
    float magnetometer_z = 0.0f) {
  ImuBuilder builder_(_fbb);
  builder_.add_t(t);
  builder_.add_magnetometer_z(magnetometer_z);
  builder_.add_magnetometer_y(magnetometer_y);
  builder_.add_magnetometer_x(magnetometer_x);
  builder_.add_gyroscope_z(gyroscope_z);
  builder_.add_gyroscope_y(gyroscope_y);
  builder_.add_gyroscope_x(gyroscope_x);
  builder_.add_accelerometer_z(accelerometer_z);
  builder_.add_accelerometer_y(accelerometer_y);
  builder_.add_accelerometer_x(accelerometer_x);
  builder_.add_temperature(temperature);
  return builder_.Finish();
}

struct ImuPacket FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
    VT_ELEMENTS = 4
  };
  const flatbuffers::Vector<flatbuffers::Offset<Imu>> *elements() const {
    return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<Imu>> *>(VT_ELEMENTS);
  }
  bool Verify(flatbuffers::Verifier &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyOffset(verifier, VT_ELEMENTS) &&
           verifier.VerifyVector(elements()) &&
           verifier.VerifyVectorOfTables(elements()) &&
           verifier.EndTable();
  }
};

struct ImuPacketBuilder {
  flatbuffers::FlatBufferBuilder &fbb_;
  flatbuffers::uoffset_t start_;
  void add_elements(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<Imu>>> elements) {
    fbb_.AddOffset(ImuPacket::VT_ELEMENTS, elements);
  }
  explicit ImuPacketBuilder(flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  ImuPacketBuilder &operator=(const ImuPacketBuilder &);
  flatbuffers::Offset<ImuPacket> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = flatbuffers::Offset<ImuPacket>(end);
    return o;
  }
};

inline flatbuffers::Offset<ImuPacket> CreateImuPacket(
    flatbuffers::FlatBufferBuilder &_fbb,
    flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<Imu>>> elements = 0) {
  ImuPacketBuilder builder_(_fbb);
  builder_.add_elements(elements);
  return builder_.Finish();
}

inline flatbuffers::Offset<ImuPacket> CreateImuPacketDirect(
    flatbuffers::FlatBufferBuilder &_fbb,
    const std::vector<flatbuffers::Offset<Imu>> *elements = nullptr) {
  auto elements__ = elements ? _fbb.CreateVector<flatbuffers::Offset<Imu>>(*elements) : 0;
  return CreateImuPacket(
      _fbb,
      elements__);
}

inline const ImuPacket *GetImuPacket(const void *buf) {
  return flatbuffers::GetRoot<ImuPacket>(buf);
}

inline const ImuPacket *GetSizePrefixedImuPacket(const void *buf) {
  return flatbuffers::GetSizePrefixedRoot<ImuPacket>(buf);
}

inline bool VerifyImuPacketBuffer(
    flatbuffers::Verifier &verifier) {
  return verifier.VerifyBuffer<ImuPacket>(nullptr);
}

inline bool VerifySizePrefixedImuPacketBuffer(
    flatbuffers::Verifier &verifier) {
  return verifier.VerifySizePrefixedBuffer<ImuPacket>(nullptr);
}

inline void FinishImuPacketBuffer(
    flatbuffers::FlatBufferBuilder &fbb,
    flatbuffers::Offset<ImuPacket> root) {
  fbb.Finish(root);
}

inline void FinishSizePrefixedImuPacketBuffer(
    flatbuffers::FlatBufferBuilder &fbb,
    flatbuffers::Offset<ImuPacket> root) {
  fbb.FinishSizePrefixed(root);
}

#endif  // FLATBUFFERS_GENERATED_IMUS_H_
