/****************************************************************

  Generated by Eclipse Cyclone DDS IDL to CXX Translator
  File name: LowState.idl
  Source: LowState.hpp
  Cyclone DDS: v0.10.2

*****************************************************************/
#ifndef DDSCXX_LOWSTATE_HPP
#define DDSCXX_LOWSTATE_HPP

#include <cstdint>
#include <array>

namespace msgs
{
class LowState
{
private:
 std::array<float, 12> q_ = { };
 std::array<float, 12> dq_ = { };
 std::array<float, 12> ddq_ = { };
 std::array<float, 12> tau_est_ = { };
 std::array<float, 12> tmp_ = { };
 std::array<float, 4> contact_ = { };
 std::array<float, 4> quat_ = { };
 std::array<float, 3> gyro_ = { };
 std::array<float, 3> accel_ = { };
 std::array<float, 3> rpy_ = { };
 uint8_t imu_tmp_ = 0;
 float voltage_ = 0.0f;
 float current_ = 0.0f;

public:
  LowState() = default;

  explicit LowState(
    const std::array<float, 12>& q,
    const std::array<float, 12>& dq,
    const std::array<float, 12>& ddq,
    const std::array<float, 12>& tau_est,
    const std::array<float, 12>& tmp,
    const std::array<float, 4>& contact,
    const std::array<float, 4>& quat,
    const std::array<float, 3>& gyro,
    const std::array<float, 3>& accel,
    const std::array<float, 3>& rpy,
    uint8_t imu_tmp,
    float voltage,
    float current) :
    q_(q),
    dq_(dq),
    ddq_(ddq),
    tau_est_(tau_est),
    tmp_(tmp),
    contact_(contact),
    quat_(quat),
    gyro_(gyro),
    accel_(accel),
    rpy_(rpy),
    imu_tmp_(imu_tmp),
    voltage_(voltage),
    current_(current) { }

  const std::array<float, 12>& q() const { return this->q_; }
  std::array<float, 12>& q() { return this->q_; }
  void q(const std::array<float, 12>& _val_) { this->q_ = _val_; }
  void q(std::array<float, 12>&& _val_) { this->q_ = _val_; }
  const std::array<float, 12>& dq() const { return this->dq_; }
  std::array<float, 12>& dq() { return this->dq_; }
  void dq(const std::array<float, 12>& _val_) { this->dq_ = _val_; }
  void dq(std::array<float, 12>&& _val_) { this->dq_ = _val_; }
  const std::array<float, 12>& ddq() const { return this->ddq_; }
  std::array<float, 12>& ddq() { return this->ddq_; }
  void ddq(const std::array<float, 12>& _val_) { this->ddq_ = _val_; }
  void ddq(std::array<float, 12>&& _val_) { this->ddq_ = _val_; }
  const std::array<float, 12>& tau_est() const { return this->tau_est_; }
  std::array<float, 12>& tau_est() { return this->tau_est_; }
  void tau_est(const std::array<float, 12>& _val_) { this->tau_est_ = _val_; }
  void tau_est(std::array<float, 12>&& _val_) { this->tau_est_ = _val_; }
  const std::array<float, 12>& tmp() const { return this->tmp_; }
  std::array<float, 12>& tmp() { return this->tmp_; }
  void tmp(const std::array<float, 12>& _val_) { this->tmp_ = _val_; }
  void tmp(std::array<float, 12>&& _val_) { this->tmp_ = _val_; }
  const std::array<float, 4>& contact() const { return this->contact_; }
  std::array<float, 4>& contact() { return this->contact_; }
  void contact(const std::array<float, 4>& _val_) { this->contact_ = _val_; }
  void contact(std::array<float, 4>&& _val_) { this->contact_ = _val_; }
  const std::array<float, 4>& quat() const { return this->quat_; }
  std::array<float, 4>& quat() { return this->quat_; }
  void quat(const std::array<float, 4>& _val_) { this->quat_ = _val_; }
  void quat(std::array<float, 4>&& _val_) { this->quat_ = _val_; }
  const std::array<float, 3>& gyro() const { return this->gyro_; }
  std::array<float, 3>& gyro() { return this->gyro_; }
  void gyro(const std::array<float, 3>& _val_) { this->gyro_ = _val_; }
  void gyro(std::array<float, 3>&& _val_) { this->gyro_ = _val_; }
  const std::array<float, 3>& accel() const { return this->accel_; }
  std::array<float, 3>& accel() { return this->accel_; }
  void accel(const std::array<float, 3>& _val_) { this->accel_ = _val_; }
  void accel(std::array<float, 3>&& _val_) { this->accel_ = _val_; }
  const std::array<float, 3>& rpy() const { return this->rpy_; }
  std::array<float, 3>& rpy() { return this->rpy_; }
  void rpy(const std::array<float, 3>& _val_) { this->rpy_ = _val_; }
  void rpy(std::array<float, 3>&& _val_) { this->rpy_ = _val_; }
  uint8_t imu_tmp() const { return this->imu_tmp_; }
  uint8_t& imu_tmp() { return this->imu_tmp_; }
  void imu_tmp(uint8_t _val_) { this->imu_tmp_ = _val_; }
  float voltage() const { return this->voltage_; }
  float& voltage() { return this->voltage_; }
  void voltage(float _val_) { this->voltage_ = _val_; }
  float current() const { return this->current_; }
  float& current() { return this->current_; }
  void current(float _val_) { this->current_ = _val_; }

