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

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

*****************************************************************/
#include "LowCmd_.hpp"

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

template<>
propvec &get_type_props<::unitree_go::msg::dds_::MotorCmd_>() {
  static thread_local std::mutex mtx;
  static thread_local propvec props;
  static thread_local entity_properties_t *props_end = nullptr;
  static thread_local std::atomic_bool initialized {false};
  key_endpoint keylist;
  if (initialized.load(std::memory_order_relaxed)) {
    auto ptr = props.data();
    while (ptr < props_end)
      (ptr++)->is_present = false;
    return props;
  }
  std::lock_guard<std::mutex> lock(mtx);
  if (initialized.load(std::memory_order_relaxed)) {
    auto ptr = props.data();
    while (ptr < props_end)
      (ptr++)->is_present = false;
    return props;
  }
  props.clear();

  props.push_back(entity_properties_t(0, 0, false, bb_unset, extensibility::ext_final));  //root
  props.push_back(entity_properties_t(1, 0, false, get_bit_bound<uint8_t>(), extensibility::ext_final, false));  //::mode
  props.push_back(entity_properties_t(1, 1, false, get_bit_bound<float>(), extensibility::ext_final, false));  //::q
  props.push_back(entity_properties_t(1, 2, false, get_bit_bound<float>(), extensibility::ext_final, false));  //::dq
  props.push_back(entity_properties_t(1, 3, false, get_bit_bound<float>(), extensibility::ext_final, false));  //::tau
  props.push_back(entity_properties_t(1, 4, false, get_bit_bound<float>(), extensibility::ext_final, false));  //::kp
  props.push_back(entity_properties_t(1, 5, false, get_bit_bound<float>(), extensibility::ext_final, false));  //::kd
  props.push_back(entity_properties_t(1, 6, false, get_bit_bound<uint32_t>(), extensibility::ext_final, false));  //::reserve

  entity_properties_t::finish(props, keylist);
  props_end = props.data() + props.size();
  initialized.store(true, std::memory_order_release);
  return props;
}

template<>
propvec &get_type_props<::unitree_go::msg::dds_::BmsCmd_>() {
  static thread_local std::mutex mtx;
  static thread_local propvec props;
  static thread_local entity_properties_t *props_end = nullptr;
  static thread_local std::atomic_bool initialized {false};
  key_endpoint keylist;
  if (initialized.load(std::memory_order_relaxed)) {
    auto ptr = props.data();
    while (ptr < props_end)
      (ptr++)->is_present = false;
    return props;
  }
  std::lock_guard<std::mutex> lock(mtx);
  if (initialized.load(std::memory_order_relaxed)) {
    auto ptr = props.data();
    while (ptr < props_end)
      (ptr++)->is_present = false;
    return props;
  }
  props.clear();

  props.push_back(entity_properties_t(0, 0, false, bb_unset, extensibility::ext_final));  //root
  props.push_back(entity_properties_t(1, 0, false, get_bit_bound<uint8_t>(), extensibility::ext_final, false));  //::off
  props.push_back(entity_properties_t(1, 1, false, get_bit_bound<uint8_t>(), extensibility::ext_final, false));  //::reserve

  entity_properties_t::finish(props, keylist);
  props_end = props.data() + props.size();
  initialized.store(true, std::memory_order_release);
  return props;
}

template<>
propvec &get_type_props<::unitree_go::msg::dds_::LowCmd_>() {
  static thread_local std::mutex mtx;
  static thread_local propvec props;
  static thread_local entity_properties_t *props_end = nullptr;
  static thread_local std::atomic_bool initialized {false};
  key_endpoint keylist;
  if (initialized.load(std::memory_order_relaxed)) {
    auto ptr = props.data();
    while (ptr < props_end)
      (ptr++)->is_present = false;
    return props;
  }
  std::lock_guard<std::mutex> lock(mtx);
  if (initialized.load(std::memory_order_relaxed)) {
    auto ptr = props.data();
    while (ptr < props_end)
      (ptr++)->is_present = false;
    return props;
  }
  props.clear();

  props.push_back(entity_properties_t(0, 0, false, bb_unset, extensibility::ext_final));  //root
  props.push_back(entity_properties_t(1, 0, false, get_bit_bound<uint8_t>(), extensibility::ext_final, false));  //::head
  props.push_back(entity_properties_t(1, 1, false, get_bit_bound<uint8_t>(), extensibility::ext_final, false));  //::level_flag
  props.push_back(entity_properties_t(1, 2, false, get_bit_bound<uint8_t>(), extensibility::ext_final, false));  //::frame_reserve
  props.push_back(entity_properties_t(1, 3, false, get_bit_bound<uint32_t>(), extensibility::ext_final, false));  //::sn
  props.push_back(entity_properties_t(1, 4, false, get_bit_bound<uint32_t>(), extensibility::ext_final, false));  //::version
  props.push_back(entity_properties_t(1, 5, false, get_bit_bound<int16_t>(), extensibility::ext_final, false));  //::bandwidth
  props.push_back(entity_properties_t(1, 6, false, get_bit_bound<::unitree_go::msg::dds_::MotorCmd_>(), extensibility::ext_final, false));  //::motor_cmd
  entity_properties_t::append_struct_contents(props, get_type_props<::unitree_go::msg::dds_::MotorCmd_>());  //internal contents of ::motor_cmd
  props.push_back(entity_properties_t(1, 7, false, get_bit_bound<::unitree_go::msg::dds_::BmsCmd_>(), extensibility::ext_final, false));  //::bms_cmd
  entity_properties_t::append_struct_contents(props, get_type_props<::unitree_go::msg::dds_::BmsCmd_>());  //internal contents of ::bms_cmd
  props.push_back(entity_properties_t(1, 8, false, get_bit_bound<uint8_t>(), extensibility::ext_final, false));  //::wireless_remote
  props.push_back(entity_properties_t(1, 9, false, get_bit_bound<uint8_t>(), extensibility::ext_final, false));  //::led
  props.push_back(entity_properties_t(1, 10, false, get_bit_bound<uint8_t>(), extensibility::ext_final, false));  //::fan
  props.push_back(entity_properties_t(1, 11, false, get_bit_bound<uint8_t>(), extensibility::ext_final, false));  //::gpio
  props.push_back(entity_properties_t(1, 12, false, get_bit_bound<uint32_t>(), extensibility::ext_final, false));  //::reserve
  props.push_back(entity_properties_t(1, 13, false, get_bit_bound<uint32_t>(), extensibility::ext_final, false));  //::crc

  entity_properties_t::finish(props, keylist);
  props_end = props.data() + props.size();
  initialized.store(true, std::memory_order_release);
  return props;
}

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