  bool operator==(const LowState& _other) const
  {
    (void) _other;
    return q_ == _other.q_ &&
      dq_ == _other.dq_ &&
      ddq_ == _other.ddq_ &&
      tau_est_ == _other.tau_est_ &&
      tmp_ == _other.tmp_ &&
      contact_ == _other.contact_ &&
      quat_ == _other.quat_ &&
      gyro_ == _other.gyro_ &&
      accel_ == _other.accel_ &&
      rpy_ == _other.rpy_ &&
      imu_tmp_ == _other.imu_tmp_ &&
      voltage_ == _other.voltage_ &&
      current_ == _other.current_;
  }

  bool operator!=(const LowState& _other) const
  {
    return !(*this == _other);
  }

};

}

#include "dds/topic/TopicTraits.hpp"
#include "org/eclipse/cyclonedds/topic/datatopic.hpp"

namespace org {
namespace eclipse {
namespace cyclonedds {
namespace topic {

template <> constexpr const char* TopicTraits<::msgs::LowState>::getTypeName()
{
  return "msgs::LowState";
}

template <> constexpr bool TopicTraits<::msgs::LowState>::isKeyless()
{
  return true;
}

#ifdef DDSCXX_HAS_TYPE_DISCOVERY
template<> constexpr unsigned int TopicTraits<::msgs::LowState>::type_map_blob_sz() { return 930; }
template<> constexpr unsigned int TopicTraits<::msgs::LowState>::type_info_blob_sz() { return 100; }
template<> inline const uint8_t * TopicTraits<::msgs::LowState>::type_map_blob() {
  static const uint8_t blob[] = {
 0x73,  0x01,  0x00,  0x00,  0x01,  0x00,  0x00,  0x00,  0xf1,  0xec,  0xa8,  0x61,  0xd2,  0xd7,  0x0d,  0xa1, 
 0x5b,  0xdc,  0x10,  0x55,  0xb8,  0xdc,  0x20,  0x00,  0x5b,  0x01,  0x00,  0x00,  0xf1,  0x51,  0x01,  0x00, 
 0x01,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x4b,  0x01,  0x00,  0x00,  0x0d,  0x00,  0x00,  0x00, 
 0x16,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x01,  0x00,  0x90,  0xf3,  0x01,  0x00,  0x00,  0x00, 
 0x01,  0x00,  0x00,  0x00,  0x0c,  0x09,  0x76,  0x94,  0xf4,  0xa6,  0x00,  0x00,  0x16,  0x00,  0x00,  0x00, 
 0x01,  0x00,  0x00,  0x00,  0x01,  0x00,  0x90,  0xf3,  0x01,  0x00,  0x00,  0x00,  0x01,  0x00,  0x00,  0x00, 
 0x0c,  0x09,  0x47,  0xbc,  0xdc,  0xd7,  0x00,  0x00,  0x16,  0x00,  0x00,  0x00,  0x02,  0x00,  0x00,  0x00, 
 0x01,  0x00,  0x90,  0xf3,  0x01,  0x00,  0x00,  0x00,  0x01,  0x00,  0x00,  0x00,  0x0c,  0x09,  0xe9,  0x16, 
 0x89,  0x09,  0x00,  0x00,  0x16,  0x00,  0x00,  0x00,  0x03,  0x00,  0x00,  0x00,  0x01,  0x00,  0x90,  0xf3, 
 0x01,  0x00,  0x00,  0x00,  0x01,  0x00,  0x00,  0x00,  0x0c,  0x09,  0x8a,  0xf7,  0xae,  0xdf,  0x00,  0x00, 
 0x16,  0x00,  0x00,  0x00,  0x04,  0x00,  0x00,  0x00,  0x01,  0x00,  0x90,  0xf3,  0x01,  0x00,  0x00,  0x00, 
 0x01,  0x00,  0x00,  0x00,  0x0c,  0x09,  0xfa,  0x81,  0x6e,  0xdb,  0x00,  0x00,  0x16,  0x00,  0x00,  0x00, 
 0x05,  0x00,  0x00,  0x00,  0x01,  0x00,  0x90,  0xf3,  0x01,  0x00,  0x00,  0x00,  0x01,  0x00,  0x00,  0x00, 
 0x04,  0x09,  0x2f,  0x8a,  0x6b,  0xf3,  0x00,  0x00,  0x16,  0x00,  0x00,  0x00,  0x06,  0x00,  0x00,  0x00, 
 0x01,  0x00,  0x90,  0xf3,  0x01,  0x00,  0x00,  0x00,  0x01,  0x00,  0x00,  0x00,  0x04,  0x09,  0x21,  0xd7, 
 0xdc,  0x6a,  0x00,  0x00,  0x16,  0x00,  0x00,  0x00,  0x07,  0x00,  0x00,  0x00,  0x01,  0x00,  0x90,  0xf3, 
 0x01,  0x00,  0x00,  0x00,  0x01,  0x00,  0x00,  0x00,  0x03,  0x09,  0x41,  0xe1,  0xdb,  0x58,  0x00,  0x00, 
 0x16,  0x00,  0x00,  0x00,  0x08,  0x00,  0x00,  0x00,  0x01,  0x00,  0x90,  0xf3,  0x01,  0x00,  0x00,  0x00, 
 0x01,  0x00,  0x00,  0x00,  0x03,  0x09,  0x98,  0x30,  0x99,  0x65,  0x00,  0x00,  0x16,  0x00,  0x00,  0x00, 
 0x09,  0x00,  0x00,  0x00,  0x01,  0x00,  0x90,  0xf3,  0x01,  0x00,  0x00,  0x00,  0x01,  0x00,  0x00,  0x00, 
 0x03,  0x09,  0xb0,  0x7d,  0x92,  0xed,  0x00,  0x00,  0x0b,  0x00,  0x00,  0x00,  0x0a,  0x00,  0x00,  0x00, 
 0x01,  0x00,  0x02,  0x04,  0x25,  0x70,  0x6e,  0x00,  0x0b,  0x00,  0x00,  0x00,  0x0b,  0x00,  0x00,  0x00, 
 0x01,  0x00,  0x09,  0xe4,  0x37,  0xba,  0x43,  0x00,  0x0b,  0x00,  0x00,  0x00,  0x0c,  0x00,  0x00,  0x00, 
 0x01,  0x00,  0x09,  0x43,  0xb5,  0xc9,  0x17,  0x00,  0xfe,  0x01,  0x00,  0x00,  0x01,  0x00,  0x00,  0x00, 
 0xf2,  0xf7,  0x0b,  0xf4,  0x7b,  0xfb,  0x17,  0xea,  0xce,  0xcb,  0x7f,  0x4c,  0xbc,  0x81,  0x4c,  0x00, 
 0xe6,  0x01,  0x00,  0x00,  0xf2,  0x51,  0x01,  0x00,  0x17,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00, 
 0x0f,  0x00,  0x00,  0x00,  0x6d,  0x73,  0x67,  0x73,  0x3a,  0x3a,  0x4c,  0x6f,  0x77,  0x53,  0x74,  0x61, 
 0x74,  0x65,  0x00,  0x00,  0xc2,  0x01,  0x00,  0x00,  0x0d,  0x00,  0x00,  0x00,  0x1c,  0x00,  0x00,  0x00, 
 0x00,  0x00,  0x00,  0x00,  0x01,  0x00,  0x90,  0xf3,  0x01,  0x00,  0x00,  0x00,  0x01,  0x00,  0x00,  0x00, 
 0x0c,  0x09,  0x00,  0x00,  0x02,  0x00,  0x00,  0x00,  0x71,  0x00,  0x00,  0x00,  0x1d,  0x00,  0x00,  0x00, 
 0x01,  0x00,  0x00,  0x00,  0x01,  0x00,  0x90,  0xf3,  0x01,  0x00,  0x00,  0x00,  0x01,  0x00,  0x00,  0x00, 
 0x0c,  0x09,  0x00,  0x00,  0x03,  0x00,  0x00,  0x00,  0x64,  0x71,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00, 
 0x1e,  0x00,  0x00,  0x00,  0x02,  0x00,  0x00,  0x00,  0x01,  0x00,  0x90,  0xf3,  0x01,  0x00,  0x00,  0x00, 
 0x01,  0x00,  0x00,  0x00,  0x0c,  0x09,  0x00,  0x00,  0x04,  0x00,  0x00,  0x00,  0x64,  0x64,  0x71,  0x00, 
 0x00,  0x00,  0x00,  0x00,  0x22,  0x00,  0x00,  0x00,  0x03,  0x00,  0x00,  0x00,  0x01,  0x00,  0x90,  0xf3, 
 0x01,  0x00,  0x00,  0x00,  0x01,  0x00,  0x00,  0x00,  0x0c,  0x09,  0x00,  0x00,  0x08,  0x00,  0x00,  0x00, 
 0x74,  0x61,  0x75,  0x5f,  0x65,  0x73,  0x74,  0x00,  0x00,  0x00,  0x00,  0x00,  0x1e,  0x00,  0x00,  0x00, 
 0x04,  0x00,  0x00,  0x00,  0x01,  0x00,  0x90,  0xf3,  0x01,  0x00,  0x00,  0x00,  0x01,  0x00,  0x00,  0x00, 
 0x0c,  0x09,  0x00,  0x00,  0x04,  0x00,  0x00,  0x00,  0x74,  0x6d,  0x70,  0x00,  0x00,  0x00,  0x00,  0x00, 
 0x22,  0x00,  0x00,  0x00,  0x05,  0x00,  0x00,  0x00,  0x01,  0x00,  0x90,  0xf3,  0x01,  0x00,  0x00,  0x00, 
 0x01,  0x00,  0x00,  0x00,  0x04,  0x09,  0x00,  0x00,  0x08,  0x00,  0x00,  0x00,  0x63,  0x6f,  0x6e,  0x74, 
 0x61,  0x63,  0x74,  0x00,  0x00,  0x00,  0x00,  0x00,  0x1f,  0x00,  0x00,  0x00,  0x06,  0x00,  0x00,  0x00, 
 0x01,  0x00,  0x90,  0xf3,  0x01,  0x00,  0x00,  0x00,  0x01,  0x00,  0x00,  0x00,  0x04,  0x09,  0x00,  0x00, 
 0x05,  0x00,  0x00,  0x00,  0x71,  0x75,  0x61,  0x74,  0x00,  0x00,  0x00,  0x00,  0x1f,  0x00,  0x00,  0x00, 
 0x07,  0x00,  0x00,  0x00,  0x01,  0x00,  0x90,  0xf3,  0x01,  0x00,  0x00,  0x00,  0x01,  0x00,  0x00,  0x00, 
 0x03,  0x09,  0x00,  0x00,  0x05,  0x00,  0x00,  0x00,  0x67,  0x79,  0x72,  0x6f,  0x00,  0x00,  0x00,  0x00, 
 0x20,  0x00,  0x00,  0x00,  0x08,  0x00,  0x00,  0x00,  0x01,  0x00,  0x90,  0xf3,  0x01,  0x00,  0x00,  0x00, 
 0x01,  0x00,  0x00,  0x00,  0x03,  0x09,  0x00,  0x00,  0x06,  0x00,  0x00,  0x00,  0x61,  0x63,  0x63,  0x65, 
 0x6c,  0x00,  0x00,  0x00,  0x1e,  0x00,  0x00,  0x00,  0x09,  0x00,  0x00,  0x00,  0x01,  0x00,  0x90,  0xf3, 
 0x01,  0x00,  0x00,  0x00,  0x01,  0x00,  0x00,  0x00,  0x03,  0x09,  0x00,  0x00,  0x04,  0x00,  0x00,  0x00, 
 0x72,  0x70,  0x79,  0x00,  0x00,  0x00,  0x00,  0x00,  0x16,  0x00,  0x00,  0x00,  0x0a,  0x00,  0x00,  0x00, 
 0x01,  0x00,  0x02,  0x00,  0x08,  0x00,  0x00,  0x00,  0x69,  0x6d,  0x75,  0x5f,  0x74,  0x6d,  0x70,  0x00, 
 0x00,  0x00,  0x00,  0x00,  0x16,  0x00,  0x00,  0x00,  0x0b,  0x00,  0x00,  0x00,  0x01,  0x00,  0x09,  0x00, 
 0x08,  0x00,  0x00,  0x00,  0x76,  0x6f,  0x6c,  0x74,  0x61,  0x67,  0x65,  0x00,  0x00,  0x00,  0x00,  0x00, 
 0x16,  0x00,  0x00,  0x00,  0x0c,  0x00,  0x00,  0x00,  0x01,  0x00,  0x09,  0x00,  0x08,  0x00,  0x00,  0x00, 
 0x63,  0x75,  0x72,  0x72,  0x65,  0x6e,  0x74,  0x00,  0x00,  0x00,  0x00,  0x00,  0x22,  0x00,  0x00,  0x00, 
 0x01,  0x00,  0x00,  0x00,  0xf2,  0xf7,  0x0b,  0xf4,  0x7b,  0xfb,  0x17,  0xea,  0xce,  0xcb,  0x7f,  0x4c, 
 0xbc,  0x81,  0x4c,  0xf1,  0xec,  0xa8,  0x61,  0xd2,  0xd7,  0x0d,  0xa1,  0x5b,  0xdc,  0x10,  0x55,  0xb8, 
 0xdc,  0x20, };
  return blob;
}
template<> inline const uint8_t * TopicTraits<::msgs::LowState>::type_info_blob() {
  static const uint8_t blob[] = {
 0x60,  0x00,  0x00,  0x00,  0x01,  0x10,  0x00,  0x40,  0x28,  0x00,  0x00,  0x00,  0x24,  0x00,  0x00,  0x00, 
 0x14,  0x00,  0x00,  0x00,  0xf1,  0xec,  0xa8,  0x61,  0xd2,  0xd7,  0x0d,  0xa1,  0x5b,  0xdc,  0x10,  0x55, 
 0xb8,  0xdc,  0x20,  0x00,  0x5f,  0x01,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x04,  0x00,  0x00,  0x00, 
 0x00,  0x00,  0x00,  0x00,  0x02,  0x10,  0x00,  0x40,  0x28,  0x00,  0x00,  0x00,  0x24,  0x00,  0x00,  0x00, 
 0x14,  0x00,  0x00,  0x00,  0xf2,  0xf7,  0x0b,  0xf4,  0x7b,  0xfb,  0x17,  0xea,  0xce,  0xcb,  0x7f,  0x4c, 
 0xbc,  0x81,  0x4c,  0x00,  0xea,  0x01,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x04,  0x00,  0x00,  0x00, 
 0x00,  0x00,  0x00,  0x00, };
  return blob;
}
#endif //DDSCXX_HAS_TYPE_DISCOVERY

} //namespace topic
} //namespace cyclonedds
} //namespace eclipse
} //namespace org

namespace dds {
namespace topic {

template <>
struct topic_type_name<::msgs::LowState>
{
    static std::string value()
    {
      return org::eclipse::cyclonedds::topic::TopicTraits<::msgs::LowState>::getTypeName();
    }
};

}
}

REGISTER_TOPIC_TYPE(::msgs::LowState)

namespace org{
namespace eclipse{
namespace cyclonedds{
namespace core{
namespace cdr{

template<>
propvec &get_type_props<::msgs::LowState>();

template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
bool write(T& streamer, const ::msgs::LowState& instance, entity_properties_t *props) {
  (void)instance;
  if (!streamer.start_struct(*props))
    return false;
  auto prop = streamer.first_entity(props);
  while (prop) {
    switch (prop->m_id) {
      case 0:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!write(streamer, instance.q()[0], instance.q().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 1:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!write(streamer, instance.dq()[0], instance.dq().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 2:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!write(streamer, instance.ddq()[0], instance.ddq().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 3:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!write(streamer, instance.tau_est()[0], instance.tau_est().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 4:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!write(streamer, instance.tmp()[0], instance.tmp().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 5:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!write(streamer, instance.contact()[0], instance.contact().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 6:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!write(streamer, instance.quat()[0], instance.quat().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 7:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!write(streamer, instance.gyro()[0], instance.gyro().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 8:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!write(streamer, instance.accel()[0], instance.accel().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 9:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!write(streamer, instance.rpy()[0], instance.rpy().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 10:
      if (!streamer.start_member(*prop))
        return false;
      if (!write(streamer, instance.imu_tmp()))
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 11:
      if (!streamer.start_member(*prop))
        return false;
      if (!write(streamer, instance.voltage()))
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 12:
      if (!streamer.start_member(*prop))
        return false;
      if (!write(streamer, instance.current()))
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
    }
    prop = streamer.next_entity(prop);
  }
  return streamer.finish_struct(*props);
}

template<typename S, std::enable_if_t<std::is_base_of<cdr_stream, S>::value, bool> = true >
bool write(S& str, const ::msgs::LowState& instance, bool as_key) {
  auto &props = get_type_props<::msgs::LowState>();
  str.set_mode(cdr_stream::stream_mode::write, as_key);
  return write(str, instance, props.data()); 
}

template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
bool read(T& streamer, ::msgs::LowState& instance, entity_properties_t *props) {
  (void)instance;
  if (!streamer.start_struct(*props))
    return false;
  auto prop = streamer.first_entity(props);
  while (prop) {
    switch (prop->m_id) {
      case 0:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!read(streamer, instance.q()[0], instance.q().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 1:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!read(streamer, instance.dq()[0], instance.dq().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 2:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!read(streamer, instance.ddq()[0], instance.ddq().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 3:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!read(streamer, instance.tau_est()[0], instance.tau_est().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 4:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!read(streamer, instance.tmp()[0], instance.tmp().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 5:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!read(streamer, instance.contact()[0], instance.contact().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 6:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!read(streamer, instance.quat()[0], instance.quat().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 7:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!read(streamer, instance.gyro()[0], instance.gyro().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 8:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!read(streamer, instance.accel()[0], instance.accel().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 9:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!read(streamer, instance.rpy()[0], instance.rpy().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 10:
      if (!streamer.start_member(*prop))
        return false;
      if (!read(streamer, instance.imu_tmp()))
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 11:
      if (!streamer.start_member(*prop))
        return false;
      if (!read(streamer, instance.voltage()))
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 12:
      if (!streamer.start_member(*prop))
        return false;
      if (!read(streamer, instance.current()))
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
    }
    prop = streamer.next_entity(prop);
  }
  return streamer.finish_struct(*props);
}

template<typename S, std::enable_if_t<std::is_base_of<cdr_stream, S>::value, bool> = true >
bool read(S& str, ::msgs::LowState& instance, bool as_key) {
  auto &props = get_type_props<::msgs::LowState>();
  str.set_mode(cdr_stream::stream_mode::read, as_key);
  return read(str, instance, props.data()); 
}

template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
bool move(T& streamer, const ::msgs::LowState& instance, entity_properties_t *props) {
  (void)instance;
  if (!streamer.start_struct(*props))
    return false;
  auto prop = streamer.first_entity(props);
  while (prop) {
    switch (prop->m_id) {
      case 0:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!move(streamer, instance.q()[0], instance.q().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 1:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!move(streamer, instance.dq()[0], instance.dq().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 2:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!move(streamer, instance.ddq()[0], instance.ddq().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 3:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!move(streamer, instance.tau_est()[0], instance.tau_est().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 4:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!move(streamer, instance.tmp()[0], instance.tmp().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 5:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!move(streamer, instance.contact()[0], instance.contact().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 6:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!move(streamer, instance.quat()[0], instance.quat().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 7:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!move(streamer, instance.gyro()[0], instance.gyro().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 8:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!move(streamer, instance.accel()[0], instance.accel().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 9:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!move(streamer, instance.rpy()[0], instance.rpy().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 10:
      if (!streamer.start_member(*prop))
        return false;
      if (!move(streamer, instance.imu_tmp()))
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 11:
      if (!streamer.start_member(*prop))
        return false;
      if (!move(streamer, instance.voltage()))
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 12:
      if (!streamer.start_member(*prop))
        return false;
      if (!move(streamer, instance.current()))
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
    }
    prop = streamer.next_entity(prop);
  }
  return streamer.finish_struct(*props);
}

template<typename S, std::enable_if_t<std::is_base_of<cdr_stream, S>::value, bool> = true >
bool move(S& str, const ::msgs::LowState& instance, bool as_key) {
  auto &props = get_type_props<::msgs::LowState>();
  str.set_mode(cdr_stream::stream_mode::move, as_key);
  return move(str, instance, props.data()); 
}

template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
bool max(T& streamer, const ::msgs::LowState& instance, entity_properties_t *props) {
  (void)instance;
  if (!streamer.start_struct(*props))
    return false;
  auto prop = streamer.first_entity(props);
  while (prop) {
    switch (prop->m_id) {
      case 0:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!max(streamer, instance.q()[0], instance.q().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 1:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!max(streamer, instance.dq()[0], instance.dq().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 2:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!max(streamer, instance.ddq()[0], instance.ddq().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 3:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!max(streamer, instance.tau_est()[0], instance.tau_est().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 4:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!max(streamer, instance.tmp()[0], instance.tmp().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 5:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!max(streamer, instance.contact()[0], instance.contact().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 6:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!max(streamer, instance.quat()[0], instance.quat().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 7:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!max(streamer, instance.gyro()[0], instance.gyro().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 8:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!max(streamer, instance.accel()[0], instance.accel().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 9:
      if (!streamer.start_member(*prop))
        return false;
      if (!streamer.start_consecutive(true, true))
        return false;
      if (!max(streamer, instance.rpy()[0], instance.rpy().size()))
        return false;
      if (!streamer.finish_consecutive())
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 10:
      if (!streamer.start_member(*prop))
        return false;
      if (!max(streamer, instance.imu_tmp()))
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 11:
      if (!streamer.start_member(*prop))
        return false;
      if (!max(streamer, instance.voltage()))
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
      case 12:
      if (!streamer.start_member(*prop))
        return false;
      if (!max(streamer, instance.current()))
        return false;
      if (!streamer.finish_member(*prop))
        return false;
      break;
    }
    prop = streamer.next_entity(prop);
  }
  return streamer.finish_struct(*props);
}

template<typename S, std::enable_if_t<std::is_base_of<cdr_stream, S>::value, bool> = true >
bool max(S& str, const ::msgs::LowState& instance, bool as_key) {
  auto &props = get_type_props<::msgs::LowState>();
  str.set_mode(cdr_stream::stream_mode::max, as_key);
  return max(str, instance, props.data()); 
}

} //namespace cdr
} //namespace core
} //namespace cyclonedds
} //namespace eclipse
} //namespace org

#endif // DDSCXX_LOWSTATE_HPP