init
This commit is contained in:
351
unitree_SDK/include/unitree/idl/go2/AudioData_.hpp
Normal file
351
unitree_SDK/include/unitree/idl/go2/AudioData_.hpp
Normal file
@@ -0,0 +1,351 @@
|
||||
/****************************************************************
|
||||
|
||||
Generated by Eclipse Cyclone DDS IDL to CXX Translator
|
||||
File name: AudioData_.idl
|
||||
Source: AudioData_.hpp
|
||||
Cyclone DDS: v0.10.2
|
||||
|
||||
*****************************************************************/
|
||||
#ifndef DDSCXX_UNITREE_IDL_GO2_AUDIODATA__HPP
|
||||
#define DDSCXX_UNITREE_IDL_GO2_AUDIODATA__HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
namespace unitree_go
|
||||
{
|
||||
namespace msg
|
||||
{
|
||||
namespace dds_
|
||||
{
|
||||
class AudioData_
|
||||
{
|
||||
private:
|
||||
uint64_t time_frame_ = 0;
|
||||
std::vector<uint8_t> data_;
|
||||
|
||||
public:
|
||||
AudioData_() = default;
|
||||
|
||||
explicit AudioData_(
|
||||
uint64_t time_frame,
|
||||
const std::vector<uint8_t>& data) :
|
||||
time_frame_(time_frame),
|
||||
data_(data) { }
|
||||
|
||||
uint64_t time_frame() const { return this->time_frame_; }
|
||||
uint64_t& time_frame() { return this->time_frame_; }
|
||||
void time_frame(uint64_t _val_) { this->time_frame_ = _val_; }
|
||||
const std::vector<uint8_t>& data() const { return this->data_; }
|
||||
std::vector<uint8_t>& data() { return this->data_; }
|
||||
void data(const std::vector<uint8_t>& _val_) { this->data_ = _val_; }
|
||||
void data(std::vector<uint8_t>&& _val_) { this->data_ = _val_; }
|
||||
|
||||
bool operator==(const AudioData_& _other) const
|
||||
{
|
||||
(void) _other;
|
||||
return time_frame_ == _other.time_frame_ &&
|
||||
data_ == _other.data_;
|
||||
}
|
||||
|
||||
bool operator!=(const AudioData_& _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<::unitree_go::msg::dds_::AudioData_>::getTypeName()
|
||||
{
|
||||
return "unitree_go::msg::dds_::AudioData_";
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::AudioData_>::isSelfContained()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::AudioData_>::isKeyless()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::AudioData_>::type_map_blob_sz() { return 270; }
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::AudioData_>::type_info_blob_sz() { return 100; }
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::AudioData_>::type_map_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0xb3, 0xbd, 0x63, 0xa8, 0xda, 0x34, 0x7d,
|
||||
0x95, 0xbc, 0x6d, 0xad, 0xc9, 0xa2, 0xe8, 0x00, 0x38, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x2d, 0x24, 0x8b, 0x17, 0x00,
|
||||
0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02,
|
||||
0x8d, 0x77, 0x7f, 0x38, 0x8f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x53, 0x16, 0x41,
|
||||
0x76, 0x22, 0xff, 0x70, 0xd8, 0x4b, 0x56, 0xaf, 0x39, 0x1a, 0x93, 0x00, 0x77, 0x00, 0x00, 0x00,
|
||||
0xf2, 0x51, 0x01, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00,
|
||||
0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a,
|
||||
0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x44, 0x61, 0x74, 0x61,
|
||||
0x5f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x74, 0x69, 0x6d, 0x65,
|
||||
0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x00,
|
||||
0x64, 0x61, 0x74, 0x61, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0xf2, 0x53, 0x16, 0x41, 0x76, 0x22, 0xff, 0x70, 0xd8, 0x4b, 0x56, 0xaf, 0x39, 0x1a, 0x93, 0xf1,
|
||||
0xb3, 0xbd, 0x63, 0xa8, 0xda, 0x34, 0x7d, 0x95, 0xbc, 0x6d, 0xad, 0xc9, 0xa2, 0xe8, };
|
||||
return blob;
|
||||
}
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::AudioData_>::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, 0xb3, 0xbd, 0x63, 0xa8, 0xda, 0x34, 0x7d, 0x95, 0xbc, 0x6d, 0xad,
|
||||
0xc9, 0xa2, 0xe8, 0x00, 0x3c, 0x00, 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, 0x53, 0x16, 0x41, 0x76, 0x22, 0xff, 0x70, 0xd8, 0x4b, 0x56, 0xaf,
|
||||
0x39, 0x1a, 0x93, 0x00, 0x7b, 0x00, 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<::unitree_go::msg::dds_::AudioData_>
|
||||
{
|
||||
static std::string value()
|
||||
{
|
||||
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::AudioData_>::getTypeName();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::AudioData_)
|
||||
|
||||
namespace org{
|
||||
namespace eclipse{
|
||||
namespace cyclonedds{
|
||||
namespace core{
|
||||
namespace cdr{
|
||||
|
||||
template<>
|
||||
propvec &get_type_props<::unitree_go::msg::dds_::AudioData_>();
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
|
||||
bool write(T& streamer, const ::unitree_go::msg::dds_::AudioData_& 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 (!write(streamer, instance.time_frame()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.data().size());
|
||||
if (!write(streamer, se_1))
|
||||
return false;
|
||||
if (se_1 > 0 &&
|
||||
!write(streamer, instance.data()[0], se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::AudioData_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::AudioData_>();
|
||||
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, ::unitree_go::msg::dds_::AudioData_& 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 (!read(streamer, instance.time_frame()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.data().size());
|
||||
if (!read(streamer, se_1))
|
||||
return false;
|
||||
instance.data().resize(se_1);
|
||||
if (se_1 > 0 &&
|
||||
!read(streamer, instance.data()[0], se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
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, ::unitree_go::msg::dds_::AudioData_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::AudioData_>();
|
||||
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 ::unitree_go::msg::dds_::AudioData_& 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 (!move(streamer, instance.time_frame()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.data().size());
|
||||
if (!move(streamer, se_1))
|
||||
return false;
|
||||
if (se_1 > 0 &&
|
||||
!move(streamer, uint8_t(), se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::AudioData_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::AudioData_>();
|
||||
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 ::unitree_go::msg::dds_::AudioData_& 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 (!max(streamer, instance.time_frame()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = 0;
|
||||
if (!max(streamer, se_1))
|
||||
return false;
|
||||
if (se_1 > 0 &&
|
||||
!max(streamer, uint8_t(), se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
streamer.position(SIZE_MAX);
|
||||
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 ::unitree_go::msg::dds_::AudioData_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::AudioData_>();
|
||||
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_UNITREE_IDL_GO2_AUDIODATA__HPP
|
||||
321
unitree_SDK/include/unitree/idl/go2/BmsCmd_.hpp
Normal file
321
unitree_SDK/include/unitree/idl/go2/BmsCmd_.hpp
Normal file
@@ -0,0 +1,321 @@
|
||||
/****************************************************************
|
||||
|
||||
Generated by Eclipse Cyclone DDS IDL to CXX Translator
|
||||
File name: BmsCmd_.idl
|
||||
Source: BmsCmd_.hpp
|
||||
Cyclone DDS: v0.10.2
|
||||
|
||||
*****************************************************************/
|
||||
#ifndef DDSCXX_UNITREE_IDL_GO2_BMSCMD__HPP
|
||||
#define DDSCXX_UNITREE_IDL_GO2_BMSCMD__HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <array>
|
||||
|
||||
namespace unitree_go
|
||||
{
|
||||
namespace msg
|
||||
{
|
||||
namespace dds_
|
||||
{
|
||||
class BmsCmd_
|
||||
{
|
||||
private:
|
||||
uint8_t off_ = 0;
|
||||
std::array<uint8_t, 3> reserve_ = { };
|
||||
|
||||
public:
|
||||
BmsCmd_() = default;
|
||||
|
||||
explicit BmsCmd_(
|
||||
uint8_t off,
|
||||
const std::array<uint8_t, 3>& reserve) :
|
||||
off_(off),
|
||||
reserve_(reserve) { }
|
||||
|
||||
uint8_t off() const { return this->off_; }
|
||||
uint8_t& off() { return this->off_; }
|
||||
void off(uint8_t _val_) { this->off_ = _val_; }
|
||||
const std::array<uint8_t, 3>& reserve() const { return this->reserve_; }
|
||||
std::array<uint8_t, 3>& reserve() { return this->reserve_; }
|
||||
void reserve(const std::array<uint8_t, 3>& _val_) { this->reserve_ = _val_; }
|
||||
void reserve(std::array<uint8_t, 3>&& _val_) { this->reserve_ = _val_; }
|
||||
|
||||
bool operator==(const BmsCmd_& _other) const
|
||||
{
|
||||
(void) _other;
|
||||
return off_ == _other.off_ &&
|
||||
reserve_ == _other.reserve_;
|
||||
}
|
||||
|
||||
bool operator!=(const BmsCmd_& _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<::unitree_go::msg::dds_::BmsCmd_>::getTypeName()
|
||||
{
|
||||
return "unitree_go::msg::dds_::BmsCmd_";
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::BmsCmd_>::isKeyless()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::BmsCmd_>::type_map_blob_sz() { return 278; }
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::BmsCmd_>::type_info_blob_sz() { return 100; }
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::BmsCmd_>::type_map_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0x56, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x3e, 0x8e, 0xb6, 0x7c, 0x25, 0xfd, 0xe0,
|
||||
0x7e, 0x52, 0xcf, 0x51, 0xed, 0x4a, 0x23, 0x00, 0x3e, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x32, 0x62, 0xd4, 0x8d, 0x00,
|
||||
0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x03, 0x02, 0x9c, 0x3b, 0x62, 0x94, 0x00, 0x00, 0x8e, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0xf2, 0x31, 0xa8, 0x59, 0x24, 0x05, 0x6b, 0x7a, 0xf3, 0xd3, 0xf1, 0x6b,
|
||||
0x34, 0x22, 0x33, 0x00, 0x76, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x27, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f,
|
||||
0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x42,
|
||||
0x6d, 0x73, 0x43, 0x6d, 0x64, 0x5f, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x6f, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x02, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x31, 0xa8, 0x59, 0x24, 0x05, 0x6b, 0x7a,
|
||||
0xf3, 0xd3, 0xf1, 0x6b, 0x34, 0x22, 0x33, 0xf1, 0x3e, 0x8e, 0xb6, 0x7c, 0x25, 0xfd, 0xe0, 0x7e,
|
||||
0x52, 0xcf, 0x51, 0xed, 0x4a, 0x23, };
|
||||
return blob;
|
||||
}
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::BmsCmd_>::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, 0x3e, 0x8e, 0xb6, 0x7c, 0x25, 0xfd, 0xe0, 0x7e, 0x52, 0xcf, 0x51,
|
||||
0xed, 0x4a, 0x23, 0x00, 0x42, 0x00, 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, 0x31, 0xa8, 0x59, 0x24, 0x05, 0x6b, 0x7a, 0xf3, 0xd3, 0xf1, 0x6b,
|
||||
0x34, 0x22, 0x33, 0x00, 0x7a, 0x00, 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<::unitree_go::msg::dds_::BmsCmd_>
|
||||
{
|
||||
static std::string value()
|
||||
{
|
||||
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::BmsCmd_>::getTypeName();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::BmsCmd_)
|
||||
|
||||
namespace org{
|
||||
namespace eclipse{
|
||||
namespace cyclonedds{
|
||||
namespace core{
|
||||
namespace cdr{
|
||||
|
||||
template<>
|
||||
propvec &get_type_props<::unitree_go::msg::dds_::BmsCmd_>();
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
|
||||
bool write(T& streamer, const ::unitree_go::msg::dds_::BmsCmd_& 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 (!write(streamer, instance.off()))
|
||||
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.reserve()[0], instance.reserve().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::BmsCmd_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::BmsCmd_>();
|
||||
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, ::unitree_go::msg::dds_::BmsCmd_& 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 (!read(streamer, instance.off()))
|
||||
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.reserve()[0], instance.reserve().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
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, ::unitree_go::msg::dds_::BmsCmd_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::BmsCmd_>();
|
||||
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 ::unitree_go::msg::dds_::BmsCmd_& 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 (!move(streamer, instance.off()))
|
||||
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.reserve()[0], instance.reserve().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::BmsCmd_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::BmsCmd_>();
|
||||
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 ::unitree_go::msg::dds_::BmsCmd_& 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 (!max(streamer, instance.off()))
|
||||
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.reserve()[0], instance.reserve().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::BmsCmd_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::BmsCmd_>();
|
||||
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_UNITREE_IDL_GO2_BMSCMD__HPP
|
||||
651
unitree_SDK/include/unitree/idl/go2/BmsState_.hpp
Normal file
651
unitree_SDK/include/unitree/idl/go2/BmsState_.hpp
Normal file
@@ -0,0 +1,651 @@
|
||||
/****************************************************************
|
||||
|
||||
Generated by Eclipse Cyclone DDS IDL to CXX Translator
|
||||
File name: BmsState_.idl
|
||||
Source: BmsState_.hpp
|
||||
Cyclone DDS: v0.10.2
|
||||
|
||||
*****************************************************************/
|
||||
#ifndef DDSCXX_UNITREE_IDL_GO2_BMSSTATE__HPP
|
||||
#define DDSCXX_UNITREE_IDL_GO2_BMSSTATE__HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <array>
|
||||
|
||||
namespace unitree_go
|
||||
{
|
||||
namespace msg
|
||||
{
|
||||
namespace dds_
|
||||
{
|
||||
class BmsState_
|
||||
{
|
||||
private:
|
||||
uint8_t version_high_ = 0;
|
||||
uint8_t version_low_ = 0;
|
||||
uint8_t status_ = 0;
|
||||
uint8_t soc_ = 0;
|
||||
int32_t current_ = 0;
|
||||
uint16_t cycle_ = 0;
|
||||
std::array<uint8_t, 2> bq_ntc_ = { };
|
||||
std::array<uint8_t, 2> mcu_ntc_ = { };
|
||||
std::array<uint16_t, 15> cell_vol_ = { };
|
||||
|
||||
public:
|
||||
BmsState_() = default;
|
||||
|
||||
explicit BmsState_(
|
||||
uint8_t version_high,
|
||||
uint8_t version_low,
|
||||
uint8_t status,
|
||||
uint8_t soc,
|
||||
int32_t current,
|
||||
uint16_t cycle,
|
||||
const std::array<uint8_t, 2>& bq_ntc,
|
||||
const std::array<uint8_t, 2>& mcu_ntc,
|
||||
const std::array<uint16_t, 15>& cell_vol) :
|
||||
version_high_(version_high),
|
||||
version_low_(version_low),
|
||||
status_(status),
|
||||
soc_(soc),
|
||||
current_(current),
|
||||
cycle_(cycle),
|
||||
bq_ntc_(bq_ntc),
|
||||
mcu_ntc_(mcu_ntc),
|
||||
cell_vol_(cell_vol) { }
|
||||
|
||||
uint8_t version_high() const { return this->version_high_; }
|
||||
uint8_t& version_high() { return this->version_high_; }
|
||||
void version_high(uint8_t _val_) { this->version_high_ = _val_; }
|
||||
uint8_t version_low() const { return this->version_low_; }
|
||||
uint8_t& version_low() { return this->version_low_; }
|
||||
void version_low(uint8_t _val_) { this->version_low_ = _val_; }
|
||||
uint8_t status() const { return this->status_; }
|
||||
uint8_t& status() { return this->status_; }
|
||||
void status(uint8_t _val_) { this->status_ = _val_; }
|
||||
uint8_t soc() const { return this->soc_; }
|
||||
uint8_t& soc() { return this->soc_; }
|
||||
void soc(uint8_t _val_) { this->soc_ = _val_; }
|
||||
int32_t current() const { return this->current_; }
|
||||
int32_t& current() { return this->current_; }
|
||||
void current(int32_t _val_) { this->current_ = _val_; }
|
||||
uint16_t cycle() const { return this->cycle_; }
|
||||
uint16_t& cycle() { return this->cycle_; }
|
||||
void cycle(uint16_t _val_) { this->cycle_ = _val_; }
|
||||
const std::array<uint8_t, 2>& bq_ntc() const { return this->bq_ntc_; }
|
||||
std::array<uint8_t, 2>& bq_ntc() { return this->bq_ntc_; }
|
||||
void bq_ntc(const std::array<uint8_t, 2>& _val_) { this->bq_ntc_ = _val_; }
|
||||
void bq_ntc(std::array<uint8_t, 2>&& _val_) { this->bq_ntc_ = _val_; }
|
||||
const std::array<uint8_t, 2>& mcu_ntc() const { return this->mcu_ntc_; }
|
||||
std::array<uint8_t, 2>& mcu_ntc() { return this->mcu_ntc_; }
|
||||
void mcu_ntc(const std::array<uint8_t, 2>& _val_) { this->mcu_ntc_ = _val_; }
|
||||
void mcu_ntc(std::array<uint8_t, 2>&& _val_) { this->mcu_ntc_ = _val_; }
|
||||
const std::array<uint16_t, 15>& cell_vol() const { return this->cell_vol_; }
|
||||
std::array<uint16_t, 15>& cell_vol() { return this->cell_vol_; }
|
||||
void cell_vol(const std::array<uint16_t, 15>& _val_) { this->cell_vol_ = _val_; }
|
||||
void cell_vol(std::array<uint16_t, 15>&& _val_) { this->cell_vol_ = _val_; }
|
||||
|
||||
bool operator==(const BmsState_& _other) const
|
||||
{
|
||||
(void) _other;
|
||||
return version_high_ == _other.version_high_ &&
|
||||
version_low_ == _other.version_low_ &&
|
||||
status_ == _other.status_ &&
|
||||
soc_ == _other.soc_ &&
|
||||
current_ == _other.current_ &&
|
||||
cycle_ == _other.cycle_ &&
|
||||
bq_ntc_ == _other.bq_ntc_ &&
|
||||
mcu_ntc_ == _other.mcu_ntc_ &&
|
||||
cell_vol_ == _other.cell_vol_;
|
||||
}
|
||||
|
||||
bool operator!=(const BmsState_& _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<::unitree_go::msg::dds_::BmsState_>::getTypeName()
|
||||
{
|
||||
return "unitree_go::msg::dds_::BmsState_";
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::BmsState_>::isKeyless()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::BmsState_>::type_map_blob_sz() { return 642; }
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::BmsState_>::type_info_blob_sz() { return 100; }
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::BmsState_>::type_map_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0xde, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0xe1, 0x18, 0xaf, 0x07, 0x0b, 0xa2, 0x0b,
|
||||
0xc2, 0xe0, 0x37, 0x0c, 0xec, 0x4c, 0xbb, 0x00, 0xc6, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb6, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x75, 0x6a, 0xda, 0x84, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x51, 0x99, 0x89, 0x90, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x9a, 0xcb, 0x44, 0x54, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xc7, 0xd5, 0xf8, 0x49, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x43, 0xb5, 0xc9, 0x17, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x9a, 0x4c, 0x07, 0x40, 0x00,
|
||||
0x16, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x2a, 0x42, 0xc9, 0x1e, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x02, 0x02, 0x55, 0x65, 0x52, 0x17, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x06, 0x2d, 0x87,
|
||||
0xc3, 0x55, 0x00, 0x00, 0x73, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x2e, 0xd8, 0x57,
|
||||
0xec, 0xb6, 0xb3, 0x05, 0x79, 0x80, 0x8c, 0x15, 0xfd, 0x14, 0x3d, 0x00, 0x5b, 0x01, 0x00, 0x00,
|
||||
0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00,
|
||||
0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a,
|
||||
0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x42, 0x6d, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x5f,
|
||||
0x00, 0x00, 0x00, 0x00, 0x23, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x76, 0x65, 0x72, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x69, 0x67, 0x68, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x76, 0x65, 0x72, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x6f, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x07, 0x00, 0x00, 0x00, 0x73, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x73, 0x6f, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x16, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||
0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||
0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x63, 0x79, 0x63, 0x6c,
|
||||
0x65, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
||||
0x62, 0x71, 0x5f, 0x6e, 0x74, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x02, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x6d, 0x63, 0x75, 0x5f, 0x6e, 0x74, 0x63, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
|
||||
0x63, 0x65, 0x6c, 0x6c, 0x5f, 0x76, 0x6f, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0xf2, 0x2e, 0xd8, 0x57, 0xec, 0xb6, 0xb3, 0x05, 0x79, 0x80, 0x8c, 0x15,
|
||||
0xfd, 0x14, 0x3d, 0xf1, 0xe1, 0x18, 0xaf, 0x07, 0x0b, 0xa2, 0x0b, 0xc2, 0xe0, 0x37, 0x0c, 0xec,
|
||||
0x4c, 0xbb, };
|
||||
return blob;
|
||||
}
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::BmsState_>::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, 0xe1, 0x18, 0xaf, 0x07, 0x0b, 0xa2, 0x0b, 0xc2, 0xe0, 0x37, 0x0c,
|
||||
0xec, 0x4c, 0xbb, 0x00, 0xca, 0x00, 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, 0x2e, 0xd8, 0x57, 0xec, 0xb6, 0xb3, 0x05, 0x79, 0x80, 0x8c, 0x15,
|
||||
0xfd, 0x14, 0x3d, 0x00, 0x5f, 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<::unitree_go::msg::dds_::BmsState_>
|
||||
{
|
||||
static std::string value()
|
||||
{
|
||||
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::BmsState_>::getTypeName();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::BmsState_)
|
||||
|
||||
namespace org{
|
||||
namespace eclipse{
|
||||
namespace cyclonedds{
|
||||
namespace core{
|
||||
namespace cdr{
|
||||
|
||||
template<>
|
||||
propvec &get_type_props<::unitree_go::msg::dds_::BmsState_>();
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
|
||||
bool write(T& streamer, const ::unitree_go::msg::dds_::BmsState_& 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 (!write(streamer, instance.version_high()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.version_low()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.status()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.soc()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.current()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 5:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.cycle()))
|
||||
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.bq_ntc()[0], instance.bq_ntc().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.mcu_ntc()[0], instance.mcu_ntc().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.cell_vol()[0], instance.cell_vol().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::BmsState_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::BmsState_>();
|
||||
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, ::unitree_go::msg::dds_::BmsState_& 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 (!read(streamer, instance.version_high()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.version_low()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.status()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.soc()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.current()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 5:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.cycle()))
|
||||
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.bq_ntc()[0], instance.bq_ntc().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.mcu_ntc()[0], instance.mcu_ntc().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.cell_vol()[0], instance.cell_vol().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
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, ::unitree_go::msg::dds_::BmsState_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::BmsState_>();
|
||||
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 ::unitree_go::msg::dds_::BmsState_& 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 (!move(streamer, instance.version_high()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.version_low()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.status()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.soc()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.current()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 5:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.cycle()))
|
||||
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.bq_ntc()[0], instance.bq_ntc().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.mcu_ntc()[0], instance.mcu_ntc().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.cell_vol()[0], instance.cell_vol().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::BmsState_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::BmsState_>();
|
||||
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 ::unitree_go::msg::dds_::BmsState_& 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 (!max(streamer, instance.version_high()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.version_low()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.status()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.soc()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.current()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 5:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.cycle()))
|
||||
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.bq_ntc()[0], instance.bq_ntc().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.mcu_ntc()[0], instance.mcu_ntc().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.cell_vol()[0], instance.cell_vol().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::BmsState_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::BmsState_>();
|
||||
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_UNITREE_IDL_GO2_BMSSTATE__HPP
|
||||
309
unitree_SDK/include/unitree/idl/go2/ConfigChangeStatus_.hpp
Normal file
309
unitree_SDK/include/unitree/idl/go2/ConfigChangeStatus_.hpp
Normal file
@@ -0,0 +1,309 @@
|
||||
/****************************************************************
|
||||
|
||||
Generated by Eclipse Cyclone DDS IDL to CXX Translator
|
||||
File name: ConfigChangeStatus_.idl
|
||||
Source: ConfigChangeStatus_.hpp
|
||||
Cyclone DDS: v0.10.2
|
||||
|
||||
*****************************************************************/
|
||||
#ifndef DDSCXX_UNITREE_IDL_GO2_CONFIGCHANGESTATUS__HPP
|
||||
#define DDSCXX_UNITREE_IDL_GO2_CONFIGCHANGESTATUS__HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace unitree_go
|
||||
{
|
||||
namespace msg
|
||||
{
|
||||
namespace dds_
|
||||
{
|
||||
class ConfigChangeStatus_
|
||||
{
|
||||
private:
|
||||
std::string name_;
|
||||
std::string content_;
|
||||
|
||||
public:
|
||||
ConfigChangeStatus_() = default;
|
||||
|
||||
explicit ConfigChangeStatus_(
|
||||
const std::string& name,
|
||||
const std::string& content) :
|
||||
name_(name),
|
||||
content_(content) { }
|
||||
|
||||
const std::string& name() const { return this->name_; }
|
||||
std::string& name() { return this->name_; }
|
||||
void name(const std::string& _val_) { this->name_ = _val_; }
|
||||
void name(std::string&& _val_) { this->name_ = _val_; }
|
||||
const std::string& content() const { return this->content_; }
|
||||
std::string& content() { return this->content_; }
|
||||
void content(const std::string& _val_) { this->content_ = _val_; }
|
||||
void content(std::string&& _val_) { this->content_ = _val_; }
|
||||
|
||||
bool operator==(const ConfigChangeStatus_& _other) const
|
||||
{
|
||||
(void) _other;
|
||||
return name_ == _other.name_ &&
|
||||
content_ == _other.content_;
|
||||
}
|
||||
|
||||
bool operator!=(const ConfigChangeStatus_& _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<::unitree_go::msg::dds_::ConfigChangeStatus_>::getTypeName()
|
||||
{
|
||||
return "unitree_go::msg::dds_::ConfigChangeStatus_";
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::ConfigChangeStatus_>::isSelfContained()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::ConfigChangeStatus_>::isKeyless()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::ConfigChangeStatus_>::type_map_blob_sz() { return 266; }
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::ConfigChangeStatus_>::type_info_blob_sz() { return 100; }
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::ConfigChangeStatus_>::type_map_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0x4c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x8b, 0xab, 0x72, 0x41, 0x14, 0x34, 0x88,
|
||||
0x06, 0xaa, 0x92, 0xd1, 0x55, 0xf0, 0xe9, 0x00, 0x34, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0xb0, 0x68, 0x93, 0x1c,
|
||||
0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x9a, 0x03, 0x64, 0xb9,
|
||||
0x8e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xb5, 0xf8, 0x3d, 0x36, 0xf2, 0x55, 0x84,
|
||||
0x27, 0x72, 0xfc, 0x68, 0x2f, 0x66, 0xf5, 0x00, 0x76, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00,
|
||||
0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74,
|
||||
0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73,
|
||||
0x5f, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x05, 0x00, 0x00, 0x00,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x70, 0x00, 0x08, 0x00, 0x00, 0x00, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xb5, 0xf8, 0x3d,
|
||||
0x36, 0xf2, 0x55, 0x84, 0x27, 0x72, 0xfc, 0x68, 0x2f, 0x66, 0xf5, 0xf1, 0x8b, 0xab, 0x72, 0x41,
|
||||
0x14, 0x34, 0x88, 0x06, 0xaa, 0x92, 0xd1, 0x55, 0xf0, 0xe9, };
|
||||
return blob;
|
||||
}
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::ConfigChangeStatus_>::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, 0x8b, 0xab, 0x72, 0x41, 0x14, 0x34, 0x88, 0x06, 0xaa, 0x92, 0xd1,
|
||||
0x55, 0xf0, 0xe9, 0x00, 0x38, 0x00, 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, 0xb5, 0xf8, 0x3d, 0x36, 0xf2, 0x55, 0x84, 0x27, 0x72, 0xfc, 0x68,
|
||||
0x2f, 0x66, 0xf5, 0x00, 0x7a, 0x00, 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<::unitree_go::msg::dds_::ConfigChangeStatus_>
|
||||
{
|
||||
static std::string value()
|
||||
{
|
||||
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::ConfigChangeStatus_>::getTypeName();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::ConfigChangeStatus_)
|
||||
|
||||
namespace org{
|
||||
namespace eclipse{
|
||||
namespace cyclonedds{
|
||||
namespace core{
|
||||
namespace cdr{
|
||||
|
||||
template<>
|
||||
propvec &get_type_props<::unitree_go::msg::dds_::ConfigChangeStatus_>();
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
|
||||
bool write(T& streamer, const ::unitree_go::msg::dds_::ConfigChangeStatus_& 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 (!write_string(streamer, instance.name(), 0))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write_string(streamer, instance.content(), 0))
|
||||
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 ::unitree_go::msg::dds_::ConfigChangeStatus_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::ConfigChangeStatus_>();
|
||||
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, ::unitree_go::msg::dds_::ConfigChangeStatus_& 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 (!read_string(streamer, instance.name(), 0))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read_string(streamer, instance.content(), 0))
|
||||
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, ::unitree_go::msg::dds_::ConfigChangeStatus_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::ConfigChangeStatus_>();
|
||||
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 ::unitree_go::msg::dds_::ConfigChangeStatus_& 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 (!move_string(streamer, instance.name(), 0))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move_string(streamer, instance.content(), 0))
|
||||
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 ::unitree_go::msg::dds_::ConfigChangeStatus_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::ConfigChangeStatus_>();
|
||||
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 ::unitree_go::msg::dds_::ConfigChangeStatus_& 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 (!max_string(streamer, instance.name(), 0))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max_string(streamer, instance.content(), 0))
|
||||
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 ::unitree_go::msg::dds_::ConfigChangeStatus_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::ConfigChangeStatus_>();
|
||||
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_UNITREE_IDL_GO2_CONFIGCHANGESTATUS__HPP
|
||||
301
unitree_SDK/include/unitree/idl/go2/Error_.hpp
Normal file
301
unitree_SDK/include/unitree/idl/go2/Error_.hpp
Normal file
@@ -0,0 +1,301 @@
|
||||
/****************************************************************
|
||||
|
||||
Generated by Eclipse Cyclone DDS IDL to CXX Translator
|
||||
File name: Error_.idl
|
||||
Source: Error_.hpp
|
||||
Cyclone DDS: v0.10.2
|
||||
|
||||
*****************************************************************/
|
||||
#ifndef DDSCXX_UNITREE_IDL_GO2_ERROR__HPP
|
||||
#define DDSCXX_UNITREE_IDL_GO2_ERROR__HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace unitree_go
|
||||
{
|
||||
namespace msg
|
||||
{
|
||||
namespace dds_
|
||||
{
|
||||
class Error_
|
||||
{
|
||||
private:
|
||||
uint32_t source_ = 0;
|
||||
uint32_t state_ = 0;
|
||||
|
||||
public:
|
||||
Error_() = default;
|
||||
|
||||
explicit Error_(
|
||||
uint32_t source,
|
||||
uint32_t state) :
|
||||
source_(source),
|
||||
state_(state) { }
|
||||
|
||||
uint32_t source() const { return this->source_; }
|
||||
uint32_t& source() { return this->source_; }
|
||||
void source(uint32_t _val_) { this->source_ = _val_; }
|
||||
uint32_t state() const { return this->state_; }
|
||||
uint32_t& state() { return this->state_; }
|
||||
void state(uint32_t _val_) { this->state_ = _val_; }
|
||||
|
||||
bool operator==(const Error_& _other) const
|
||||
{
|
||||
(void) _other;
|
||||
return source_ == _other.source_ &&
|
||||
state_ == _other.state_;
|
||||
}
|
||||
|
||||
bool operator!=(const Error_& _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<::unitree_go::msg::dds_::Error_>::getTypeName()
|
||||
{
|
||||
return "unitree_go::msg::dds_::Error_";
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::Error_>::isKeyless()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::Error_>::type_map_blob_sz() { return 254; }
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::Error_>::type_info_blob_sz() { return 100; }
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::Error_>::type_map_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0x4b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x76, 0x79, 0x56, 0x84, 0x80, 0x73, 0x64,
|
||||
0x1f, 0xee, 0x3b, 0xc7, 0x0e, 0xd6, 0x56, 0x00, 0x33, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x36, 0xcd, 0x38, 0xf4, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x9e, 0xd3, 0x9e, 0x2e, 0x00,
|
||||
0x84, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x8f, 0x76, 0x98, 0x54, 0xc5, 0x14, 0x4a,
|
||||
0x4b, 0x4c, 0xbf, 0xbe, 0x7d, 0xd9, 0x1f, 0x00, 0x6c, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00,
|
||||
0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74,
|
||||
0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73,
|
||||
0x5f, 0x3a, 0x3a, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x06, 0x00, 0x00, 0x00,
|
||||
0x73, 0x74, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0xf2, 0x8f, 0x76, 0x98, 0x54, 0xc5, 0x14, 0x4a, 0x4b, 0x4c, 0xbf, 0xbe, 0x7d, 0xd9, 0x1f, 0xf1,
|
||||
0x76, 0x79, 0x56, 0x84, 0x80, 0x73, 0x64, 0x1f, 0xee, 0x3b, 0xc7, 0x0e, 0xd6, 0x56, };
|
||||
return blob;
|
||||
}
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::Error_>::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, 0x76, 0x79, 0x56, 0x84, 0x80, 0x73, 0x64, 0x1f, 0xee, 0x3b, 0xc7,
|
||||
0x0e, 0xd6, 0x56, 0x00, 0x37, 0x00, 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, 0x8f, 0x76, 0x98, 0x54, 0xc5, 0x14, 0x4a, 0x4b, 0x4c, 0xbf, 0xbe,
|
||||
0x7d, 0xd9, 0x1f, 0x00, 0x70, 0x00, 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<::unitree_go::msg::dds_::Error_>
|
||||
{
|
||||
static std::string value()
|
||||
{
|
||||
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::Error_>::getTypeName();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::Error_)
|
||||
|
||||
namespace org{
|
||||
namespace eclipse{
|
||||
namespace cyclonedds{
|
||||
namespace core{
|
||||
namespace cdr{
|
||||
|
||||
template<>
|
||||
propvec &get_type_props<::unitree_go::msg::dds_::Error_>();
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
|
||||
bool write(T& streamer, const ::unitree_go::msg::dds_::Error_& 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 (!write(streamer, instance.source()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.state()))
|
||||
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 ::unitree_go::msg::dds_::Error_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::Error_>();
|
||||
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, ::unitree_go::msg::dds_::Error_& 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 (!read(streamer, instance.source()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.state()))
|
||||
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, ::unitree_go::msg::dds_::Error_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::Error_>();
|
||||
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 ::unitree_go::msg::dds_::Error_& 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 (!move(streamer, instance.source()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.state()))
|
||||
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 ::unitree_go::msg::dds_::Error_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::Error_>();
|
||||
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 ::unitree_go::msg::dds_::Error_& 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 (!max(streamer, instance.source()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.state()))
|
||||
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 ::unitree_go::msg::dds_::Error_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::Error_>();
|
||||
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_UNITREE_IDL_GO2_ERROR__HPP
|
||||
523
unitree_SDK/include/unitree/idl/go2/Go2FrontVideoData_.hpp
Normal file
523
unitree_SDK/include/unitree/idl/go2/Go2FrontVideoData_.hpp
Normal file
@@ -0,0 +1,523 @@
|
||||
/****************************************************************
|
||||
|
||||
Generated by Eclipse Cyclone DDS IDL to CXX Translator
|
||||
File name: Go2FrontVideoData_.idl
|
||||
Source: Go2FrontVideoData_.hpp
|
||||
Cyclone DDS: v0.10.2
|
||||
|
||||
*****************************************************************/
|
||||
#ifndef DDSCXX_UNITREE_IDL_GO2_GO2FRONTVIDEODATA__HPP
|
||||
#define DDSCXX_UNITREE_IDL_GO2_GO2FRONTVIDEODATA__HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
namespace unitree_go
|
||||
{
|
||||
namespace msg
|
||||
{
|
||||
namespace dds_
|
||||
{
|
||||
class Go2FrontVideoData_
|
||||
{
|
||||
private:
|
||||
uint64_t time_frame_ = 0;
|
||||
std::vector<uint8_t> video720p_;
|
||||
std::vector<uint8_t> video360p_;
|
||||
std::vector<uint8_t> video180p_;
|
||||
|
||||
public:
|
||||
Go2FrontVideoData_() = default;
|
||||
|
||||
explicit Go2FrontVideoData_(
|
||||
uint64_t time_frame,
|
||||
const std::vector<uint8_t>& video720p,
|
||||
const std::vector<uint8_t>& video360p,
|
||||
const std::vector<uint8_t>& video180p) :
|
||||
time_frame_(time_frame),
|
||||
video720p_(video720p),
|
||||
video360p_(video360p),
|
||||
video180p_(video180p) { }
|
||||
|
||||
uint64_t time_frame() const { return this->time_frame_; }
|
||||
uint64_t& time_frame() { return this->time_frame_; }
|
||||
void time_frame(uint64_t _val_) { this->time_frame_ = _val_; }
|
||||
const std::vector<uint8_t>& video720p() const { return this->video720p_; }
|
||||
std::vector<uint8_t>& video720p() { return this->video720p_; }
|
||||
void video720p(const std::vector<uint8_t>& _val_) { this->video720p_ = _val_; }
|
||||
void video720p(std::vector<uint8_t>&& _val_) { this->video720p_ = _val_; }
|
||||
const std::vector<uint8_t>& video360p() const { return this->video360p_; }
|
||||
std::vector<uint8_t>& video360p() { return this->video360p_; }
|
||||
void video360p(const std::vector<uint8_t>& _val_) { this->video360p_ = _val_; }
|
||||
void video360p(std::vector<uint8_t>&& _val_) { this->video360p_ = _val_; }
|
||||
const std::vector<uint8_t>& video180p() const { return this->video180p_; }
|
||||
std::vector<uint8_t>& video180p() { return this->video180p_; }
|
||||
void video180p(const std::vector<uint8_t>& _val_) { this->video180p_ = _val_; }
|
||||
void video180p(std::vector<uint8_t>&& _val_) { this->video180p_ = _val_; }
|
||||
|
||||
bool operator==(const Go2FrontVideoData_& _other) const
|
||||
{
|
||||
(void) _other;
|
||||
return time_frame_ == _other.time_frame_ &&
|
||||
video720p_ == _other.video720p_ &&
|
||||
video360p_ == _other.video360p_ &&
|
||||
video180p_ == _other.video180p_;
|
||||
}
|
||||
|
||||
bool operator!=(const Go2FrontVideoData_& _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<::unitree_go::msg::dds_::Go2FrontVideoData_>::getTypeName()
|
||||
{
|
||||
return "unitree_go::msg::dds_::Go2FrontVideoData_";
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::Go2FrontVideoData_>::isSelfContained()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::Go2FrontVideoData_>::isKeyless()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::Go2FrontVideoData_>::type_map_blob_sz() { return 386; }
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::Go2FrontVideoData_>::type_info_blob_sz() { return 100; }
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::Go2FrontVideoData_>::type_map_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0x78, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x75, 0x67, 0x61, 0x59, 0x75, 0x39, 0xc1,
|
||||
0x45, 0x05, 0x1d, 0x51, 0xbe, 0x71, 0xb1, 0x00, 0x60, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x2d, 0x24, 0x8b, 0x17, 0x00,
|
||||
0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02,
|
||||
0xd5, 0x57, 0x60, 0x01, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3,
|
||||
0x01, 0x00, 0x00, 0x02, 0x1d, 0x38, 0x7d, 0x67, 0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, 0x04, 0xb8, 0xc7, 0x48, 0xdc, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0xf2, 0xc8, 0x74, 0x27, 0xb8, 0x30, 0xbd, 0x3d, 0x37, 0xbe, 0x7b, 0xec,
|
||||
0x40, 0x49, 0xe1, 0x00, 0xc4, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x32, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f,
|
||||
0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x47,
|
||||
0x6f, 0x32, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x44, 0x61, 0x74, 0x61,
|
||||
0x5f, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x74, 0x69, 0x6d, 0x65,
|
||||
0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x00,
|
||||
0x76, 0x69, 0x64, 0x65, 0x6f, 0x37, 0x32, 0x30, 0x70, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x00,
|
||||
0x76, 0x69, 0x64, 0x65, 0x6f, 0x33, 0x36, 0x30, 0x70, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x00,
|
||||
0x76, 0x69, 0x64, 0x65, 0x6f, 0x31, 0x38, 0x30, 0x70, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0xf2, 0xc8, 0x74, 0x27, 0xb8, 0x30, 0xbd, 0x3d, 0x37, 0xbe, 0x7b, 0xec,
|
||||
0x40, 0x49, 0xe1, 0xf1, 0x75, 0x67, 0x61, 0x59, 0x75, 0x39, 0xc1, 0x45, 0x05, 0x1d, 0x51, 0xbe,
|
||||
0x71, 0xb1, };
|
||||
return blob;
|
||||
}
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::Go2FrontVideoData_>::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, 0x75, 0x67, 0x61, 0x59, 0x75, 0x39, 0xc1, 0x45, 0x05, 0x1d, 0x51,
|
||||
0xbe, 0x71, 0xb1, 0x00, 0x64, 0x00, 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, 0xc8, 0x74, 0x27, 0xb8, 0x30, 0xbd, 0x3d, 0x37, 0xbe, 0x7b, 0xec,
|
||||
0x40, 0x49, 0xe1, 0x00, 0xc8, 0x00, 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<::unitree_go::msg::dds_::Go2FrontVideoData_>
|
||||
{
|
||||
static std::string value()
|
||||
{
|
||||
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::Go2FrontVideoData_>::getTypeName();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::Go2FrontVideoData_)
|
||||
|
||||
namespace org{
|
||||
namespace eclipse{
|
||||
namespace cyclonedds{
|
||||
namespace core{
|
||||
namespace cdr{
|
||||
|
||||
template<>
|
||||
propvec &get_type_props<::unitree_go::msg::dds_::Go2FrontVideoData_>();
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
|
||||
bool write(T& streamer, const ::unitree_go::msg::dds_::Go2FrontVideoData_& 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 (!write(streamer, instance.time_frame()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.video720p().size());
|
||||
if (!write(streamer, se_1))
|
||||
return false;
|
||||
if (se_1 > 0 &&
|
||||
!write(streamer, instance.video720p()[0], se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
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(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.video360p().size());
|
||||
if (!write(streamer, se_1))
|
||||
return false;
|
||||
if (se_1 > 0 &&
|
||||
!write(streamer, instance.video360p()[0], se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
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(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.video180p().size());
|
||||
if (!write(streamer, se_1))
|
||||
return false;
|
||||
if (se_1 > 0 &&
|
||||
!write(streamer, instance.video180p()[0], se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::Go2FrontVideoData_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::Go2FrontVideoData_>();
|
||||
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, ::unitree_go::msg::dds_::Go2FrontVideoData_& 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 (!read(streamer, instance.time_frame()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.video720p().size());
|
||||
if (!read(streamer, se_1))
|
||||
return false;
|
||||
instance.video720p().resize(se_1);
|
||||
if (se_1 > 0 &&
|
||||
!read(streamer, instance.video720p()[0], se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
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(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.video360p().size());
|
||||
if (!read(streamer, se_1))
|
||||
return false;
|
||||
instance.video360p().resize(se_1);
|
||||
if (se_1 > 0 &&
|
||||
!read(streamer, instance.video360p()[0], se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
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(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.video180p().size());
|
||||
if (!read(streamer, se_1))
|
||||
return false;
|
||||
instance.video180p().resize(se_1);
|
||||
if (se_1 > 0 &&
|
||||
!read(streamer, instance.video180p()[0], se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
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, ::unitree_go::msg::dds_::Go2FrontVideoData_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::Go2FrontVideoData_>();
|
||||
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 ::unitree_go::msg::dds_::Go2FrontVideoData_& 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 (!move(streamer, instance.time_frame()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.video720p().size());
|
||||
if (!move(streamer, se_1))
|
||||
return false;
|
||||
if (se_1 > 0 &&
|
||||
!move(streamer, uint8_t(), se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
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(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.video360p().size());
|
||||
if (!move(streamer, se_1))
|
||||
return false;
|
||||
if (se_1 > 0 &&
|
||||
!move(streamer, uint8_t(), se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
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(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.video180p().size());
|
||||
if (!move(streamer, se_1))
|
||||
return false;
|
||||
if (se_1 > 0 &&
|
||||
!move(streamer, uint8_t(), se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::Go2FrontVideoData_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::Go2FrontVideoData_>();
|
||||
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 ::unitree_go::msg::dds_::Go2FrontVideoData_& 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 (!max(streamer, instance.time_frame()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = 0;
|
||||
if (!max(streamer, se_1))
|
||||
return false;
|
||||
if (se_1 > 0 &&
|
||||
!max(streamer, uint8_t(), se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
streamer.position(SIZE_MAX);
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = 0;
|
||||
if (!max(streamer, se_1))
|
||||
return false;
|
||||
if (se_1 > 0 &&
|
||||
!max(streamer, uint8_t(), se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
streamer.position(SIZE_MAX);
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = 0;
|
||||
if (!max(streamer, se_1))
|
||||
return false;
|
||||
if (se_1 > 0 &&
|
||||
!max(streamer, uint8_t(), se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
streamer.position(SIZE_MAX);
|
||||
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 ::unitree_go::msg::dds_::Go2FrontVideoData_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::Go2FrontVideoData_>();
|
||||
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_UNITREE_IDL_GO2_GO2FRONTVIDEODATA__HPP
|
||||
581
unitree_SDK/include/unitree/idl/go2/HeightMap_.hpp
Normal file
581
unitree_SDK/include/unitree/idl/go2/HeightMap_.hpp
Normal file
@@ -0,0 +1,581 @@
|
||||
/****************************************************************
|
||||
|
||||
Generated by Eclipse Cyclone DDS IDL to CXX Translator
|
||||
File name: HeightMap_.idl
|
||||
Source: HeightMap_.hpp
|
||||
Cyclone DDS: v0.10.2
|
||||
|
||||
*****************************************************************/
|
||||
#ifndef DDSCXX_UNITREE_IDL_GO2_HEIGHTMAP__HPP
|
||||
#define DDSCXX_UNITREE_IDL_GO2_HEIGHTMAP__HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <array>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
namespace unitree_go
|
||||
{
|
||||
namespace msg
|
||||
{
|
||||
namespace dds_
|
||||
{
|
||||
class HeightMap_
|
||||
{
|
||||
private:
|
||||
double stamp_ = 0.0;
|
||||
std::string frame_id_;
|
||||
float resolution_ = 0.0f;
|
||||
uint32_t width_ = 0;
|
||||
uint32_t height_ = 0;
|
||||
std::array<float, 2> origin_ = { };
|
||||
std::vector<float> data_;
|
||||
|
||||
public:
|
||||
HeightMap_() = default;
|
||||
|
||||
explicit HeightMap_(
|
||||
double stamp,
|
||||
const std::string& frame_id,
|
||||
float resolution,
|
||||
uint32_t width,
|
||||
uint32_t height,
|
||||
const std::array<float, 2>& origin,
|
||||
const std::vector<float>& data) :
|
||||
stamp_(stamp),
|
||||
frame_id_(frame_id),
|
||||
resolution_(resolution),
|
||||
width_(width),
|
||||
height_(height),
|
||||
origin_(origin),
|
||||
data_(data) { }
|
||||
|
||||
double stamp() const { return this->stamp_; }
|
||||
double& stamp() { return this->stamp_; }
|
||||
void stamp(double _val_) { this->stamp_ = _val_; }
|
||||
const std::string& frame_id() const { return this->frame_id_; }
|
||||
std::string& frame_id() { return this->frame_id_; }
|
||||
void frame_id(const std::string& _val_) { this->frame_id_ = _val_; }
|
||||
void frame_id(std::string&& _val_) { this->frame_id_ = _val_; }
|
||||
float resolution() const { return this->resolution_; }
|
||||
float& resolution() { return this->resolution_; }
|
||||
void resolution(float _val_) { this->resolution_ = _val_; }
|
||||
uint32_t width() const { return this->width_; }
|
||||
uint32_t& width() { return this->width_; }
|
||||
void width(uint32_t _val_) { this->width_ = _val_; }
|
||||
uint32_t height() const { return this->height_; }
|
||||
uint32_t& height() { return this->height_; }
|
||||
void height(uint32_t _val_) { this->height_ = _val_; }
|
||||
const std::array<float, 2>& origin() const { return this->origin_; }
|
||||
std::array<float, 2>& origin() { return this->origin_; }
|
||||
void origin(const std::array<float, 2>& _val_) { this->origin_ = _val_; }
|
||||
void origin(std::array<float, 2>&& _val_) { this->origin_ = _val_; }
|
||||
const std::vector<float>& data() const { return this->data_; }
|
||||
std::vector<float>& data() { return this->data_; }
|
||||
void data(const std::vector<float>& _val_) { this->data_ = _val_; }
|
||||
void data(std::vector<float>&& _val_) { this->data_ = _val_; }
|
||||
|
||||
bool operator==(const HeightMap_& _other) const
|
||||
{
|
||||
(void) _other;
|
||||
return stamp_ == _other.stamp_ &&
|
||||
frame_id_ == _other.frame_id_ &&
|
||||
resolution_ == _other.resolution_ &&
|
||||
width_ == _other.width_ &&
|
||||
height_ == _other.height_ &&
|
||||
origin_ == _other.origin_ &&
|
||||
data_ == _other.data_;
|
||||
}
|
||||
|
||||
bool operator!=(const HeightMap_& _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<::unitree_go::msg::dds_::HeightMap_>::getTypeName()
|
||||
{
|
||||
return "unitree_go::msg::dds_::HeightMap_";
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::HeightMap_>::isSelfContained()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::HeightMap_>::isKeyless()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::HeightMap_>::type_map_blob_sz() { return 506; }
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::HeightMap_>::type_info_blob_sz() { return 100; }
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::HeightMap_>::type_map_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0xac, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x1f, 0x43, 0x34, 0x5b, 0x5b, 0x83, 0xd9,
|
||||
0xee, 0xf3, 0x84, 0x90, 0x47, 0xb5, 0x97, 0x00, 0x94, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x96, 0xb8, 0xc7, 0x8d, 0x00,
|
||||
0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x4b, 0xb3, 0x9c, 0x5c,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xb7, 0xe1, 0x64, 0xb3, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xea, 0xae, 0x26, 0xa6, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xb4, 0x35, 0xe2, 0x27, 0x00,
|
||||
0x16, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x02, 0x09, 0x7c, 0x49, 0xb1, 0x53, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
|
||||
0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x09, 0x8d, 0x77, 0x7f, 0x38,
|
||||
0x1f, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x23, 0x34, 0xab, 0xa3, 0x56, 0x73, 0x67,
|
||||
0xe5, 0x4e, 0xb6, 0x6f, 0x87, 0xb9, 0x09, 0x00, 0x07, 0x01, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00,
|
||||
0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74,
|
||||
0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73,
|
||||
0x5f, 0x3a, 0x3a, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x4d, 0x61, 0x70, 0x5f, 0x00, 0x00, 0x00,
|
||||
0xcf, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x0a, 0x00, 0x06, 0x00, 0x00, 0x00, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x00, 0x00, 0x00,
|
||||
0x17, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x09, 0x00, 0x00, 0x00,
|
||||
0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x6f,
|
||||
0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x06, 0x00, 0x00, 0x00, 0x77, 0x69, 0x64, 0x74,
|
||||
0x68, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x21, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x02, 0x09, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x6f, 0x72, 0x69, 0x67,
|
||||
0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x09, 0x05, 0x00, 0x00, 0x00, 0x64, 0x61, 0x74, 0x61,
|
||||
0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x23, 0x34, 0xab,
|
||||
0xa3, 0x56, 0x73, 0x67, 0xe5, 0x4e, 0xb6, 0x6f, 0x87, 0xb9, 0x09, 0xf1, 0x1f, 0x43, 0x34, 0x5b,
|
||||
0x5b, 0x83, 0xd9, 0xee, 0xf3, 0x84, 0x90, 0x47, 0xb5, 0x97, };
|
||||
return blob;
|
||||
}
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::HeightMap_>::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, 0x1f, 0x43, 0x34, 0x5b, 0x5b, 0x83, 0xd9, 0xee, 0xf3, 0x84, 0x90,
|
||||
0x47, 0xb5, 0x97, 0x00, 0x98, 0x00, 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, 0x23, 0x34, 0xab, 0xa3, 0x56, 0x73, 0x67, 0xe5, 0x4e, 0xb6, 0x6f,
|
||||
0x87, 0xb9, 0x09, 0x00, 0x0b, 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<::unitree_go::msg::dds_::HeightMap_>
|
||||
{
|
||||
static std::string value()
|
||||
{
|
||||
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::HeightMap_>::getTypeName();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::HeightMap_)
|
||||
|
||||
namespace org{
|
||||
namespace eclipse{
|
||||
namespace cyclonedds{
|
||||
namespace core{
|
||||
namespace cdr{
|
||||
|
||||
template<>
|
||||
propvec &get_type_props<::unitree_go::msg::dds_::HeightMap_>();
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
|
||||
bool write(T& streamer, const ::unitree_go::msg::dds_::HeightMap_& 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 (!write(streamer, instance.stamp()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write_string(streamer, instance.frame_id(), 0))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.resolution()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.width()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.height()))
|
||||
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.origin()[0], instance.origin().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(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.data().size());
|
||||
if (!write(streamer, se_1))
|
||||
return false;
|
||||
if (se_1 > 0 &&
|
||||
!write(streamer, instance.data()[0], se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::HeightMap_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::HeightMap_>();
|
||||
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, ::unitree_go::msg::dds_::HeightMap_& 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 (!read(streamer, instance.stamp()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read_string(streamer, instance.frame_id(), 0))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.resolution()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.width()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.height()))
|
||||
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.origin()[0], instance.origin().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(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.data().size());
|
||||
if (!read(streamer, se_1))
|
||||
return false;
|
||||
instance.data().resize(se_1);
|
||||
if (se_1 > 0 &&
|
||||
!read(streamer, instance.data()[0], se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
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, ::unitree_go::msg::dds_::HeightMap_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::HeightMap_>();
|
||||
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 ::unitree_go::msg::dds_::HeightMap_& 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 (!move(streamer, instance.stamp()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move_string(streamer, instance.frame_id(), 0))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.resolution()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.width()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.height()))
|
||||
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.origin()[0], instance.origin().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(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.data().size());
|
||||
if (!move(streamer, se_1))
|
||||
return false;
|
||||
if (se_1 > 0 &&
|
||||
!move(streamer, float(), se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::HeightMap_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::HeightMap_>();
|
||||
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 ::unitree_go::msg::dds_::HeightMap_& 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 (!max(streamer, instance.stamp()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max_string(streamer, instance.frame_id(), 0))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.resolution()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.width()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.height()))
|
||||
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.origin()[0], instance.origin().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(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = 0;
|
||||
if (!max(streamer, se_1))
|
||||
return false;
|
||||
if (se_1 > 0 &&
|
||||
!max(streamer, float(), se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
streamer.position(SIZE_MAX);
|
||||
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 ::unitree_go::msg::dds_::HeightMap_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::HeightMap_>();
|
||||
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_UNITREE_IDL_GO2_HEIGHTMAP__HPP
|
||||
503
unitree_SDK/include/unitree/idl/go2/IMUState_.hpp
Normal file
503
unitree_SDK/include/unitree/idl/go2/IMUState_.hpp
Normal file
@@ -0,0 +1,503 @@
|
||||
/****************************************************************
|
||||
|
||||
Generated by Eclipse Cyclone DDS IDL to CXX Translator
|
||||
File name: IMUState_.idl
|
||||
Source: IMUState_.hpp
|
||||
Cyclone DDS: v0.10.2
|
||||
|
||||
*****************************************************************/
|
||||
#ifndef DDSCXX_UNITREE_IDL_GO2_IMUSTATE__HPP
|
||||
#define DDSCXX_UNITREE_IDL_GO2_IMUSTATE__HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <array>
|
||||
|
||||
namespace unitree_go
|
||||
{
|
||||
namespace msg
|
||||
{
|
||||
namespace dds_
|
||||
{
|
||||
class IMUState_
|
||||
{
|
||||
private:
|
||||
std::array<float, 4> quaternion_ = { };
|
||||
std::array<float, 3> gyroscope_ = { };
|
||||
std::array<float, 3> accelerometer_ = { };
|
||||
std::array<float, 3> rpy_ = { };
|
||||
uint8_t temperature_ = 0;
|
||||
|
||||
public:
|
||||
IMUState_() = default;
|
||||
|
||||
explicit IMUState_(
|
||||
const std::array<float, 4>& quaternion,
|
||||
const std::array<float, 3>& gyroscope,
|
||||
const std::array<float, 3>& accelerometer,
|
||||
const std::array<float, 3>& rpy,
|
||||
uint8_t temperature) :
|
||||
quaternion_(quaternion),
|
||||
gyroscope_(gyroscope),
|
||||
accelerometer_(accelerometer),
|
||||
rpy_(rpy),
|
||||
temperature_(temperature) { }
|
||||
|
||||
const std::array<float, 4>& quaternion() const { return this->quaternion_; }
|
||||
std::array<float, 4>& quaternion() { return this->quaternion_; }
|
||||
void quaternion(const std::array<float, 4>& _val_) { this->quaternion_ = _val_; }
|
||||
void quaternion(std::array<float, 4>&& _val_) { this->quaternion_ = _val_; }
|
||||
const std::array<float, 3>& gyroscope() const { return this->gyroscope_; }
|
||||
std::array<float, 3>& gyroscope() { return this->gyroscope_; }
|
||||
void gyroscope(const std::array<float, 3>& _val_) { this->gyroscope_ = _val_; }
|
||||
void gyroscope(std::array<float, 3>&& _val_) { this->gyroscope_ = _val_; }
|
||||
const std::array<float, 3>& accelerometer() const { return this->accelerometer_; }
|
||||
std::array<float, 3>& accelerometer() { return this->accelerometer_; }
|
||||
void accelerometer(const std::array<float, 3>& _val_) { this->accelerometer_ = _val_; }
|
||||
void accelerometer(std::array<float, 3>&& _val_) { this->accelerometer_ = _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 temperature() const { return this->temperature_; }
|
||||
uint8_t& temperature() { return this->temperature_; }
|
||||
void temperature(uint8_t _val_) { this->temperature_ = _val_; }
|
||||
|
||||
bool operator==(const IMUState_& _other) const
|
||||
{
|
||||
(void) _other;
|
||||
return quaternion_ == _other.quaternion_ &&
|
||||
gyroscope_ == _other.gyroscope_ &&
|
||||
accelerometer_ == _other.accelerometer_ &&
|
||||
rpy_ == _other.rpy_ &&
|
||||
temperature_ == _other.temperature_;
|
||||
}
|
||||
|
||||
bool operator!=(const IMUState_& _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<::unitree_go::msg::dds_::IMUState_>::getTypeName()
|
||||
{
|
||||
return "unitree_go::msg::dds_::IMUState_";
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::IMUState_>::isKeyless()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::IMUState_>::type_map_blob_sz() { return 498; }
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::IMUState_>::type_info_blob_sz() { return 100; }
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::IMUState_>::type_map_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0xab, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x4b, 0x1b, 0xf4, 0xaf, 0x32, 0xe5, 0xbc,
|
||||
0x67, 0x10, 0xef, 0xc8, 0x29, 0x31, 0x15, 0x00, 0x93, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
|
||||
0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x04, 0x09, 0x75, 0xb9, 0xaa, 0xa0, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x03, 0x09, 0x6b, 0x3b, 0x2d, 0x85, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x0e, 0x12,
|
||||
0x75, 0x69, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x03, 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, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xee, 0xf4, 0x38, 0xf7, 0x00,
|
||||
0x16, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xc4, 0xec, 0xb4, 0x9c, 0xd7, 0xb2, 0x25,
|
||||
0xd2, 0x26, 0x28, 0xb6, 0xb7, 0x64, 0xcc, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00,
|
||||
0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74,
|
||||
0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73,
|
||||
0x5f, 0x3a, 0x3a, 0x49, 0x4d, 0x55, 0x53, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00,
|
||||
0xc6, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x09, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x71, 0x75, 0x61, 0x74, 0x65, 0x72, 0x6e, 0x69, 0x6f, 0x6e, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
|
||||
0x67, 0x79, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x03, 0x09, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x61, 0x63, 0x63, 0x65, 0x6c, 0x65, 0x72, 0x6f,
|
||||
0x6d, 0x65, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x03, 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, 0x1a, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x74, 0x65, 0x6d, 0x70,
|
||||
0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0xf2, 0xc4, 0xec, 0xb4, 0x9c, 0xd7, 0xb2, 0x25, 0xd2, 0x26, 0x28, 0xb6,
|
||||
0xb7, 0x64, 0xcc, 0xf1, 0x4b, 0x1b, 0xf4, 0xaf, 0x32, 0xe5, 0xbc, 0x67, 0x10, 0xef, 0xc8, 0x29,
|
||||
0x31, 0x15, };
|
||||
return blob;
|
||||
}
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::IMUState_>::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, 0x4b, 0x1b, 0xf4, 0xaf, 0x32, 0xe5, 0xbc, 0x67, 0x10, 0xef, 0xc8,
|
||||
0x29, 0x31, 0x15, 0x00, 0x97, 0x00, 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, 0xc4, 0xec, 0xb4, 0x9c, 0xd7, 0xb2, 0x25, 0xd2, 0x26, 0x28, 0xb6,
|
||||
0xb7, 0x64, 0xcc, 0x00, 0x02, 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<::unitree_go::msg::dds_::IMUState_>
|
||||
{
|
||||
static std::string value()
|
||||
{
|
||||
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::IMUState_>::getTypeName();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::IMUState_)
|
||||
|
||||
namespace org{
|
||||
namespace eclipse{
|
||||
namespace cyclonedds{
|
||||
namespace core{
|
||||
namespace cdr{
|
||||
|
||||
template<>
|
||||
propvec &get_type_props<::unitree_go::msg::dds_::IMUState_>();
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
|
||||
bool write(T& streamer, const ::unitree_go::msg::dds_::IMUState_& 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.quaternion()[0], instance.quaternion().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.gyroscope()[0], instance.gyroscope().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.accelerometer()[0], instance.accelerometer().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.rpy()[0], instance.rpy().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 (!write(streamer, instance.temperature()))
|
||||
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 ::unitree_go::msg::dds_::IMUState_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::IMUState_>();
|
||||
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, ::unitree_go::msg::dds_::IMUState_& 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.quaternion()[0], instance.quaternion().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.gyroscope()[0], instance.gyroscope().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.accelerometer()[0], instance.accelerometer().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.rpy()[0], instance.rpy().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 (!read(streamer, instance.temperature()))
|
||||
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, ::unitree_go::msg::dds_::IMUState_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::IMUState_>();
|
||||
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 ::unitree_go::msg::dds_::IMUState_& 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.quaternion()[0], instance.quaternion().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.gyroscope()[0], instance.gyroscope().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.accelerometer()[0], instance.accelerometer().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.rpy()[0], instance.rpy().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 (!move(streamer, instance.temperature()))
|
||||
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 ::unitree_go::msg::dds_::IMUState_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::IMUState_>();
|
||||
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 ::unitree_go::msg::dds_::IMUState_& 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.quaternion()[0], instance.quaternion().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.gyroscope()[0], instance.gyroscope().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.accelerometer()[0], instance.accelerometer().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.rpy()[0], instance.rpy().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 (!max(streamer, instance.temperature()))
|
||||
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 ::unitree_go::msg::dds_::IMUState_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::IMUState_>();
|
||||
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_UNITREE_IDL_GO2_IMUSTATE__HPP
|
||||
363
unitree_SDK/include/unitree/idl/go2/InterfaceConfig_.hpp
Normal file
363
unitree_SDK/include/unitree/idl/go2/InterfaceConfig_.hpp
Normal file
@@ -0,0 +1,363 @@
|
||||
/****************************************************************
|
||||
|
||||
Generated by Eclipse Cyclone DDS IDL to CXX Translator
|
||||
File name: InterfaceConfig_.idl
|
||||
Source: InterfaceConfig_.hpp
|
||||
Cyclone DDS: v0.10.2
|
||||
|
||||
*****************************************************************/
|
||||
#ifndef DDSCXX_UNITREE_IDL_GO2_INTERFACECONFIG__HPP
|
||||
#define DDSCXX_UNITREE_IDL_GO2_INTERFACECONFIG__HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <array>
|
||||
|
||||
namespace unitree_go
|
||||
{
|
||||
namespace msg
|
||||
{
|
||||
namespace dds_
|
||||
{
|
||||
class InterfaceConfig_
|
||||
{
|
||||
private:
|
||||
uint8_t mode_ = 0;
|
||||
uint8_t value_ = 0;
|
||||
std::array<uint8_t, 2> reserve_ = { };
|
||||
|
||||
public:
|
||||
InterfaceConfig_() = default;
|
||||
|
||||
explicit InterfaceConfig_(
|
||||
uint8_t mode,
|
||||
uint8_t value,
|
||||
const std::array<uint8_t, 2>& reserve) :
|
||||
mode_(mode),
|
||||
value_(value),
|
||||
reserve_(reserve) { }
|
||||
|
||||
uint8_t mode() const { return this->mode_; }
|
||||
uint8_t& mode() { return this->mode_; }
|
||||
void mode(uint8_t _val_) { this->mode_ = _val_; }
|
||||
uint8_t value() const { return this->value_; }
|
||||
uint8_t& value() { return this->value_; }
|
||||
void value(uint8_t _val_) { this->value_ = _val_; }
|
||||
const std::array<uint8_t, 2>& reserve() const { return this->reserve_; }
|
||||
std::array<uint8_t, 2>& reserve() { return this->reserve_; }
|
||||
void reserve(const std::array<uint8_t, 2>& _val_) { this->reserve_ = _val_; }
|
||||
void reserve(std::array<uint8_t, 2>&& _val_) { this->reserve_ = _val_; }
|
||||
|
||||
bool operator==(const InterfaceConfig_& _other) const
|
||||
{
|
||||
(void) _other;
|
||||
return mode_ == _other.mode_ &&
|
||||
value_ == _other.value_ &&
|
||||
reserve_ == _other.reserve_;
|
||||
}
|
||||
|
||||
bool operator!=(const InterfaceConfig_& _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<::unitree_go::msg::dds_::InterfaceConfig_>::getTypeName()
|
||||
{
|
||||
return "unitree_go::msg::dds_::InterfaceConfig_";
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::InterfaceConfig_>::isKeyless()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::InterfaceConfig_>::type_map_blob_sz() { return 326; }
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::InterfaceConfig_>::type_info_blob_sz() { return 100; }
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::InterfaceConfig_>::type_map_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0x66, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x4f, 0x25, 0x85, 0x7b, 0xb1, 0x9a, 0x7b,
|
||||
0x3a, 0xaf, 0x05, 0x03, 0xdb, 0x8f, 0xa9, 0x00, 0x4e, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x15, 0xd6, 0x17, 0x12, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x20, 0x63, 0xc1, 0x60, 0x00,
|
||||
0x16, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x9c, 0x3b, 0x62, 0x94, 0x00, 0x00, 0xae, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0xf2, 0x11, 0x6e, 0x4e, 0x71, 0x6a, 0xb8, 0x9f, 0x44, 0x70, 0x5d, 0xb6,
|
||||
0x2b, 0x7d, 0x87, 0x00, 0x96, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x30, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f,
|
||||
0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x49,
|
||||
0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x00,
|
||||
0x5a, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65, 0x00, 0x00, 0x00, 0x00,
|
||||
0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x06, 0x00, 0x00, 0x00,
|
||||
0x76, 0x61, 0x6c, 0x75, 0x65, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x11, 0x6e, 0x4e, 0x71, 0x6a, 0xb8, 0x9f,
|
||||
0x44, 0x70, 0x5d, 0xb6, 0x2b, 0x7d, 0x87, 0xf1, 0x4f, 0x25, 0x85, 0x7b, 0xb1, 0x9a, 0x7b, 0x3a,
|
||||
0xaf, 0x05, 0x03, 0xdb, 0x8f, 0xa9, };
|
||||
return blob;
|
||||
}
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::InterfaceConfig_>::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, 0x4f, 0x25, 0x85, 0x7b, 0xb1, 0x9a, 0x7b, 0x3a, 0xaf, 0x05, 0x03,
|
||||
0xdb, 0x8f, 0xa9, 0x00, 0x52, 0x00, 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, 0x11, 0x6e, 0x4e, 0x71, 0x6a, 0xb8, 0x9f, 0x44, 0x70, 0x5d, 0xb6,
|
||||
0x2b, 0x7d, 0x87, 0x00, 0x9a, 0x00, 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<::unitree_go::msg::dds_::InterfaceConfig_>
|
||||
{
|
||||
static std::string value()
|
||||
{
|
||||
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::InterfaceConfig_>::getTypeName();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::InterfaceConfig_)
|
||||
|
||||
namespace org{
|
||||
namespace eclipse{
|
||||
namespace cyclonedds{
|
||||
namespace core{
|
||||
namespace cdr{
|
||||
|
||||
template<>
|
||||
propvec &get_type_props<::unitree_go::msg::dds_::InterfaceConfig_>();
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
|
||||
bool write(T& streamer, const ::unitree_go::msg::dds_::InterfaceConfig_& 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 (!write(streamer, instance.mode()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.value()))
|
||||
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.reserve()[0], instance.reserve().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::InterfaceConfig_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::InterfaceConfig_>();
|
||||
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, ::unitree_go::msg::dds_::InterfaceConfig_& 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 (!read(streamer, instance.mode()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.value()))
|
||||
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.reserve()[0], instance.reserve().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
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, ::unitree_go::msg::dds_::InterfaceConfig_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::InterfaceConfig_>();
|
||||
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 ::unitree_go::msg::dds_::InterfaceConfig_& 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 (!move(streamer, instance.mode()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.value()))
|
||||
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.reserve()[0], instance.reserve().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::InterfaceConfig_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::InterfaceConfig_>();
|
||||
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 ::unitree_go::msg::dds_::InterfaceConfig_& 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 (!max(streamer, instance.mode()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.value()))
|
||||
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.reserve()[0], instance.reserve().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::InterfaceConfig_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::InterfaceConfig_>();
|
||||
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_UNITREE_IDL_GO2_INTERFACECONFIG__HPP
|
||||
1007
unitree_SDK/include/unitree/idl/go2/LidarState_.hpp
Normal file
1007
unitree_SDK/include/unitree/idl/go2/LidarState_.hpp
Normal file
File diff suppressed because it is too large
Load Diff
999
unitree_SDK/include/unitree/idl/go2/LowCmd_.hpp
Normal file
999
unitree_SDK/include/unitree/idl/go2/LowCmd_.hpp
Normal file
@@ -0,0 +1,999 @@
|
||||
/****************************************************************
|
||||
|
||||
Generated by Eclipse Cyclone DDS IDL to CXX Translator
|
||||
File name: LowCmd_.idl
|
||||
Source: LowCmd_.hpp
|
||||
Cyclone DDS: v0.10.2
|
||||
|
||||
*****************************************************************/
|
||||
#ifndef DDSCXX_UNITREE_IDL_GO2_LOWCMD__HPP
|
||||
#define DDSCXX_UNITREE_IDL_GO2_LOWCMD__HPP
|
||||
|
||||
#include "unitree/idl/go2/BmsCmd_.hpp"
|
||||
|
||||
#include "unitree/idl/go2/MotorCmd_.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <array>
|
||||
|
||||
namespace unitree_go
|
||||
{
|
||||
namespace msg
|
||||
{
|
||||
namespace dds_
|
||||
{
|
||||
class LowCmd_
|
||||
{
|
||||
private:
|
||||
std::array<uint8_t, 2> head_ = { };
|
||||
uint8_t level_flag_ = 0;
|
||||
uint8_t frame_reserve_ = 0;
|
||||
std::array<uint32_t, 2> sn_ = { };
|
||||
std::array<uint32_t, 2> version_ = { };
|
||||
uint16_t bandwidth_ = 0;
|
||||
std::array<::unitree_go::msg::dds_::MotorCmd_, 20> motor_cmd_ = { };
|
||||
::unitree_go::msg::dds_::BmsCmd_ bms_cmd_;
|
||||
std::array<uint8_t, 40> wireless_remote_ = { };
|
||||
std::array<uint8_t, 12> led_ = { };
|
||||
std::array<uint8_t, 2> fan_ = { };
|
||||
uint8_t gpio_ = 0;
|
||||
uint32_t reserve_ = 0;
|
||||
uint32_t crc_ = 0;
|
||||
|
||||
public:
|
||||
LowCmd_() = default;
|
||||
|
||||
explicit LowCmd_(
|
||||
const std::array<uint8_t, 2>& head,
|
||||
uint8_t level_flag,
|
||||
uint8_t frame_reserve,
|
||||
const std::array<uint32_t, 2>& sn,
|
||||
const std::array<uint32_t, 2>& version,
|
||||
uint16_t bandwidth,
|
||||
const std::array<::unitree_go::msg::dds_::MotorCmd_, 20>& motor_cmd,
|
||||
const ::unitree_go::msg::dds_::BmsCmd_& bms_cmd,
|
||||
const std::array<uint8_t, 40>& wireless_remote,
|
||||
const std::array<uint8_t, 12>& led,
|
||||
const std::array<uint8_t, 2>& fan,
|
||||
uint8_t gpio,
|
||||
uint32_t reserve,
|
||||
uint32_t crc) :
|
||||
head_(head),
|
||||
level_flag_(level_flag),
|
||||
frame_reserve_(frame_reserve),
|
||||
sn_(sn),
|
||||
version_(version),
|
||||
bandwidth_(bandwidth),
|
||||
motor_cmd_(motor_cmd),
|
||||
bms_cmd_(bms_cmd),
|
||||
wireless_remote_(wireless_remote),
|
||||
led_(led),
|
||||
fan_(fan),
|
||||
gpio_(gpio),
|
||||
reserve_(reserve),
|
||||
crc_(crc) { }
|
||||
|
||||
const std::array<uint8_t, 2>& head() const { return this->head_; }
|
||||
std::array<uint8_t, 2>& head() { return this->head_; }
|
||||
void head(const std::array<uint8_t, 2>& _val_) { this->head_ = _val_; }
|
||||
void head(std::array<uint8_t, 2>&& _val_) { this->head_ = _val_; }
|
||||
uint8_t level_flag() const { return this->level_flag_; }
|
||||
uint8_t& level_flag() { return this->level_flag_; }
|
||||
void level_flag(uint8_t _val_) { this->level_flag_ = _val_; }
|
||||
uint8_t frame_reserve() const { return this->frame_reserve_; }
|
||||
uint8_t& frame_reserve() { return this->frame_reserve_; }
|
||||
void frame_reserve(uint8_t _val_) { this->frame_reserve_ = _val_; }
|
||||
const std::array<uint32_t, 2>& sn() const { return this->sn_; }
|
||||
std::array<uint32_t, 2>& sn() { return this->sn_; }
|
||||
void sn(const std::array<uint32_t, 2>& _val_) { this->sn_ = _val_; }
|
||||
void sn(std::array<uint32_t, 2>&& _val_) { this->sn_ = _val_; }
|
||||
const std::array<uint32_t, 2>& version() const { return this->version_; }
|
||||
std::array<uint32_t, 2>& version() { return this->version_; }
|
||||
void version(const std::array<uint32_t, 2>& _val_) { this->version_ = _val_; }
|
||||
void version(std::array<uint32_t, 2>&& _val_) { this->version_ = _val_; }
|
||||
uint16_t bandwidth() const { return this->bandwidth_; }
|
||||
uint16_t& bandwidth() { return this->bandwidth_; }
|
||||
void bandwidth(uint16_t _val_) { this->bandwidth_ = _val_; }
|
||||
const std::array<::unitree_go::msg::dds_::MotorCmd_, 20>& motor_cmd() const { return this->motor_cmd_; }
|
||||
std::array<::unitree_go::msg::dds_::MotorCmd_, 20>& motor_cmd() { return this->motor_cmd_; }
|
||||
void motor_cmd(const std::array<::unitree_go::msg::dds_::MotorCmd_, 20>& _val_) { this->motor_cmd_ = _val_; }
|
||||
void motor_cmd(std::array<::unitree_go::msg::dds_::MotorCmd_, 20>&& _val_) { this->motor_cmd_ = _val_; }
|
||||
const ::unitree_go::msg::dds_::BmsCmd_& bms_cmd() const { return this->bms_cmd_; }
|
||||
::unitree_go::msg::dds_::BmsCmd_& bms_cmd() { return this->bms_cmd_; }
|
||||
void bms_cmd(const ::unitree_go::msg::dds_::BmsCmd_& _val_) { this->bms_cmd_ = _val_; }
|
||||
void bms_cmd(::unitree_go::msg::dds_::BmsCmd_&& _val_) { this->bms_cmd_ = _val_; }
|
||||
const std::array<uint8_t, 40>& wireless_remote() const { return this->wireless_remote_; }
|
||||
std::array<uint8_t, 40>& wireless_remote() { return this->wireless_remote_; }
|
||||
void wireless_remote(const std::array<uint8_t, 40>& _val_) { this->wireless_remote_ = _val_; }
|
||||
void wireless_remote(std::array<uint8_t, 40>&& _val_) { this->wireless_remote_ = _val_; }
|
||||
const std::array<uint8_t, 12>& led() const { return this->led_; }
|
||||
std::array<uint8_t, 12>& led() { return this->led_; }
|
||||
void led(const std::array<uint8_t, 12>& _val_) { this->led_ = _val_; }
|
||||
void led(std::array<uint8_t, 12>&& _val_) { this->led_ = _val_; }
|
||||
const std::array<uint8_t, 2>& fan() const { return this->fan_; }
|
||||
std::array<uint8_t, 2>& fan() { return this->fan_; }
|
||||
void fan(const std::array<uint8_t, 2>& _val_) { this->fan_ = _val_; }
|
||||
void fan(std::array<uint8_t, 2>&& _val_) { this->fan_ = _val_; }
|
||||
uint8_t gpio() const { return this->gpio_; }
|
||||
uint8_t& gpio() { return this->gpio_; }
|
||||
void gpio(uint8_t _val_) { this->gpio_ = _val_; }
|
||||
uint32_t reserve() const { return this->reserve_; }
|
||||
uint32_t& reserve() { return this->reserve_; }
|
||||
void reserve(uint32_t _val_) { this->reserve_ = _val_; }
|
||||
uint32_t crc() const { return this->crc_; }
|
||||
uint32_t& crc() { return this->crc_; }
|
||||
void crc(uint32_t _val_) { this->crc_ = _val_; }
|
||||
|
||||
bool operator==(const LowCmd_& _other) const
|
||||
{
|
||||
(void) _other;
|
||||
return head_ == _other.head_ &&
|
||||
level_flag_ == _other.level_flag_ &&
|
||||
frame_reserve_ == _other.frame_reserve_ &&
|
||||
sn_ == _other.sn_ &&
|
||||
version_ == _other.version_ &&
|
||||
bandwidth_ == _other.bandwidth_ &&
|
||||
motor_cmd_ == _other.motor_cmd_ &&
|
||||
bms_cmd_ == _other.bms_cmd_ &&
|
||||
wireless_remote_ == _other.wireless_remote_ &&
|
||||
led_ == _other.led_ &&
|
||||
fan_ == _other.fan_ &&
|
||||
gpio_ == _other.gpio_ &&
|
||||
reserve_ == _other.reserve_ &&
|
||||
crc_ == _other.crc_;
|
||||
}
|
||||
|
||||
bool operator!=(const LowCmd_& _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<::unitree_go::msg::dds_::LowCmd_>::getTypeName()
|
||||
{
|
||||
return "unitree_go::msg::dds_::LowCmd_";
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::LowCmd_>::isKeyless()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::LowCmd_>::type_map_blob_sz() { return 1710; }
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::LowCmd_>::type_info_blob_sz() { return 196; }
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::LowCmd_>::type_map_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0x72, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf1, 0x83, 0x28, 0x76, 0xce, 0xec, 0x97, 0x37,
|
||||
0xd6, 0x9f, 0x6e, 0xd6, 0x2a, 0x3f, 0x63, 0x00, 0x63, 0x01, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x01, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
|
||||
0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x96, 0xe8, 0x9a, 0x29, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xa2, 0x18, 0x71, 0x24, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xf0, 0xd2, 0xa4, 0x1c, 0x00, 0x16, 0x00, 0x00, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x02, 0x07, 0xaf, 0xbe, 0x94, 0xcd, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0x2a, 0xf7,
|
||||
0x2f, 0x10, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x36,
|
||||
0x67, 0x6c, 0x2b, 0x00, 0x24, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf1,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0xf1, 0xc8, 0xe5, 0x83, 0x5b, 0x0f, 0x0c,
|
||||
0x17, 0x65, 0xbc, 0x23, 0x1d, 0xfa, 0x02, 0xff, 0x5b, 0xcf, 0x19, 0xa4, 0x19, 0x00, 0x00, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x3e, 0x8e, 0xb6, 0x7c, 0x25, 0xfd, 0xe0, 0x7e, 0x52,
|
||||
0xcf, 0x51, 0xed, 0x4a, 0x23, 0x11, 0x50, 0x97, 0xc7, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x28, 0x02, 0xa8, 0x2f, 0x18, 0xc9, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x02, 0x0b, 0x98,
|
||||
0xf7, 0xbc, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x50, 0xbd, 0x8c, 0x21, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x95, 0x58, 0x71, 0xc9, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x9c, 0x3b, 0x62, 0x94, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xf5, 0xad, 0x59, 0xc5, 0xf1,
|
||||
0xc8, 0xe5, 0x83, 0x5b, 0x0f, 0x0c, 0x17, 0x65, 0xbc, 0x23, 0x1d, 0xfa, 0x02, 0xff, 0x00, 0x00,
|
||||
0x8e, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x7e, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x02, 0x15, 0xd6, 0x17, 0x12, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x76, 0x94, 0xf4, 0xa6, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x47, 0xbc, 0xdc, 0xd7, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x45, 0x80, 0xc2, 0x74, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x26, 0xb5, 0x68, 0xe4, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x87, 0x22, 0x16, 0x52, 0x00, 0x16, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x9c, 0x3b,
|
||||
0x62, 0x94, 0xf1, 0x3e, 0x8e, 0xb6, 0x7c, 0x25, 0xfd, 0xe0, 0x7e, 0x52, 0xcf, 0x51, 0xed, 0x4a,
|
||||
0x23, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x32, 0x62, 0xd4, 0x8d, 0x00, 0x16, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x03, 0x02, 0x9c, 0x3b, 0x62, 0x94, 0x00, 0x00, 0xce, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0xf2, 0x52, 0xcc, 0x8e, 0xb0, 0xd4, 0x27, 0xd6, 0x92, 0xaa, 0x2b, 0x20, 0xa9, 0x05, 0x40, 0x00,
|
||||
0x26, 0x02, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x1f, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a,
|
||||
0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4c, 0x6f, 0x77, 0x43, 0x6d,
|
||||
0x64, 0x5f, 0x00, 0x00, 0xf2, 0x01, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x02, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x68, 0x65, 0x61, 0x64, 0x00, 0x00, 0x00, 0x00,
|
||||
0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x6c, 0x65, 0x76, 0x65, 0x6c, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x1c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0e, 0x00, 0x00, 0x00,
|
||||
0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00,
|
||||
0x1d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x73, 0x6e, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
|
||||
0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x62, 0x61, 0x6e, 0x64,
|
||||
0x77, 0x69, 0x64, 0x74, 0x68, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x90, 0xf2, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0xf2, 0x42, 0x1f,
|
||||
0xa5, 0xb2, 0xdb, 0x2d, 0xef, 0xf5, 0xc0, 0x3f, 0xff, 0x16, 0x30, 0x3b, 0x0a, 0x00, 0x00, 0x00,
|
||||
0x6d, 0x6f, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6d, 0x64, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x31, 0xa8, 0x59, 0x24, 0x05, 0x6b, 0x7a, 0xf3, 0xd3,
|
||||
0xf1, 0x6b, 0x34, 0x22, 0x33, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x6d, 0x73, 0x5f,
|
||||
0x63, 0x6d, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x28, 0x02, 0x00, 0x00,
|
||||
0x10, 0x00, 0x00, 0x00, 0x77, 0x69, 0x72, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x65, 0x6d,
|
||||
0x6f, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x02, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x6c, 0x65, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00,
|
||||
0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x02, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x66, 0x61, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x13, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00,
|
||||
0x67, 0x70, 0x69, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x63, 0x72, 0x63, 0x00, 0x00, 0x00, 0xf2, 0x42, 0x1f, 0xa5, 0xb2, 0xdb,
|
||||
0x2d, 0xef, 0xf5, 0xc0, 0x3f, 0xff, 0x16, 0x30, 0x3b, 0x00, 0x00, 0x00, 0xee, 0x00, 0x00, 0x00,
|
||||
0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00,
|
||||
0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a,
|
||||
0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4d, 0x6f, 0x74, 0x6f, 0x72, 0x43, 0x6d, 0x64, 0x5f,
|
||||
0x00, 0x00, 0x00, 0x00, 0xb6, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65,
|
||||
0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x74, 0x61, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x6b, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x11, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x6b, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0xf2, 0x31,
|
||||
0xa8, 0x59, 0x24, 0x05, 0x6b, 0x7a, 0xf3, 0xd3, 0xf1, 0x6b, 0x34, 0x22, 0x33, 0x00, 0x00, 0x00,
|
||||
0x76, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x1f, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a,
|
||||
0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x42, 0x6d, 0x73, 0x43, 0x6d,
|
||||
0x64, 0x5f, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6f, 0x66, 0x66, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||
0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x00, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0xf2, 0x52, 0xcc, 0x8e, 0xb0, 0xd4, 0x27, 0xd6, 0x92, 0xaa, 0x2b, 0x20,
|
||||
0xa9, 0x05, 0x40, 0xf1, 0x83, 0x28, 0x76, 0xce, 0xec, 0x97, 0x37, 0xd6, 0x9f, 0x6e, 0xd6, 0x2a,
|
||||
0x3f, 0x63, 0xf2, 0x42, 0x1f, 0xa5, 0xb2, 0xdb, 0x2d, 0xef, 0xf5, 0xc0, 0x3f, 0xff, 0x16, 0x30,
|
||||
0x3b, 0xf1, 0xc8, 0xe5, 0x83, 0x5b, 0x0f, 0x0c, 0x17, 0x65, 0xbc, 0x23, 0x1d, 0xfa, 0x02, 0xff,
|
||||
0xf2, 0x31, 0xa8, 0x59, 0x24, 0x05, 0x6b, 0x7a, 0xf3, 0xd3, 0xf1, 0x6b, 0x34, 0x22, 0x33, 0xf1,
|
||||
0x3e, 0x8e, 0xb6, 0x7c, 0x25, 0xfd, 0xe0, 0x7e, 0x52, 0xcf, 0x51, 0xed, 0x4a, 0x23, };
|
||||
return blob;
|
||||
}
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::LowCmd_>::type_info_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0xc0, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x58, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00,
|
||||
0x14, 0x00, 0x00, 0x00, 0xf1, 0x83, 0x28, 0x76, 0xce, 0xec, 0x97, 0x37, 0xd6, 0x9f, 0x6e, 0xd6,
|
||||
0x2a, 0x3f, 0x63, 0x00, 0x67, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0xc8, 0xe5, 0x83, 0x5b, 0x0f, 0x0c, 0x17,
|
||||
0x65, 0xbc, 0x23, 0x1d, 0xfa, 0x02, 0xff, 0x00, 0x92, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||
0xf1, 0x3e, 0x8e, 0xb6, 0x7c, 0x25, 0xfd, 0xe0, 0x7e, 0x52, 0xcf, 0x51, 0xed, 0x4a, 0x23, 0x00,
|
||||
0x42, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x58, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00,
|
||||
0x14, 0x00, 0x00, 0x00, 0xf2, 0x52, 0xcc, 0x8e, 0xb0, 0xd4, 0x27, 0xd6, 0x92, 0xaa, 0x2b, 0x20,
|
||||
0xa9, 0x05, 0x40, 0x00, 0x2a, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x42, 0x1f, 0xa5, 0xb2, 0xdb, 0x2d, 0xef,
|
||||
0xf5, 0xc0, 0x3f, 0xff, 0x16, 0x30, 0x3b, 0x00, 0xf2, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||
0xf2, 0x31, 0xa8, 0x59, 0x24, 0x05, 0x6b, 0x7a, 0xf3, 0xd3, 0xf1, 0x6b, 0x34, 0x22, 0x33, 0x00,
|
||||
0x7a, 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<::unitree_go::msg::dds_::LowCmd_>
|
||||
{
|
||||
static std::string value()
|
||||
{
|
||||
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::LowCmd_>::getTypeName();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::LowCmd_)
|
||||
|
||||
namespace org{
|
||||
namespace eclipse{
|
||||
namespace cyclonedds{
|
||||
namespace core{
|
||||
namespace cdr{
|
||||
|
||||
template<>
|
||||
propvec &get_type_props<::unitree_go::msg::dds_::LowCmd_>();
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
|
||||
bool write(T& streamer, const ::unitree_go::msg::dds_::LowCmd_& 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.head()[0], instance.head().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 (!write(streamer, instance.level_flag()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.frame_reserve()))
|
||||
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.sn()[0], instance.sn().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.version()[0], instance.version().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 (!write(streamer, instance.bandwidth()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 6:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(true, false))
|
||||
return false;
|
||||
for (const auto & a_1:instance.motor_cmd()) { //array depth 1
|
||||
if (!write(streamer, a_1, prop))
|
||||
return false;
|
||||
} //array depth 1
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 7:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.bms_cmd(), prop))
|
||||
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.wireless_remote()[0], instance.wireless_remote().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.led()[0], instance.led().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 (!streamer.start_consecutive(true, true))
|
||||
return false;
|
||||
if (!write(streamer, instance.fan()[0], instance.fan().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 11:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.gpio()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 12:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.reserve()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 13:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.crc()))
|
||||
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 ::unitree_go::msg::dds_::LowCmd_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::LowCmd_>();
|
||||
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, ::unitree_go::msg::dds_::LowCmd_& 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.head()[0], instance.head().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 (!read(streamer, instance.level_flag()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.frame_reserve()))
|
||||
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.sn()[0], instance.sn().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.version()[0], instance.version().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 (!read(streamer, instance.bandwidth()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 6:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(true, false))
|
||||
return false;
|
||||
for (auto & a_1:instance.motor_cmd()) { //array depth 1
|
||||
if (!read(streamer, a_1, prop))
|
||||
return false;
|
||||
} //array depth 1
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 7:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.bms_cmd(), prop))
|
||||
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.wireless_remote()[0], instance.wireless_remote().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.led()[0], instance.led().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 (!streamer.start_consecutive(true, true))
|
||||
return false;
|
||||
if (!read(streamer, instance.fan()[0], instance.fan().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 11:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.gpio()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 12:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.reserve()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 13:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.crc()))
|
||||
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, ::unitree_go::msg::dds_::LowCmd_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::LowCmd_>();
|
||||
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 ::unitree_go::msg::dds_::LowCmd_& 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.head()[0], instance.head().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 (!move(streamer, instance.level_flag()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.frame_reserve()))
|
||||
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.sn()[0], instance.sn().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.version()[0], instance.version().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 (!move(streamer, instance.bandwidth()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 6:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(true, false))
|
||||
return false;
|
||||
for (const auto & a_1:instance.motor_cmd()) { //array depth 1
|
||||
if (!move(streamer, a_1, prop))
|
||||
return false;
|
||||
} //array depth 1
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 7:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.bms_cmd(), prop))
|
||||
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.wireless_remote()[0], instance.wireless_remote().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.led()[0], instance.led().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 (!streamer.start_consecutive(true, true))
|
||||
return false;
|
||||
if (!move(streamer, instance.fan()[0], instance.fan().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 11:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.gpio()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 12:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.reserve()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 13:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.crc()))
|
||||
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 ::unitree_go::msg::dds_::LowCmd_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::LowCmd_>();
|
||||
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 ::unitree_go::msg::dds_::LowCmd_& 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.head()[0], instance.head().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 (!max(streamer, instance.level_flag()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.frame_reserve()))
|
||||
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.sn()[0], instance.sn().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.version()[0], instance.version().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 (!max(streamer, instance.bandwidth()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 6:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(true, false))
|
||||
return false;
|
||||
for (const auto & a_1:instance.motor_cmd()) { //array depth 1
|
||||
if (!max(streamer, a_1, prop))
|
||||
return false;
|
||||
} //array depth 1
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 7:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.bms_cmd(), prop))
|
||||
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.wireless_remote()[0], instance.wireless_remote().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.led()[0], instance.led().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 (!streamer.start_consecutive(true, true))
|
||||
return false;
|
||||
if (!max(streamer, instance.fan()[0], instance.fan().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 11:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.gpio()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 12:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.reserve()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 13:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.crc()))
|
||||
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 ::unitree_go::msg::dds_::LowCmd_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::LowCmd_>();
|
||||
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_UNITREE_IDL_GO2_LOWCMD__HPP
|
||||
1427
unitree_SDK/include/unitree/idl/go2/LowState_.hpp
Normal file
1427
unitree_SDK/include/unitree/idl/go2/LowState_.hpp
Normal file
File diff suppressed because it is too large
Load Diff
528
unitree_SDK/include/unitree/idl/go2/MotorCmd_.hpp
Normal file
528
unitree_SDK/include/unitree/idl/go2/MotorCmd_.hpp
Normal file
@@ -0,0 +1,528 @@
|
||||
/****************************************************************
|
||||
|
||||
Generated by Eclipse Cyclone DDS IDL to CXX Translator
|
||||
File name: MotorCmd_.idl
|
||||
Source: MotorCmd_.hpp
|
||||
Cyclone DDS: v0.10.2
|
||||
|
||||
*****************************************************************/
|
||||
#ifndef DDSCXX_UNITREE_IDL_GO2_MOTORCMD__HPP
|
||||
#define DDSCXX_UNITREE_IDL_GO2_MOTORCMD__HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <array>
|
||||
|
||||
namespace unitree_go
|
||||
{
|
||||
namespace msg
|
||||
{
|
||||
namespace dds_
|
||||
{
|
||||
class MotorCmd_
|
||||
{
|
||||
private:
|
||||
uint8_t mode_ = 0;
|
||||
float q_ = 0.0f;
|
||||
float dq_ = 0.0f;
|
||||
float tau_ = 0.0f;
|
||||
float kp_ = 0.0f;
|
||||
float kd_ = 0.0f;
|
||||
std::array<uint32_t, 3> reserve_ = { };
|
||||
|
||||
public:
|
||||
MotorCmd_() = default;
|
||||
|
||||
explicit MotorCmd_(
|
||||
uint8_t mode,
|
||||
float q,
|
||||
float dq,
|
||||
float tau,
|
||||
float kp,
|
||||
float kd,
|
||||
const std::array<uint32_t, 3>& reserve) :
|
||||
mode_(mode),
|
||||
q_(q),
|
||||
dq_(dq),
|
||||
tau_(tau),
|
||||
kp_(kp),
|
||||
kd_(kd),
|
||||
reserve_(reserve) { }
|
||||
|
||||
uint8_t mode() const { return this->mode_; }
|
||||
uint8_t& mode() { return this->mode_; }
|
||||
void mode(uint8_t _val_) { this->mode_ = _val_; }
|
||||
float q() const { return this->q_; }
|
||||
float& q() { return this->q_; }
|
||||
void q(float _val_) { this->q_ = _val_; }
|
||||
float dq() const { return this->dq_; }
|
||||
float& dq() { return this->dq_; }
|
||||
void dq(float _val_) { this->dq_ = _val_; }
|
||||
float tau() const { return this->tau_; }
|
||||
float& tau() { return this->tau_; }
|
||||
void tau(float _val_) { this->tau_ = _val_; }
|
||||
float kp() const { return this->kp_; }
|
||||
float& kp() { return this->kp_; }
|
||||
void kp(float _val_) { this->kp_ = _val_; }
|
||||
float kd() const { return this->kd_; }
|
||||
float& kd() { return this->kd_; }
|
||||
void kd(float _val_) { this->kd_ = _val_; }
|
||||
const std::array<uint32_t, 3>& reserve() const { return this->reserve_; }
|
||||
std::array<uint32_t, 3>& reserve() { return this->reserve_; }
|
||||
void reserve(const std::array<uint32_t, 3>& _val_) { this->reserve_ = _val_; }
|
||||
void reserve(std::array<uint32_t, 3>&& _val_) { this->reserve_ = _val_; }
|
||||
|
||||
bool operator==(const MotorCmd_& _other) const
|
||||
{
|
||||
(void) _other;
|
||||
return mode_ == _other.mode_ &&
|
||||
q_ == _other.q_ &&
|
||||
dq_ == _other.dq_ &&
|
||||
tau_ == _other.tau_ &&
|
||||
kp_ == _other.kp_ &&
|
||||
kd_ == _other.kd_ &&
|
||||
reserve_ == _other.reserve_;
|
||||
}
|
||||
|
||||
bool operator!=(const MotorCmd_& _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<::unitree_go::msg::dds_::MotorCmd_>::getTypeName()
|
||||
{
|
||||
return "unitree_go::msg::dds_::MotorCmd_";
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::MotorCmd_>::isKeyless()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::MotorCmd_>::type_map_blob_sz() { return 478; }
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::MotorCmd_>::type_info_blob_sz() { return 100; }
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::MotorCmd_>::type_map_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0xa6, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0xc8, 0xe5, 0x83, 0x5b, 0x0f, 0x0c, 0x17,
|
||||
0x65, 0xbc, 0x23, 0x1d, 0xfa, 0x02, 0xff, 0x00, 0x8e, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x15, 0xd6, 0x17, 0x12, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x76, 0x94, 0xf4, 0xa6, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x47, 0xbc, 0xdc, 0xd7, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x45, 0x80, 0xc2, 0x74, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x26, 0xb5, 0x68, 0xe4, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x87, 0x22, 0x16, 0x52, 0x00,
|
||||
0x16, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x9c, 0x3b, 0x62, 0x94, 0x00, 0x00, 0x06, 0x01, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0xf2, 0x42, 0x1f, 0xa5, 0xb2, 0xdb, 0x2d, 0xef, 0xf5, 0xc0, 0x3f, 0xff,
|
||||
0x16, 0x30, 0x3b, 0x00, 0xee, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f,
|
||||
0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4d,
|
||||
0x6f, 0x74, 0x6f, 0x72, 0x43, 0x6d, 0x64, 0x5f, 0x00, 0x00, 0x00, 0x00, 0xb6, 0x00, 0x00, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00,
|
||||
0x05, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00,
|
||||
0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, 0x74, 0x61, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x11, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x6b, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x6b, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x22, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65,
|
||||
0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0xf2, 0x42, 0x1f, 0xa5, 0xb2, 0xdb, 0x2d, 0xef, 0xf5, 0xc0, 0x3f, 0xff, 0x16, 0x30, 0x3b, 0xf1,
|
||||
0xc8, 0xe5, 0x83, 0x5b, 0x0f, 0x0c, 0x17, 0x65, 0xbc, 0x23, 0x1d, 0xfa, 0x02, 0xff, };
|
||||
return blob;
|
||||
}
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::MotorCmd_>::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, 0xc8, 0xe5, 0x83, 0x5b, 0x0f, 0x0c, 0x17, 0x65, 0xbc, 0x23, 0x1d,
|
||||
0xfa, 0x02, 0xff, 0x00, 0x92, 0x00, 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, 0x42, 0x1f, 0xa5, 0xb2, 0xdb, 0x2d, 0xef, 0xf5, 0xc0, 0x3f, 0xff,
|
||||
0x16, 0x30, 0x3b, 0x00, 0xf2, 0x00, 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<::unitree_go::msg::dds_::MotorCmd_>
|
||||
{
|
||||
static std::string value()
|
||||
{
|
||||
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::MotorCmd_>::getTypeName();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::MotorCmd_)
|
||||
|
||||
namespace org{
|
||||
namespace eclipse{
|
||||
namespace cyclonedds{
|
||||
namespace core{
|
||||
namespace cdr{
|
||||
|
||||
template<>
|
||||
propvec &get_type_props<::unitree_go::msg::dds_::MotorCmd_>();
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
|
||||
bool write(T& streamer, const ::unitree_go::msg::dds_::MotorCmd_& 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 (!write(streamer, instance.mode()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.q()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.dq()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.tau()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.kp()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 5:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.kd()))
|
||||
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.reserve()[0], instance.reserve().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::MotorCmd_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::MotorCmd_>();
|
||||
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, ::unitree_go::msg::dds_::MotorCmd_& 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 (!read(streamer, instance.mode()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.q()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.dq()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.tau()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.kp()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 5:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.kd()))
|
||||
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.reserve()[0], instance.reserve().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
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, ::unitree_go::msg::dds_::MotorCmd_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::MotorCmd_>();
|
||||
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 ::unitree_go::msg::dds_::MotorCmd_& 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 (!move(streamer, instance.mode()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.q()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.dq()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.tau()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.kp()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 5:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.kd()))
|
||||
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.reserve()[0], instance.reserve().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::MotorCmd_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::MotorCmd_>();
|
||||
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 ::unitree_go::msg::dds_::MotorCmd_& 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 (!max(streamer, instance.mode()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.q()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.dq()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.tau()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.kp()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 5:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.kd()))
|
||||
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.reserve()[0], instance.reserve().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::MotorCmd_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::MotorCmd_>();
|
||||
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_UNITREE_IDL_GO2_MOTORCMD__HPP
|
||||
348
unitree_SDK/include/unitree/idl/go2/MotorCmds_.hpp
Normal file
348
unitree_SDK/include/unitree/idl/go2/MotorCmds_.hpp
Normal file
@@ -0,0 +1,348 @@
|
||||
/****************************************************************
|
||||
|
||||
Generated by Eclipse Cyclone DDS IDL to CXX Translator
|
||||
File name: MotorCmds_.idl
|
||||
Source: MotorCmds_.hpp
|
||||
Cyclone DDS: v0.10.2
|
||||
|
||||
*****************************************************************/
|
||||
#ifndef DDSCXX_UNITREE_IDL_GO2_MOTORCMDS__HPP
|
||||
#define DDSCXX_UNITREE_IDL_GO2_MOTORCMDS__HPP
|
||||
|
||||
#include "unitree/idl/go2/MotorCmd_.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace unitree_go
|
||||
{
|
||||
namespace msg
|
||||
{
|
||||
namespace dds_
|
||||
{
|
||||
class MotorCmds_
|
||||
{
|
||||
private:
|
||||
std::vector<::unitree_go::msg::dds_::MotorCmd_> cmds_;
|
||||
|
||||
public:
|
||||
MotorCmds_() = default;
|
||||
|
||||
explicit MotorCmds_(
|
||||
const std::vector<::unitree_go::msg::dds_::MotorCmd_>& cmds) :
|
||||
cmds_(cmds) { }
|
||||
|
||||
const std::vector<::unitree_go::msg::dds_::MotorCmd_>& cmds() const { return this->cmds_; }
|
||||
std::vector<::unitree_go::msg::dds_::MotorCmd_>& cmds() { return this->cmds_; }
|
||||
void cmds(const std::vector<::unitree_go::msg::dds_::MotorCmd_>& _val_) { this->cmds_ = _val_; }
|
||||
void cmds(std::vector<::unitree_go::msg::dds_::MotorCmd_>&& _val_) { this->cmds_ = _val_; }
|
||||
|
||||
bool operator==(const MotorCmds_& _other) const
|
||||
{
|
||||
(void) _other;
|
||||
return cmds_ == _other.cmds_;
|
||||
}
|
||||
|
||||
bool operator!=(const MotorCmds_& _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<::unitree_go::msg::dds_::MotorCmds_>::getTypeName()
|
||||
{
|
||||
return "unitree_go::msg::dds_::MotorCmds_";
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::MotorCmds_>::isSelfContained()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::MotorCmds_>::isKeyless()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::MotorCmds_>::type_map_blob_sz() { return 708; }
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::MotorCmds_>::type_info_blob_sz() { return 148; }
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::MotorCmds_>::type_map_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0xf2, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xf1, 0x8b, 0xdd, 0x20, 0x7f, 0x54, 0xf9, 0xc2,
|
||||
0xac, 0x2e, 0xa6, 0xb2, 0xa0, 0x48, 0x2e, 0x00, 0x36, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf1, 0x01, 0x00, 0x00, 0xf1,
|
||||
0xc8, 0xe5, 0x83, 0x5b, 0x0f, 0x0c, 0x17, 0x65, 0xbc, 0x23, 0x1d, 0xfa, 0x02, 0xff, 0xb0, 0x2e,
|
||||
0x95, 0x33, 0xf1, 0xc8, 0xe5, 0x83, 0x5b, 0x0f, 0x0c, 0x17, 0x65, 0xbc, 0x23, 0x1d, 0xfa, 0x02,
|
||||
0xff, 0x00, 0x00, 0x00, 0x8e, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x15, 0xd6, 0x17, 0x12, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x76, 0x94, 0xf4, 0xa6, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x47, 0xbc, 0xdc, 0xd7, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x45, 0x80, 0xc2, 0x74, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x26, 0xb5, 0x68, 0xe4, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x87, 0x22, 0x16, 0x52, 0x00, 0x16, 0x00, 0x00, 0x00,
|
||||
0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x03, 0x07, 0x9c, 0x3b, 0x62, 0x94, 0x00, 0x00, 0x82, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0xf2, 0x2e, 0xa8, 0x7a, 0x3a, 0xc2, 0x22, 0xec, 0x38, 0x65, 0x96, 0x03, 0x6e, 0xce, 0x43, 0x00,
|
||||
0x67, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x22, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a,
|
||||
0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4d, 0x6f, 0x74, 0x6f, 0x72,
|
||||
0x43, 0x6d, 0x64, 0x73, 0x5f, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf2, 0x01, 0x00, 0x00, 0xf2,
|
||||
0x42, 0x1f, 0xa5, 0xb2, 0xdb, 0x2d, 0xef, 0xf5, 0xc0, 0x3f, 0xff, 0x16, 0x30, 0x3b, 0x00, 0x00,
|
||||
0x05, 0x00, 0x00, 0x00, 0x63, 0x6d, 0x64, 0x73, 0x00, 0x00, 0x00, 0xf2, 0x42, 0x1f, 0xa5, 0xb2,
|
||||
0xdb, 0x2d, 0xef, 0xf5, 0xc0, 0x3f, 0xff, 0x16, 0x30, 0x3b, 0x00, 0x00, 0xee, 0x00, 0x00, 0x00,
|
||||
0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00,
|
||||
0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a,
|
||||
0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4d, 0x6f, 0x74, 0x6f, 0x72, 0x43, 0x6d, 0x64, 0x5f,
|
||||
0x00, 0x00, 0x00, 0x00, 0xb6, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65,
|
||||
0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x74, 0x61, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x6b, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x11, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x6b, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xf2, 0x2e, 0xa8, 0x7a, 0x3a, 0xc2, 0x22, 0xec,
|
||||
0x38, 0x65, 0x96, 0x03, 0x6e, 0xce, 0x43, 0xf1, 0x8b, 0xdd, 0x20, 0x7f, 0x54, 0xf9, 0xc2, 0xac,
|
||||
0x2e, 0xa6, 0xb2, 0xa0, 0x48, 0x2e, 0xf2, 0x42, 0x1f, 0xa5, 0xb2, 0xdb, 0x2d, 0xef, 0xf5, 0xc0,
|
||||
0x3f, 0xff, 0x16, 0x30, 0x3b, 0xf1, 0xc8, 0xe5, 0x83, 0x5b, 0x0f, 0x0c, 0x17, 0x65, 0xbc, 0x23,
|
||||
0x1d, 0xfa, 0x02, 0xff, };
|
||||
return blob;
|
||||
}
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::MotorCmds_>::type_info_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0x90, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00,
|
||||
0x14, 0x00, 0x00, 0x00, 0xf1, 0x8b, 0xdd, 0x20, 0x7f, 0x54, 0xf9, 0xc2, 0xac, 0x2e, 0xa6, 0xb2,
|
||||
0xa0, 0x48, 0x2e, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0xc8, 0xe5, 0x83, 0x5b, 0x0f, 0x0c, 0x17,
|
||||
0x65, 0xbc, 0x23, 0x1d, 0xfa, 0x02, 0xff, 0x00, 0x92, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40,
|
||||
0x40, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x2e, 0xa8, 0x7a,
|
||||
0x3a, 0xc2, 0x22, 0xec, 0x38, 0x65, 0x96, 0x03, 0x6e, 0xce, 0x43, 0x00, 0x6b, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||
0xf2, 0x42, 0x1f, 0xa5, 0xb2, 0xdb, 0x2d, 0xef, 0xf5, 0xc0, 0x3f, 0xff, 0x16, 0x30, 0x3b, 0x00,
|
||||
0xf2, 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<::unitree_go::msg::dds_::MotorCmds_>
|
||||
{
|
||||
static std::string value()
|
||||
{
|
||||
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::MotorCmds_>::getTypeName();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::MotorCmds_)
|
||||
|
||||
namespace org{
|
||||
namespace eclipse{
|
||||
namespace cyclonedds{
|
||||
namespace core{
|
||||
namespace cdr{
|
||||
|
||||
template<>
|
||||
propvec &get_type_props<::unitree_go::msg::dds_::MotorCmds_>();
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
|
||||
bool write(T& streamer, const ::unitree_go::msg::dds_::MotorCmds_& 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(false, false))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.cmds().size());
|
||||
if (!write(streamer, se_1))
|
||||
return false;
|
||||
for (uint32_t i_1 = 0; i_1 < se_1; i_1++) {
|
||||
if (!write(streamer, instance.cmds()[i_1], prop))
|
||||
return false;
|
||||
} //i_1
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::MotorCmds_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::MotorCmds_>();
|
||||
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, ::unitree_go::msg::dds_::MotorCmds_& 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(false, false))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.cmds().size());
|
||||
if (!read(streamer, se_1))
|
||||
return false;
|
||||
instance.cmds().resize(se_1);
|
||||
for (uint32_t i_1 = 0; i_1 < se_1; i_1++) {
|
||||
if (!read(streamer, instance.cmds()[i_1], prop))
|
||||
return false;
|
||||
} //i_1
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
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, ::unitree_go::msg::dds_::MotorCmds_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::MotorCmds_>();
|
||||
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 ::unitree_go::msg::dds_::MotorCmds_& 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(false, false))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.cmds().size());
|
||||
if (!move(streamer, se_1))
|
||||
return false;
|
||||
for (uint32_t i_1 = 0; i_1 < se_1; i_1++) {
|
||||
if (!move(streamer, instance.cmds()[i_1], prop))
|
||||
return false;
|
||||
} //i_1
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::MotorCmds_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::MotorCmds_>();
|
||||
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 ::unitree_go::msg::dds_::MotorCmds_& 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(false, false))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = 0;
|
||||
if (!max(streamer, se_1))
|
||||
return false;
|
||||
for (uint32_t i_1 = 0; i_1 < se_1; i_1++) {
|
||||
if (!max(streamer, instance.cmds()[i_1], prop))
|
||||
return false;
|
||||
} //i_1
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
streamer.position(SIZE_MAX);
|
||||
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 ::unitree_go::msg::dds_::MotorCmds_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::MotorCmds_>();
|
||||
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_UNITREE_IDL_GO2_MOTORCMDS__HPP
|
||||
696
unitree_SDK/include/unitree/idl/go2/MotorState_.hpp
Normal file
696
unitree_SDK/include/unitree/idl/go2/MotorState_.hpp
Normal file
@@ -0,0 +1,696 @@
|
||||
/****************************************************************
|
||||
|
||||
Generated by Eclipse Cyclone DDS IDL to CXX Translator
|
||||
File name: MotorState_.idl
|
||||
Source: MotorState_.hpp
|
||||
Cyclone DDS: v0.10.2
|
||||
|
||||
*****************************************************************/
|
||||
#ifndef DDSCXX_UNITREE_IDL_GO2_MOTORSTATE__HPP
|
||||
#define DDSCXX_UNITREE_IDL_GO2_MOTORSTATE__HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <array>
|
||||
|
||||
namespace unitree_go
|
||||
{
|
||||
namespace msg
|
||||
{
|
||||
namespace dds_
|
||||
{
|
||||
class MotorState_
|
||||
{
|
||||
private:
|
||||
uint8_t mode_ = 0;
|
||||
float q_ = 0.0f;
|
||||
float dq_ = 0.0f;
|
||||
float ddq_ = 0.0f;
|
||||
float tau_est_ = 0.0f;
|
||||
float q_raw_ = 0.0f;
|
||||
float dq_raw_ = 0.0f;
|
||||
float ddq_raw_ = 0.0f;
|
||||
uint8_t temperature_ = 0;
|
||||
uint32_t lost_ = 0;
|
||||
std::array<uint32_t, 2> reserve_ = { };
|
||||
|
||||
public:
|
||||
MotorState_() = default;
|
||||
|
||||
explicit MotorState_(
|
||||
uint8_t mode,
|
||||
float q,
|
||||
float dq,
|
||||
float ddq,
|
||||
float tau_est,
|
||||
float q_raw,
|
||||
float dq_raw,
|
||||
float ddq_raw,
|
||||
uint8_t temperature,
|
||||
uint32_t lost,
|
||||
const std::array<uint32_t, 2>& reserve) :
|
||||
mode_(mode),
|
||||
q_(q),
|
||||
dq_(dq),
|
||||
ddq_(ddq),
|
||||
tau_est_(tau_est),
|
||||
q_raw_(q_raw),
|
||||
dq_raw_(dq_raw),
|
||||
ddq_raw_(ddq_raw),
|
||||
temperature_(temperature),
|
||||
lost_(lost),
|
||||
reserve_(reserve) { }
|
||||
|
||||
uint8_t mode() const { return this->mode_; }
|
||||
uint8_t& mode() { return this->mode_; }
|
||||
void mode(uint8_t _val_) { this->mode_ = _val_; }
|
||||
float q() const { return this->q_; }
|
||||
float& q() { return this->q_; }
|
||||
void q(float _val_) { this->q_ = _val_; }
|
||||
float dq() const { return this->dq_; }
|
||||
float& dq() { return this->dq_; }
|
||||
void dq(float _val_) { this->dq_ = _val_; }
|
||||
float ddq() const { return this->ddq_; }
|
||||
float& ddq() { return this->ddq_; }
|
||||
void ddq(float _val_) { this->ddq_ = _val_; }
|
||||
float tau_est() const { return this->tau_est_; }
|
||||
float& tau_est() { return this->tau_est_; }
|
||||
void tau_est(float _val_) { this->tau_est_ = _val_; }
|
||||
float q_raw() const { return this->q_raw_; }
|
||||
float& q_raw() { return this->q_raw_; }
|
||||
void q_raw(float _val_) { this->q_raw_ = _val_; }
|
||||
float dq_raw() const { return this->dq_raw_; }
|
||||
float& dq_raw() { return this->dq_raw_; }
|
||||
void dq_raw(float _val_) { this->dq_raw_ = _val_; }
|
||||
float ddq_raw() const { return this->ddq_raw_; }
|
||||
float& ddq_raw() { return this->ddq_raw_; }
|
||||
void ddq_raw(float _val_) { this->ddq_raw_ = _val_; }
|
||||
uint8_t temperature() const { return this->temperature_; }
|
||||
uint8_t& temperature() { return this->temperature_; }
|
||||
void temperature(uint8_t _val_) { this->temperature_ = _val_; }
|
||||
uint32_t lost() const { return this->lost_; }
|
||||
uint32_t& lost() { return this->lost_; }
|
||||
void lost(uint32_t _val_) { this->lost_ = _val_; }
|
||||
const std::array<uint32_t, 2>& reserve() const { return this->reserve_; }
|
||||
std::array<uint32_t, 2>& reserve() { return this->reserve_; }
|
||||
void reserve(const std::array<uint32_t, 2>& _val_) { this->reserve_ = _val_; }
|
||||
void reserve(std::array<uint32_t, 2>&& _val_) { this->reserve_ = _val_; }
|
||||
|
||||
bool operator==(const MotorState_& _other) const
|
||||
{
|
||||
(void) _other;
|
||||
return mode_ == _other.mode_ &&
|
||||
q_ == _other.q_ &&
|
||||
dq_ == _other.dq_ &&
|
||||
ddq_ == _other.ddq_ &&
|
||||
tau_est_ == _other.tau_est_ &&
|
||||
q_raw_ == _other.q_raw_ &&
|
||||
dq_raw_ == _other.dq_raw_ &&
|
||||
ddq_raw_ == _other.ddq_raw_ &&
|
||||
temperature_ == _other.temperature_ &&
|
||||
lost_ == _other.lost_ &&
|
||||
reserve_ == _other.reserve_;
|
||||
}
|
||||
|
||||
bool operator!=(const MotorState_& _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<::unitree_go::msg::dds_::MotorState_>::getTypeName()
|
||||
{
|
||||
return "unitree_go::msg::dds_::MotorState_";
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::MotorState_>::isKeyless()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::MotorState_>::type_map_blob_sz() { return 658; }
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::MotorState_>::type_info_blob_sz() { return 100; }
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::MotorState_>::type_map_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0xe6, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x42, 0xa2, 0x28, 0x8b, 0x79, 0x8a, 0xf8,
|
||||
0xdb, 0x05, 0xe1, 0x27, 0x36, 0xb1, 0xbe, 0x00, 0xce, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x15, 0xd6, 0x17, 0x12, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x76, 0x94, 0xf4, 0xa6, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x47, 0xbc, 0xdc, 0xd7, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xe9, 0x16, 0x89, 0x09, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x8a, 0xf7, 0xae, 0xdf, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x6e, 0x96, 0x3d, 0x84, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x30, 0x50, 0xb6, 0xd9, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x4a, 0xe0, 0x48, 0xae, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xee, 0xf4, 0x38, 0xf7, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x1c, 0x9a, 0x44, 0xeb, 0x00,
|
||||
0x16, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0x9c, 0x3b, 0x62, 0x94, 0x00, 0x00, 0x7a, 0x01, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0xf2, 0xd2, 0xbc, 0xfb, 0x97, 0xbe, 0x37, 0xa8, 0xbc, 0x9c, 0x41, 0xe5,
|
||||
0x0b, 0xa1, 0xc9, 0x00, 0x62, 0x01, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2b, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f,
|
||||
0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4d,
|
||||
0x6f, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x00, 0x00, 0x2a, 0x01, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00,
|
||||
0x05, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00,
|
||||
0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, 0x64, 0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x16, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||
0x74, 0x61, 0x75, 0x5f, 0x65, 0x73, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||
0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x06, 0x00, 0x00, 0x00, 0x71, 0x5f, 0x72, 0x61,
|
||||
0x77, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x64, 0x71, 0x5f, 0x72, 0x61, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x16, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||
0x64, 0x64, 0x71, 0x5f, 0x72, 0x61, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x74, 0x65, 0x6d, 0x70,
|
||||
0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
|
||||
0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x05, 0x00, 0x00, 0x00, 0x6c, 0x6f, 0x73, 0x74,
|
||||
0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||
0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0xf2, 0xd2, 0xbc, 0xfb, 0x97, 0xbe, 0x37, 0xa8, 0xbc, 0x9c, 0x41, 0xe5,
|
||||
0x0b, 0xa1, 0xc9, 0xf1, 0x42, 0xa2, 0x28, 0x8b, 0x79, 0x8a, 0xf8, 0xdb, 0x05, 0xe1, 0x27, 0x36,
|
||||
0xb1, 0xbe, };
|
||||
return blob;
|
||||
}
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::MotorState_>::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, 0x42, 0xa2, 0x28, 0x8b, 0x79, 0x8a, 0xf8, 0xdb, 0x05, 0xe1, 0x27,
|
||||
0x36, 0xb1, 0xbe, 0x00, 0xd2, 0x00, 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, 0xd2, 0xbc, 0xfb, 0x97, 0xbe, 0x37, 0xa8, 0xbc, 0x9c, 0x41, 0xe5,
|
||||
0x0b, 0xa1, 0xc9, 0x00, 0x66, 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<::unitree_go::msg::dds_::MotorState_>
|
||||
{
|
||||
static std::string value()
|
||||
{
|
||||
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::MotorState_>::getTypeName();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::MotorState_)
|
||||
|
||||
namespace org{
|
||||
namespace eclipse{
|
||||
namespace cyclonedds{
|
||||
namespace core{
|
||||
namespace cdr{
|
||||
|
||||
template<>
|
||||
propvec &get_type_props<::unitree_go::msg::dds_::MotorState_>();
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
|
||||
bool write(T& streamer, const ::unitree_go::msg::dds_::MotorState_& 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 (!write(streamer, instance.mode()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.q()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.dq()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.ddq()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.tau_est()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 5:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.q_raw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 6:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.dq_raw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 7:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.ddq_raw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 8:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.temperature()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 9:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.lost()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 10:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(true, true))
|
||||
return false;
|
||||
if (!write(streamer, instance.reserve()[0], instance.reserve().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::MotorState_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::MotorState_>();
|
||||
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, ::unitree_go::msg::dds_::MotorState_& 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 (!read(streamer, instance.mode()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.q()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.dq()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.ddq()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.tau_est()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 5:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.q_raw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 6:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.dq_raw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 7:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.ddq_raw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 8:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.temperature()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 9:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.lost()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 10:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(true, true))
|
||||
return false;
|
||||
if (!read(streamer, instance.reserve()[0], instance.reserve().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
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, ::unitree_go::msg::dds_::MotorState_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::MotorState_>();
|
||||
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 ::unitree_go::msg::dds_::MotorState_& 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 (!move(streamer, instance.mode()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.q()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.dq()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.ddq()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.tau_est()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 5:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.q_raw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 6:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.dq_raw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 7:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.ddq_raw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 8:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.temperature()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 9:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.lost()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 10:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(true, true))
|
||||
return false;
|
||||
if (!move(streamer, instance.reserve()[0], instance.reserve().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::MotorState_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::MotorState_>();
|
||||
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 ::unitree_go::msg::dds_::MotorState_& 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 (!max(streamer, instance.mode()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.q()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.dq()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.ddq()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.tau_est()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 5:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.q_raw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 6:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.dq_raw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 7:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.ddq_raw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 8:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.temperature()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 9:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.lost()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 10:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(true, true))
|
||||
return false;
|
||||
if (!max(streamer, instance.reserve()[0], instance.reserve().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::MotorState_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::MotorState_>();
|
||||
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_UNITREE_IDL_GO2_MOTORSTATE__HPP
|
||||
359
unitree_SDK/include/unitree/idl/go2/MotorStates_.hpp
Normal file
359
unitree_SDK/include/unitree/idl/go2/MotorStates_.hpp
Normal file
@@ -0,0 +1,359 @@
|
||||
/****************************************************************
|
||||
|
||||
Generated by Eclipse Cyclone DDS IDL to CXX Translator
|
||||
File name: MotorStates_.idl
|
||||
Source: MotorStates_.hpp
|
||||
Cyclone DDS: v0.10.2
|
||||
|
||||
*****************************************************************/
|
||||
#ifndef DDSCXX_UNITREE_IDL_GO2_MOTORSTATES__HPP
|
||||
#define DDSCXX_UNITREE_IDL_GO2_MOTORSTATES__HPP
|
||||
|
||||
#include "unitree/idl/go2/MotorState_.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace unitree_go
|
||||
{
|
||||
namespace msg
|
||||
{
|
||||
namespace dds_
|
||||
{
|
||||
class MotorStates_
|
||||
{
|
||||
private:
|
||||
std::vector<::unitree_go::msg::dds_::MotorState_> states_;
|
||||
|
||||
public:
|
||||
MotorStates_() = default;
|
||||
|
||||
explicit MotorStates_(
|
||||
const std::vector<::unitree_go::msg::dds_::MotorState_>& states) :
|
||||
states_(states) { }
|
||||
|
||||
const std::vector<::unitree_go::msg::dds_::MotorState_>& states() const { return this->states_; }
|
||||
std::vector<::unitree_go::msg::dds_::MotorState_>& states() { return this->states_; }
|
||||
void states(const std::vector<::unitree_go::msg::dds_::MotorState_>& _val_) { this->states_ = _val_; }
|
||||
void states(std::vector<::unitree_go::msg::dds_::MotorState_>&& _val_) { this->states_ = _val_; }
|
||||
|
||||
bool operator==(const MotorStates_& _other) const
|
||||
{
|
||||
(void) _other;
|
||||
return states_ == _other.states_;
|
||||
}
|
||||
|
||||
bool operator!=(const MotorStates_& _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<::unitree_go::msg::dds_::MotorStates_>::getTypeName()
|
||||
{
|
||||
return "unitree_go::msg::dds_::MotorStates_";
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::MotorStates_>::isSelfContained()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::MotorStates_>::isKeyless()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::MotorStates_>::type_map_blob_sz() { return 888; }
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::MotorStates_>::type_info_blob_sz() { return 148; }
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::MotorStates_>::type_map_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0x32, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xf1, 0x13, 0xa0, 0x6c, 0x7a, 0xa8, 0x80, 0x82,
|
||||
0x61, 0x7d, 0xd1, 0xe8, 0xed, 0xe0, 0x45, 0x00, 0x36, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf1, 0x01, 0x00, 0x00, 0xf1,
|
||||
0x42, 0xa2, 0x28, 0x8b, 0x79, 0x8a, 0xf8, 0xdb, 0x05, 0xe1, 0x27, 0x36, 0xb1, 0xbe, 0x34, 0xd9,
|
||||
0x55, 0xa0, 0xf1, 0x42, 0xa2, 0x28, 0x8b, 0x79, 0x8a, 0xf8, 0xdb, 0x05, 0xe1, 0x27, 0x36, 0xb1,
|
||||
0xbe, 0x00, 0x00, 0x00, 0xce, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x15, 0xd6, 0x17, 0x12, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x76, 0x94, 0xf4, 0xa6, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x47, 0xbc, 0xdc, 0xd7, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xe9, 0x16, 0x89, 0x09, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x8a, 0xf7, 0xae, 0xdf, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x6e, 0x96, 0x3d, 0x84, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x30, 0x50, 0xb6, 0xd9, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x4a, 0xe0, 0x48, 0xae, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xee, 0xf4, 0x38, 0xf7, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x1c, 0x9a, 0x44, 0xeb, 0x00, 0x16, 0x00, 0x00, 0x00,
|
||||
0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x02, 0x07, 0x9c, 0x3b, 0x62, 0x94, 0x00, 0x00, 0xf6, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0xf2, 0xb9, 0x0a, 0xca, 0x92, 0x86, 0xab, 0x4e, 0x3e, 0xae, 0x76, 0x38, 0xef, 0x5c, 0xa9, 0x00,
|
||||
0x69, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x24, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a,
|
||||
0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4d, 0x6f, 0x74, 0x6f, 0x72,
|
||||
0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x5f, 0x00, 0x31, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf2, 0x01, 0x00, 0x00, 0xf2,
|
||||
0xd2, 0xbc, 0xfb, 0x97, 0xbe, 0x37, 0xa8, 0xbc, 0x9c, 0x41, 0xe5, 0x0b, 0xa1, 0xc9, 0x00, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x00, 0x00, 0x00, 0xf2, 0xd2, 0xbc,
|
||||
0xfb, 0x97, 0xbe, 0x37, 0xa8, 0xbc, 0x9c, 0x41, 0xe5, 0x0b, 0xa1, 0xc9, 0x62, 0x01, 0x00, 0x00,
|
||||
0xf2, 0x51, 0x01, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00,
|
||||
0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a,
|
||||
0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x4d, 0x6f, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74,
|
||||
0x65, 0x5f, 0x00, 0x00, 0x2a, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65,
|
||||
0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x64, 0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x00, 0x08, 0x00, 0x00, 0x00, 0x74, 0x61, 0x75, 0x5f, 0x65, 0x73, 0x74, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00,
|
||||
0x06, 0x00, 0x00, 0x00, 0x71, 0x5f, 0x72, 0x61, 0x77, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00,
|
||||
0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x07, 0x00, 0x00, 0x00, 0x64, 0x71, 0x5f, 0x72,
|
||||
0x61, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x00, 0x08, 0x00, 0x00, 0x00, 0x64, 0x64, 0x71, 0x5f, 0x72, 0x61, 0x77, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00,
|
||||
0x0c, 0x00, 0x00, 0x00, 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00,
|
||||
0x05, 0x00, 0x00, 0x00, 0x6c, 0x6f, 0x73, 0x74, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00,
|
||||
0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x02, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xf2, 0xb9, 0x0a, 0xca,
|
||||
0x92, 0x86, 0xab, 0x4e, 0x3e, 0xae, 0x76, 0x38, 0xef, 0x5c, 0xa9, 0xf1, 0x13, 0xa0, 0x6c, 0x7a,
|
||||
0xa8, 0x80, 0x82, 0x61, 0x7d, 0xd1, 0xe8, 0xed, 0xe0, 0x45, 0xf2, 0xd2, 0xbc, 0xfb, 0x97, 0xbe,
|
||||
0x37, 0xa8, 0xbc, 0x9c, 0x41, 0xe5, 0x0b, 0xa1, 0xc9, 0xf1, 0x42, 0xa2, 0x28, 0x8b, 0x79, 0x8a,
|
||||
0xf8, 0xdb, 0x05, 0xe1, 0x27, 0x36, 0xb1, 0xbe, };
|
||||
return blob;
|
||||
}
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::MotorStates_>::type_info_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0x90, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00,
|
||||
0x14, 0x00, 0x00, 0x00, 0xf1, 0x13, 0xa0, 0x6c, 0x7a, 0xa8, 0x80, 0x82, 0x61, 0x7d, 0xd1, 0xe8,
|
||||
0xed, 0xe0, 0x45, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x42, 0xa2, 0x28, 0x8b, 0x79, 0x8a, 0xf8,
|
||||
0xdb, 0x05, 0xe1, 0x27, 0x36, 0xb1, 0xbe, 0x00, 0xd2, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40,
|
||||
0x40, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0xb9, 0x0a, 0xca,
|
||||
0x92, 0x86, 0xab, 0x4e, 0x3e, 0xae, 0x76, 0x38, 0xef, 0x5c, 0xa9, 0x00, 0x6d, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||
0xf2, 0xd2, 0xbc, 0xfb, 0x97, 0xbe, 0x37, 0xa8, 0xbc, 0x9c, 0x41, 0xe5, 0x0b, 0xa1, 0xc9, 0x00,
|
||||
0x66, 0x01, 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<::unitree_go::msg::dds_::MotorStates_>
|
||||
{
|
||||
static std::string value()
|
||||
{
|
||||
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::MotorStates_>::getTypeName();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::MotorStates_)
|
||||
|
||||
namespace org{
|
||||
namespace eclipse{
|
||||
namespace cyclonedds{
|
||||
namespace core{
|
||||
namespace cdr{
|
||||
|
||||
template<>
|
||||
propvec &get_type_props<::unitree_go::msg::dds_::MotorStates_>();
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
|
||||
bool write(T& streamer, const ::unitree_go::msg::dds_::MotorStates_& 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(false, false))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.states().size());
|
||||
if (!write(streamer, se_1))
|
||||
return false;
|
||||
for (uint32_t i_1 = 0; i_1 < se_1; i_1++) {
|
||||
if (!write(streamer, instance.states()[i_1], prop))
|
||||
return false;
|
||||
} //i_1
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::MotorStates_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::MotorStates_>();
|
||||
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, ::unitree_go::msg::dds_::MotorStates_& 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(false, false))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.states().size());
|
||||
if (!read(streamer, se_1))
|
||||
return false;
|
||||
instance.states().resize(se_1);
|
||||
for (uint32_t i_1 = 0; i_1 < se_1; i_1++) {
|
||||
if (!read(streamer, instance.states()[i_1], prop))
|
||||
return false;
|
||||
} //i_1
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
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, ::unitree_go::msg::dds_::MotorStates_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::MotorStates_>();
|
||||
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 ::unitree_go::msg::dds_::MotorStates_& 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(false, false))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.states().size());
|
||||
if (!move(streamer, se_1))
|
||||
return false;
|
||||
for (uint32_t i_1 = 0; i_1 < se_1; i_1++) {
|
||||
if (!move(streamer, instance.states()[i_1], prop))
|
||||
return false;
|
||||
} //i_1
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::MotorStates_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::MotorStates_>();
|
||||
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 ::unitree_go::msg::dds_::MotorStates_& 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(false, false))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = 0;
|
||||
if (!max(streamer, se_1))
|
||||
return false;
|
||||
for (uint32_t i_1 = 0; i_1 < se_1; i_1++) {
|
||||
if (!max(streamer, instance.states()[i_1], prop))
|
||||
return false;
|
||||
} //i_1
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
streamer.position(SIZE_MAX);
|
||||
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 ::unitree_go::msg::dds_::MotorStates_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::MotorStates_>();
|
||||
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_UNITREE_IDL_GO2_MOTORSTATES__HPP
|
||||
508
unitree_SDK/include/unitree/idl/go2/PathPoint_.hpp
Normal file
508
unitree_SDK/include/unitree/idl/go2/PathPoint_.hpp
Normal file
@@ -0,0 +1,508 @@
|
||||
/****************************************************************
|
||||
|
||||
Generated by Eclipse Cyclone DDS IDL to CXX Translator
|
||||
File name: PathPoint_.idl
|
||||
Source: PathPoint_.hpp
|
||||
Cyclone DDS: v0.10.2
|
||||
|
||||
*****************************************************************/
|
||||
#ifndef DDSCXX_UNITREE_IDL_GO2_PATHPOINT__HPP
|
||||
#define DDSCXX_UNITREE_IDL_GO2_PATHPOINT__HPP
|
||||
|
||||
|
||||
namespace unitree_go
|
||||
{
|
||||
namespace msg
|
||||
{
|
||||
namespace dds_
|
||||
{
|
||||
class PathPoint_
|
||||
{
|
||||
private:
|
||||
float t_from_start_ = 0.0f;
|
||||
float x_ = 0.0f;
|
||||
float y_ = 0.0f;
|
||||
float yaw_ = 0.0f;
|
||||
float vx_ = 0.0f;
|
||||
float vy_ = 0.0f;
|
||||
float vyaw_ = 0.0f;
|
||||
|
||||
public:
|
||||
PathPoint_() = default;
|
||||
|
||||
explicit PathPoint_(
|
||||
float t_from_start,
|
||||
float x,
|
||||
float y,
|
||||
float yaw,
|
||||
float vx,
|
||||
float vy,
|
||||
float vyaw) :
|
||||
t_from_start_(t_from_start),
|
||||
x_(x),
|
||||
y_(y),
|
||||
yaw_(yaw),
|
||||
vx_(vx),
|
||||
vy_(vy),
|
||||
vyaw_(vyaw) { }
|
||||
|
||||
float t_from_start() const { return this->t_from_start_; }
|
||||
float& t_from_start() { return this->t_from_start_; }
|
||||
void t_from_start(float _val_) { this->t_from_start_ = _val_; }
|
||||
float x() const { return this->x_; }
|
||||
float& x() { return this->x_; }
|
||||
void x(float _val_) { this->x_ = _val_; }
|
||||
float y() const { return this->y_; }
|
||||
float& y() { return this->y_; }
|
||||
void y(float _val_) { this->y_ = _val_; }
|
||||
float yaw() const { return this->yaw_; }
|
||||
float& yaw() { return this->yaw_; }
|
||||
void yaw(float _val_) { this->yaw_ = _val_; }
|
||||
float vx() const { return this->vx_; }
|
||||
float& vx() { return this->vx_; }
|
||||
void vx(float _val_) { this->vx_ = _val_; }
|
||||
float vy() const { return this->vy_; }
|
||||
float& vy() { return this->vy_; }
|
||||
void vy(float _val_) { this->vy_ = _val_; }
|
||||
float vyaw() const { return this->vyaw_; }
|
||||
float& vyaw() { return this->vyaw_; }
|
||||
void vyaw(float _val_) { this->vyaw_ = _val_; }
|
||||
|
||||
bool operator==(const PathPoint_& _other) const
|
||||
{
|
||||
(void) _other;
|
||||
return t_from_start_ == _other.t_from_start_ &&
|
||||
x_ == _other.x_ &&
|
||||
y_ == _other.y_ &&
|
||||
yaw_ == _other.yaw_ &&
|
||||
vx_ == _other.vx_ &&
|
||||
vy_ == _other.vy_ &&
|
||||
vyaw_ == _other.vyaw_;
|
||||
}
|
||||
|
||||
bool operator!=(const PathPoint_& _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<::unitree_go::msg::dds_::PathPoint_>::getTypeName()
|
||||
{
|
||||
return "unitree_go::msg::dds_::PathPoint_";
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::PathPoint_>::isKeyless()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::PathPoint_>::type_map_blob_sz() { return 454; }
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::PathPoint_>::type_info_blob_sz() { return 100; }
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::PathPoint_>::type_map_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0x9b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x6d, 0x6e, 0x83, 0x23, 0xe9, 0x1a, 0xd4,
|
||||
0x2a, 0x82, 0x33, 0xae, 0xf6, 0xbd, 0xe2, 0x00, 0x83, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xe9, 0x6c, 0x41, 0xab, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x9d, 0xd4, 0xe4, 0x61, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x41, 0x52, 0x90, 0x76, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x92, 0xdd, 0xa6, 0x44, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x76, 0x7f, 0xc7, 0x3d, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x94, 0x95, 0xfa, 0x6c, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x83, 0x29, 0x00, 0xa3, 0x00,
|
||||
0xfb, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xd6, 0x62, 0x9a, 0x35, 0x54, 0x6d, 0x9f,
|
||||
0xc9, 0xae, 0x65, 0xcf, 0xa2, 0xd4, 0x15, 0x00, 0xe3, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00,
|
||||
0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74,
|
||||
0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73,
|
||||
0x5f, 0x3a, 0x3a, 0x50, 0x61, 0x74, 0x68, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x00, 0x00, 0x00,
|
||||
0xab, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x74, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x73,
|
||||
0x74, 0x61, 0x72, 0x74, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00,
|
||||
0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x79, 0x61, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x76, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x11, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x76, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x00, 0x05, 0x00, 0x00, 0x00, 0x76, 0x79, 0x61, 0x77, 0x00, 0x00, 0x00, 0x00,
|
||||
0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xd6, 0x62, 0x9a, 0x35, 0x54, 0x6d, 0x9f,
|
||||
0xc9, 0xae, 0x65, 0xcf, 0xa2, 0xd4, 0x15, 0xf1, 0x6d, 0x6e, 0x83, 0x23, 0xe9, 0x1a, 0xd4, 0x2a,
|
||||
0x82, 0x33, 0xae, 0xf6, 0xbd, 0xe2, };
|
||||
return blob;
|
||||
}
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::PathPoint_>::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, 0x6d, 0x6e, 0x83, 0x23, 0xe9, 0x1a, 0xd4, 0x2a, 0x82, 0x33, 0xae,
|
||||
0xf6, 0xbd, 0xe2, 0x00, 0x87, 0x00, 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, 0xd6, 0x62, 0x9a, 0x35, 0x54, 0x6d, 0x9f, 0xc9, 0xae, 0x65, 0xcf,
|
||||
0xa2, 0xd4, 0x15, 0x00, 0xe7, 0x00, 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<::unitree_go::msg::dds_::PathPoint_>
|
||||
{
|
||||
static std::string value()
|
||||
{
|
||||
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::PathPoint_>::getTypeName();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::PathPoint_)
|
||||
|
||||
namespace org{
|
||||
namespace eclipse{
|
||||
namespace cyclonedds{
|
||||
namespace core{
|
||||
namespace cdr{
|
||||
|
||||
template<>
|
||||
propvec &get_type_props<::unitree_go::msg::dds_::PathPoint_>();
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
|
||||
bool write(T& streamer, const ::unitree_go::msg::dds_::PathPoint_& 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 (!write(streamer, instance.t_from_start()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.x()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.y()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.yaw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.vx()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 5:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.vy()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 6:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.vyaw()))
|
||||
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 ::unitree_go::msg::dds_::PathPoint_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::PathPoint_>();
|
||||
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, ::unitree_go::msg::dds_::PathPoint_& 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 (!read(streamer, instance.t_from_start()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.x()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.y()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.yaw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.vx()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 5:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.vy()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 6:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.vyaw()))
|
||||
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, ::unitree_go::msg::dds_::PathPoint_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::PathPoint_>();
|
||||
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 ::unitree_go::msg::dds_::PathPoint_& 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 (!move(streamer, instance.t_from_start()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.x()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.y()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.yaw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.vx()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 5:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.vy()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 6:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.vyaw()))
|
||||
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 ::unitree_go::msg::dds_::PathPoint_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::PathPoint_>();
|
||||
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 ::unitree_go::msg::dds_::PathPoint_& 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 (!max(streamer, instance.t_from_start()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.x()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.y()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.yaw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.vx()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 5:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.vy()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 6:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.vyaw()))
|
||||
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 ::unitree_go::msg::dds_::PathPoint_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::PathPoint_>();
|
||||
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_UNITREE_IDL_GO2_PATHPOINT__HPP
|
||||
308
unitree_SDK/include/unitree/idl/go2/Req_.hpp
Normal file
308
unitree_SDK/include/unitree/idl/go2/Req_.hpp
Normal file
@@ -0,0 +1,308 @@
|
||||
/****************************************************************
|
||||
|
||||
Generated by Eclipse Cyclone DDS IDL to CXX Translator
|
||||
File name: Req_.idl
|
||||
Source: Req_.hpp
|
||||
Cyclone DDS: v0.10.2
|
||||
|
||||
*****************************************************************/
|
||||
#ifndef DDSCXX_UNITREE_IDL_GO2_REQ__HPP
|
||||
#define DDSCXX_UNITREE_IDL_GO2_REQ__HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace unitree_go
|
||||
{
|
||||
namespace msg
|
||||
{
|
||||
namespace dds_
|
||||
{
|
||||
class Req_
|
||||
{
|
||||
private:
|
||||
std::string uuid_;
|
||||
std::string body_;
|
||||
|
||||
public:
|
||||
Req_() = default;
|
||||
|
||||
explicit Req_(
|
||||
const std::string& uuid,
|
||||
const std::string& body) :
|
||||
uuid_(uuid),
|
||||
body_(body) { }
|
||||
|
||||
const std::string& uuid() const { return this->uuid_; }
|
||||
std::string& uuid() { return this->uuid_; }
|
||||
void uuid(const std::string& _val_) { this->uuid_ = _val_; }
|
||||
void uuid(std::string&& _val_) { this->uuid_ = _val_; }
|
||||
const std::string& body() const { return this->body_; }
|
||||
std::string& body() { return this->body_; }
|
||||
void body(const std::string& _val_) { this->body_ = _val_; }
|
||||
void body(std::string&& _val_) { this->body_ = _val_; }
|
||||
|
||||
bool operator==(const Req_& _other) const
|
||||
{
|
||||
(void) _other;
|
||||
return uuid_ == _other.uuid_ &&
|
||||
body_ == _other.body_;
|
||||
}
|
||||
|
||||
bool operator!=(const Req_& _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<::unitree_go::msg::dds_::Req_>::getTypeName()
|
||||
{
|
||||
return "unitree_go::msg::dds_::Req_";
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::Req_>::isSelfContained()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::Req_>::isKeyless()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::Req_>::type_map_blob_sz() { return 246; }
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::Req_>::type_info_blob_sz() { return 100; }
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::Req_>::type_map_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0x4c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x65, 0xcc, 0xb2, 0xec, 0x1b, 0x91, 0xab,
|
||||
0x31, 0x5f, 0x50, 0x70, 0x86, 0x74, 0x52, 0x00, 0x34, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0xef, 0x7c, 0x87, 0x6f,
|
||||
0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x84, 0x1a, 0x2d, 0x68,
|
||||
0x7b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x03, 0x02, 0x36, 0x18, 0x03, 0xef, 0x61,
|
||||
0x1d, 0xd6, 0x73, 0x0b, 0x4b, 0x4d, 0x57, 0x00, 0x63, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00,
|
||||
0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74,
|
||||
0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73,
|
||||
0x5f, 0x3a, 0x3a, 0x52, 0x65, 0x71, 0x5f, 0x00, 0x33, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x05, 0x00, 0x00, 0x00,
|
||||
0x75, 0x75, 0x69, 0x64, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x70, 0x00, 0x05, 0x00, 0x00, 0x00, 0x62, 0x6f, 0x64, 0x79, 0x00, 0x00, 0x00, 0x00,
|
||||
0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x03, 0x02, 0x36, 0x18, 0x03, 0xef, 0x61,
|
||||
0x1d, 0xd6, 0x73, 0x0b, 0x4b, 0x4d, 0x57, 0xf1, 0x65, 0xcc, 0xb2, 0xec, 0x1b, 0x91, 0xab, 0x31,
|
||||
0x5f, 0x50, 0x70, 0x86, 0x74, 0x52, };
|
||||
return blob;
|
||||
}
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::Req_>::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, 0x65, 0xcc, 0xb2, 0xec, 0x1b, 0x91, 0xab, 0x31, 0x5f, 0x50, 0x70,
|
||||
0x86, 0x74, 0x52, 0x00, 0x38, 0x00, 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, 0x03, 0x02, 0x36, 0x18, 0x03, 0xef, 0x61, 0x1d, 0xd6, 0x73, 0x0b,
|
||||
0x4b, 0x4d, 0x57, 0x00, 0x67, 0x00, 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<::unitree_go::msg::dds_::Req_>
|
||||
{
|
||||
static std::string value()
|
||||
{
|
||||
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::Req_>::getTypeName();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::Req_)
|
||||
|
||||
namespace org{
|
||||
namespace eclipse{
|
||||
namespace cyclonedds{
|
||||
namespace core{
|
||||
namespace cdr{
|
||||
|
||||
template<>
|
||||
propvec &get_type_props<::unitree_go::msg::dds_::Req_>();
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
|
||||
bool write(T& streamer, const ::unitree_go::msg::dds_::Req_& 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 (!write_string(streamer, instance.uuid(), 0))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write_string(streamer, instance.body(), 0))
|
||||
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 ::unitree_go::msg::dds_::Req_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::Req_>();
|
||||
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, ::unitree_go::msg::dds_::Req_& 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 (!read_string(streamer, instance.uuid(), 0))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read_string(streamer, instance.body(), 0))
|
||||
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, ::unitree_go::msg::dds_::Req_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::Req_>();
|
||||
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 ::unitree_go::msg::dds_::Req_& 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 (!move_string(streamer, instance.uuid(), 0))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move_string(streamer, instance.body(), 0))
|
||||
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 ::unitree_go::msg::dds_::Req_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::Req_>();
|
||||
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 ::unitree_go::msg::dds_::Req_& 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 (!max_string(streamer, instance.uuid(), 0))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max_string(streamer, instance.body(), 0))
|
||||
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 ::unitree_go::msg::dds_::Req_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::Req_>();
|
||||
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_UNITREE_IDL_GO2_REQ__HPP
|
||||
395
unitree_SDK/include/unitree/idl/go2/Res_.hpp
Normal file
395
unitree_SDK/include/unitree/idl/go2/Res_.hpp
Normal file
@@ -0,0 +1,395 @@
|
||||
/****************************************************************
|
||||
|
||||
Generated by Eclipse Cyclone DDS IDL to CXX Translator
|
||||
File name: Res_.idl
|
||||
Source: Res_.hpp
|
||||
Cyclone DDS: v0.10.2
|
||||
|
||||
*****************************************************************/
|
||||
#ifndef DDSCXX_UNITREE_IDL_GO2_RES__HPP
|
||||
#define DDSCXX_UNITREE_IDL_GO2_RES__HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
namespace unitree_go
|
||||
{
|
||||
namespace msg
|
||||
{
|
||||
namespace dds_
|
||||
{
|
||||
class Res_
|
||||
{
|
||||
private:
|
||||
std::string uuid_;
|
||||
std::vector<uint8_t> data_;
|
||||
std::string body_;
|
||||
|
||||
public:
|
||||
Res_() = default;
|
||||
|
||||
explicit Res_(
|
||||
const std::string& uuid,
|
||||
const std::vector<uint8_t>& data,
|
||||
const std::string& body) :
|
||||
uuid_(uuid),
|
||||
data_(data),
|
||||
body_(body) { }
|
||||
|
||||
const std::string& uuid() const { return this->uuid_; }
|
||||
std::string& uuid() { return this->uuid_; }
|
||||
void uuid(const std::string& _val_) { this->uuid_ = _val_; }
|
||||
void uuid(std::string&& _val_) { this->uuid_ = _val_; }
|
||||
const std::vector<uint8_t>& data() const { return this->data_; }
|
||||
std::vector<uint8_t>& data() { return this->data_; }
|
||||
void data(const std::vector<uint8_t>& _val_) { this->data_ = _val_; }
|
||||
void data(std::vector<uint8_t>&& _val_) { this->data_ = _val_; }
|
||||
const std::string& body() const { return this->body_; }
|
||||
std::string& body() { return this->body_; }
|
||||
void body(const std::string& _val_) { this->body_ = _val_; }
|
||||
void body(std::string&& _val_) { this->body_ = _val_; }
|
||||
|
||||
bool operator==(const Res_& _other) const
|
||||
{
|
||||
(void) _other;
|
||||
return uuid_ == _other.uuid_ &&
|
||||
data_ == _other.data_ &&
|
||||
body_ == _other.body_;
|
||||
}
|
||||
|
||||
bool operator!=(const Res_& _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<::unitree_go::msg::dds_::Res_>::getTypeName()
|
||||
{
|
||||
return "unitree_go::msg::dds_::Res_";
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::Res_>::isSelfContained()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::Res_>::isKeyless()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::Res_>::type_map_blob_sz() { return 294; }
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::Res_>::type_info_blob_sz() { return 100; }
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::Res_>::type_map_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0x60, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x69, 0xfa, 0xd9, 0x7e, 0x47, 0x4e, 0xa0,
|
||||
0x13, 0x2b, 0xc3, 0x64, 0xa3, 0xd8, 0xca, 0x00, 0x48, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0xef, 0x7c, 0x87, 0x6f,
|
||||
0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02,
|
||||
0x8d, 0x77, 0x7f, 0x38, 0x0c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00,
|
||||
0x84, 0x1a, 0x2d, 0x68, 0x97, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xd1, 0x28, 0xe7,
|
||||
0x14, 0xf2, 0x86, 0x5c, 0xb5, 0xdb, 0x4d, 0x4f, 0x9b, 0x8d, 0x01, 0x00, 0x7f, 0x00, 0x00, 0x00,
|
||||
0xf2, 0x51, 0x01, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
|
||||
0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a,
|
||||
0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x52, 0x65, 0x73, 0x5f, 0x00, 0x4f, 0x00, 0x00, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00,
|
||||
0x05, 0x00, 0x00, 0x00, 0x75, 0x75, 0x69, 0x64, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x00,
|
||||
0x64, 0x61, 0x74, 0x61, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x70, 0x00, 0x05, 0x00, 0x00, 0x00, 0x62, 0x6f, 0x64, 0x79, 0x00, 0x00, 0x00, 0x00,
|
||||
0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xd1, 0x28, 0xe7, 0x14, 0xf2, 0x86, 0x5c,
|
||||
0xb5, 0xdb, 0x4d, 0x4f, 0x9b, 0x8d, 0x01, 0xf1, 0x69, 0xfa, 0xd9, 0x7e, 0x47, 0x4e, 0xa0, 0x13,
|
||||
0x2b, 0xc3, 0x64, 0xa3, 0xd8, 0xca, };
|
||||
return blob;
|
||||
}
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::Res_>::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, 0x69, 0xfa, 0xd9, 0x7e, 0x47, 0x4e, 0xa0, 0x13, 0x2b, 0xc3, 0x64,
|
||||
0xa3, 0xd8, 0xca, 0x00, 0x4c, 0x00, 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, 0xd1, 0x28, 0xe7, 0x14, 0xf2, 0x86, 0x5c, 0xb5, 0xdb, 0x4d, 0x4f,
|
||||
0x9b, 0x8d, 0x01, 0x00, 0x83, 0x00, 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<::unitree_go::msg::dds_::Res_>
|
||||
{
|
||||
static std::string value()
|
||||
{
|
||||
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::Res_>::getTypeName();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::Res_)
|
||||
|
||||
namespace org{
|
||||
namespace eclipse{
|
||||
namespace cyclonedds{
|
||||
namespace core{
|
||||
namespace cdr{
|
||||
|
||||
template<>
|
||||
propvec &get_type_props<::unitree_go::msg::dds_::Res_>();
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
|
||||
bool write(T& streamer, const ::unitree_go::msg::dds_::Res_& 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 (!write_string(streamer, instance.uuid(), 0))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.data().size());
|
||||
if (!write(streamer, se_1))
|
||||
return false;
|
||||
if (se_1 > 0 &&
|
||||
!write(streamer, instance.data()[0], se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write_string(streamer, instance.body(), 0))
|
||||
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 ::unitree_go::msg::dds_::Res_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::Res_>();
|
||||
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, ::unitree_go::msg::dds_::Res_& 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 (!read_string(streamer, instance.uuid(), 0))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.data().size());
|
||||
if (!read(streamer, se_1))
|
||||
return false;
|
||||
instance.data().resize(se_1);
|
||||
if (se_1 > 0 &&
|
||||
!read(streamer, instance.data()[0], se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read_string(streamer, instance.body(), 0))
|
||||
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, ::unitree_go::msg::dds_::Res_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::Res_>();
|
||||
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 ::unitree_go::msg::dds_::Res_& 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 (!move_string(streamer, instance.uuid(), 0))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.data().size());
|
||||
if (!move(streamer, se_1))
|
||||
return false;
|
||||
if (se_1 > 0 &&
|
||||
!move(streamer, uint8_t(), se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move_string(streamer, instance.body(), 0))
|
||||
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 ::unitree_go::msg::dds_::Res_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::Res_>();
|
||||
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 ::unitree_go::msg::dds_::Res_& 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 (!max_string(streamer, instance.uuid(), 0))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = 0;
|
||||
if (!max(streamer, se_1))
|
||||
return false;
|
||||
if (se_1 > 0 &&
|
||||
!max(streamer, uint8_t(), se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
streamer.position(SIZE_MAX);
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max_string(streamer, instance.body(), 0))
|
||||
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 ::unitree_go::msg::dds_::Res_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::Res_>();
|
||||
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_UNITREE_IDL_GO2_RES__HPP
|
||||
819
unitree_SDK/include/unitree/idl/go2/SportModeCmd_.hpp
Normal file
819
unitree_SDK/include/unitree/idl/go2/SportModeCmd_.hpp
Normal file
@@ -0,0 +1,819 @@
|
||||
/****************************************************************
|
||||
|
||||
Generated by Eclipse Cyclone DDS IDL to CXX Translator
|
||||
File name: SportModeCmd_.idl
|
||||
Source: SportModeCmd_.hpp
|
||||
Cyclone DDS: v0.10.2
|
||||
|
||||
*****************************************************************/
|
||||
#ifndef DDSCXX_UNITREE_IDL_GO2_SPORTMODECMD__HPP
|
||||
#define DDSCXX_UNITREE_IDL_GO2_SPORTMODECMD__HPP
|
||||
|
||||
#include "unitree/idl/go2/BmsCmd_.hpp"
|
||||
|
||||
#include "unitree/idl/go2/PathPoint_.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <array>
|
||||
|
||||
namespace unitree_go
|
||||
{
|
||||
namespace msg
|
||||
{
|
||||
namespace dds_
|
||||
{
|
||||
class SportModeCmd_
|
||||
{
|
||||
private:
|
||||
uint8_t mode_ = 0;
|
||||
uint8_t gait_type_ = 0;
|
||||
uint8_t speed_level_ = 0;
|
||||
float foot_raise_height_ = 0.0f;
|
||||
float body_height_ = 0.0f;
|
||||
std::array<float, 2> position_ = { };
|
||||
std::array<float, 3> euler_ = { };
|
||||
std::array<float, 2> velocity_ = { };
|
||||
float yaw_speed_ = 0.0f;
|
||||
::unitree_go::msg::dds_::BmsCmd_ bms_cmd_;
|
||||
std::array<::unitree_go::msg::dds_::PathPoint_, 30> path_point_ = { };
|
||||
|
||||
public:
|
||||
SportModeCmd_() = default;
|
||||
|
||||
explicit SportModeCmd_(
|
||||
uint8_t mode,
|
||||
uint8_t gait_type,
|
||||
uint8_t speed_level,
|
||||
float foot_raise_height,
|
||||
float body_height,
|
||||
const std::array<float, 2>& position,
|
||||
const std::array<float, 3>& euler,
|
||||
const std::array<float, 2>& velocity,
|
||||
float yaw_speed,
|
||||
const ::unitree_go::msg::dds_::BmsCmd_& bms_cmd,
|
||||
const std::array<::unitree_go::msg::dds_::PathPoint_, 30>& path_point) :
|
||||
mode_(mode),
|
||||
gait_type_(gait_type),
|
||||
speed_level_(speed_level),
|
||||
foot_raise_height_(foot_raise_height),
|
||||
body_height_(body_height),
|
||||
position_(position),
|
||||
euler_(euler),
|
||||
velocity_(velocity),
|
||||
yaw_speed_(yaw_speed),
|
||||
bms_cmd_(bms_cmd),
|
||||
path_point_(path_point) { }
|
||||
|
||||
uint8_t mode() const { return this->mode_; }
|
||||
uint8_t& mode() { return this->mode_; }
|
||||
void mode(uint8_t _val_) { this->mode_ = _val_; }
|
||||
uint8_t gait_type() const { return this->gait_type_; }
|
||||
uint8_t& gait_type() { return this->gait_type_; }
|
||||
void gait_type(uint8_t _val_) { this->gait_type_ = _val_; }
|
||||
uint8_t speed_level() const { return this->speed_level_; }
|
||||
uint8_t& speed_level() { return this->speed_level_; }
|
||||
void speed_level(uint8_t _val_) { this->speed_level_ = _val_; }
|
||||
float foot_raise_height() const { return this->foot_raise_height_; }
|
||||
float& foot_raise_height() { return this->foot_raise_height_; }
|
||||
void foot_raise_height(float _val_) { this->foot_raise_height_ = _val_; }
|
||||
float body_height() const { return this->body_height_; }
|
||||
float& body_height() { return this->body_height_; }
|
||||
void body_height(float _val_) { this->body_height_ = _val_; }
|
||||
const std::array<float, 2>& position() const { return this->position_; }
|
||||
std::array<float, 2>& position() { return this->position_; }
|
||||
void position(const std::array<float, 2>& _val_) { this->position_ = _val_; }
|
||||
void position(std::array<float, 2>&& _val_) { this->position_ = _val_; }
|
||||
const std::array<float, 3>& euler() const { return this->euler_; }
|
||||
std::array<float, 3>& euler() { return this->euler_; }
|
||||
void euler(const std::array<float, 3>& _val_) { this->euler_ = _val_; }
|
||||
void euler(std::array<float, 3>&& _val_) { this->euler_ = _val_; }
|
||||
const std::array<float, 2>& velocity() const { return this->velocity_; }
|
||||
std::array<float, 2>& velocity() { return this->velocity_; }
|
||||
void velocity(const std::array<float, 2>& _val_) { this->velocity_ = _val_; }
|
||||
void velocity(std::array<float, 2>&& _val_) { this->velocity_ = _val_; }
|
||||
float yaw_speed() const { return this->yaw_speed_; }
|
||||
float& yaw_speed() { return this->yaw_speed_; }
|
||||
void yaw_speed(float _val_) { this->yaw_speed_ = _val_; }
|
||||
const ::unitree_go::msg::dds_::BmsCmd_& bms_cmd() const { return this->bms_cmd_; }
|
||||
::unitree_go::msg::dds_::BmsCmd_& bms_cmd() { return this->bms_cmd_; }
|
||||
void bms_cmd(const ::unitree_go::msg::dds_::BmsCmd_& _val_) { this->bms_cmd_ = _val_; }
|
||||
void bms_cmd(::unitree_go::msg::dds_::BmsCmd_&& _val_) { this->bms_cmd_ = _val_; }
|
||||
const std::array<::unitree_go::msg::dds_::PathPoint_, 30>& path_point() const { return this->path_point_; }
|
||||
std::array<::unitree_go::msg::dds_::PathPoint_, 30>& path_point() { return this->path_point_; }
|
||||
void path_point(const std::array<::unitree_go::msg::dds_::PathPoint_, 30>& _val_) { this->path_point_ = _val_; }
|
||||
void path_point(std::array<::unitree_go::msg::dds_::PathPoint_, 30>&& _val_) { this->path_point_ = _val_; }
|
||||
|
||||
bool operator==(const SportModeCmd_& _other) const
|
||||
{
|
||||
(void) _other;
|
||||
return mode_ == _other.mode_ &&
|
||||
gait_type_ == _other.gait_type_ &&
|
||||
speed_level_ == _other.speed_level_ &&
|
||||
foot_raise_height_ == _other.foot_raise_height_ &&
|
||||
body_height_ == _other.body_height_ &&
|
||||
position_ == _other.position_ &&
|
||||
euler_ == _other.euler_ &&
|
||||
velocity_ == _other.velocity_ &&
|
||||
yaw_speed_ == _other.yaw_speed_ &&
|
||||
bms_cmd_ == _other.bms_cmd_ &&
|
||||
path_point_ == _other.path_point_;
|
||||
}
|
||||
|
||||
bool operator!=(const SportModeCmd_& _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<::unitree_go::msg::dds_::SportModeCmd_>::getTypeName()
|
||||
{
|
||||
return "unitree_go::msg::dds_::SportModeCmd_";
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::SportModeCmd_>::isKeyless()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::SportModeCmd_>::type_map_blob_sz() { return 1506; }
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::SportModeCmd_>::type_info_blob_sz() { return 196; }
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::SportModeCmd_>::type_map_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0x13, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf1, 0x4b, 0xbc, 0x00, 0xba, 0x9a, 0x8c, 0x2d,
|
||||
0x02, 0x68, 0x52, 0x1d, 0xd0, 0xd4, 0xb6, 0x00, 0x10, 0x01, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x15, 0xd6, 0x17, 0x12, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xe2, 0xc7, 0x6d, 0x1e, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x3b, 0xbb, 0xc1, 0x77, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xb5, 0x46, 0x7f, 0xa0, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xe0, 0x34, 0x4c, 0x32, 0x00,
|
||||
0x16, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x02, 0x09, 0x47, 0x57, 0xfe, 0x07, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00,
|
||||
0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x03, 0x09, 0xbc, 0x64, 0x6b, 0xe3, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x09, 0xac, 0x1a,
|
||||
0x45, 0x3d, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x25,
|
||||
0xcf, 0xab, 0x66, 0x00, 0x19, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf1, 0x3e,
|
||||
0x8e, 0xb6, 0x7c, 0x25, 0xfd, 0xe0, 0x7e, 0x52, 0xcf, 0x51, 0xed, 0x4a, 0x23, 0x11, 0x50, 0x97,
|
||||
0xc7, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf1,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1e, 0xf1, 0x6d, 0x6e, 0x83, 0x23, 0xe9, 0x1a,
|
||||
0xd4, 0x2a, 0x82, 0x33, 0xae, 0xf6, 0xbd, 0xe2, 0xdc, 0x56, 0xb6, 0x0a, 0xf1, 0x3e, 0x8e, 0xb6,
|
||||
0x7c, 0x25, 0xfd, 0xe0, 0x7e, 0x52, 0xcf, 0x51, 0xed, 0x4a, 0x23, 0x00, 0x3e, 0x00, 0x00, 0x00,
|
||||
0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x32,
|
||||
0x62, 0xd4, 0x8d, 0x00, 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x02, 0x9c, 0x3b, 0x62, 0x94, 0xf1, 0x6d,
|
||||
0x6e, 0x83, 0x23, 0xe9, 0x1a, 0xd4, 0x2a, 0x82, 0x33, 0xae, 0xf6, 0xbd, 0xe2, 0x00, 0x00, 0x00,
|
||||
0x83, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x73, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0xe9, 0x6c, 0x41, 0xab, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x9d, 0xd4, 0xe4, 0x61, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x41, 0x52, 0x90, 0x76, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x92, 0xdd, 0xa6, 0x44, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x76, 0x7f, 0xc7, 0x3d, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x94, 0x95, 0xfa, 0x6c, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x83, 0x29, 0x00, 0xa3, 0x00, 0x63, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0xf2, 0xbb, 0xbb, 0x27, 0xfd, 0xc5, 0x19, 0x66, 0x1a, 0x6a, 0xcc, 0x38, 0x22, 0x2e, 0x2f, 0x00,
|
||||
0xc9, 0x01, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x25, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a,
|
||||
0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x53, 0x70, 0x6f, 0x72, 0x74,
|
||||
0x4d, 0x6f, 0x64, 0x65, 0x43, 0x6d, 0x64, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x8d, 0x01, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00,
|
||||
0x05, 0x00, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x67, 0x61, 0x69, 0x74,
|
||||
0x5f, 0x74, 0x79, 0x70, 0x65, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, 0x6c, 0x65,
|
||||
0x76, 0x65, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x00, 0x12, 0x00, 0x00, 0x00, 0x66, 0x6f, 0x6f, 0x74, 0x5f, 0x72, 0x61, 0x69,
|
||||
0x73, 0x65, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x62, 0x6f, 0x64, 0x79,
|
||||
0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00,
|
||||
0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x02, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
|
||||
0x65, 0x75, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x09, 0x00, 0x00,
|
||||
0x09, 0x00, 0x00, 0x00, 0x76, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x74, 0x79, 0x00, 0x00, 0x00, 0x00,
|
||||
0x18, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x0a, 0x00, 0x00, 0x00,
|
||||
0x79, 0x61, 0x77, 0x5f, 0x73, 0x70, 0x65, 0x65, 0x64, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00,
|
||||
0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0xf2, 0x31, 0xa8, 0x59, 0x24, 0x05, 0x6b, 0x7a, 0xf3, 0xd3,
|
||||
0xf1, 0x6b, 0x34, 0x22, 0x33, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x62, 0x6d, 0x73, 0x5f,
|
||||
0x63, 0x6d, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x90, 0xf2, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1e, 0xf2, 0xd6, 0x62,
|
||||
0x9a, 0x35, 0x54, 0x6d, 0x9f, 0xc9, 0xae, 0x65, 0xcf, 0xa2, 0xd4, 0x15, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x70, 0x61, 0x74, 0x68, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x00, 0x00, 0x00, 0xf2, 0x31, 0xa8,
|
||||
0x59, 0x24, 0x05, 0x6b, 0x7a, 0xf3, 0xd3, 0xf1, 0x6b, 0x34, 0x22, 0x33, 0x76, 0x00, 0x00, 0x00,
|
||||
0xf2, 0x51, 0x01, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
|
||||
0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a,
|
||||
0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x42, 0x6d, 0x73, 0x43, 0x6d, 0x64, 0x5f, 0x00, 0x00,
|
||||
0x42, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6f, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x03, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x65,
|
||||
0x72, 0x76, 0x65, 0x00, 0x00, 0x00, 0xf2, 0xd6, 0x62, 0x9a, 0x35, 0x54, 0x6d, 0x9f, 0xc9, 0xae,
|
||||
0x65, 0xcf, 0xa2, 0xd4, 0x15, 0x00, 0x00, 0x00, 0xe3, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00,
|
||||
0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74,
|
||||
0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73,
|
||||
0x5f, 0x3a, 0x3a, 0x50, 0x61, 0x74, 0x68, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x00, 0x00, 0x00,
|
||||
0xab, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x74, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x73,
|
||||
0x74, 0x61, 0x72, 0x74, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00,
|
||||
0x12, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x79, 0x61, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x76, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x11, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x76, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x00, 0x05, 0x00, 0x00, 0x00, 0x76, 0x79, 0x61, 0x77, 0x00, 0x00, 0x00, 0x00,
|
||||
0x5e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf2, 0xbb, 0xbb, 0x27, 0xfd, 0xc5, 0x19, 0x66,
|
||||
0x1a, 0x6a, 0xcc, 0x38, 0x22, 0x2e, 0x2f, 0xf1, 0x4b, 0xbc, 0x00, 0xba, 0x9a, 0x8c, 0x2d, 0x02,
|
||||
0x68, 0x52, 0x1d, 0xd0, 0xd4, 0xb6, 0xf2, 0x31, 0xa8, 0x59, 0x24, 0x05, 0x6b, 0x7a, 0xf3, 0xd3,
|
||||
0xf1, 0x6b, 0x34, 0x22, 0x33, 0xf1, 0x3e, 0x8e, 0xb6, 0x7c, 0x25, 0xfd, 0xe0, 0x7e, 0x52, 0xcf,
|
||||
0x51, 0xed, 0x4a, 0x23, 0xf2, 0xd6, 0x62, 0x9a, 0x35, 0x54, 0x6d, 0x9f, 0xc9, 0xae, 0x65, 0xcf,
|
||||
0xa2, 0xd4, 0x15, 0xf1, 0x6d, 0x6e, 0x83, 0x23, 0xe9, 0x1a, 0xd4, 0x2a, 0x82, 0x33, 0xae, 0xf6,
|
||||
0xbd, 0xe2, };
|
||||
return blob;
|
||||
}
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::SportModeCmd_>::type_info_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0xc0, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x58, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00,
|
||||
0x14, 0x00, 0x00, 0x00, 0xf1, 0x4b, 0xbc, 0x00, 0xba, 0x9a, 0x8c, 0x2d, 0x02, 0x68, 0x52, 0x1d,
|
||||
0xd0, 0xd4, 0xb6, 0x00, 0x14, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf1, 0x3e, 0x8e, 0xb6, 0x7c, 0x25, 0xfd, 0xe0,
|
||||
0x7e, 0x52, 0xcf, 0x51, 0xed, 0x4a, 0x23, 0x00, 0x42, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||
0xf1, 0x6d, 0x6e, 0x83, 0x23, 0xe9, 0x1a, 0xd4, 0x2a, 0x82, 0x33, 0xae, 0xf6, 0xbd, 0xe2, 0x00,
|
||||
0x87, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x58, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00,
|
||||
0x14, 0x00, 0x00, 0x00, 0xf2, 0xbb, 0xbb, 0x27, 0xfd, 0xc5, 0x19, 0x66, 0x1a, 0x6a, 0xcc, 0x38,
|
||||
0x22, 0x2e, 0x2f, 0x00, 0xcd, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xf2, 0x31, 0xa8, 0x59, 0x24, 0x05, 0x6b, 0x7a,
|
||||
0xf3, 0xd3, 0xf1, 0x6b, 0x34, 0x22, 0x33, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||
0xf2, 0xd6, 0x62, 0x9a, 0x35, 0x54, 0x6d, 0x9f, 0xc9, 0xae, 0x65, 0xcf, 0xa2, 0xd4, 0x15, 0x00,
|
||||
0xe7, 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<::unitree_go::msg::dds_::SportModeCmd_>
|
||||
{
|
||||
static std::string value()
|
||||
{
|
||||
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::SportModeCmd_>::getTypeName();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::SportModeCmd_)
|
||||
|
||||
namespace org{
|
||||
namespace eclipse{
|
||||
namespace cyclonedds{
|
||||
namespace core{
|
||||
namespace cdr{
|
||||
|
||||
template<>
|
||||
propvec &get_type_props<::unitree_go::msg::dds_::SportModeCmd_>();
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
|
||||
bool write(T& streamer, const ::unitree_go::msg::dds_::SportModeCmd_& 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 (!write(streamer, instance.mode()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.gait_type()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.speed_level()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.foot_raise_height()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.body_height()))
|
||||
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.position()[0], instance.position().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.euler()[0], instance.euler().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.velocity()[0], instance.velocity().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 (!write(streamer, instance.yaw_speed()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 9:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.bms_cmd(), prop))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 10:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(true, false))
|
||||
return false;
|
||||
for (const auto & a_1:instance.path_point()) { //array depth 1
|
||||
if (!write(streamer, a_1, prop))
|
||||
return false;
|
||||
} //array depth 1
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::SportModeCmd_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::SportModeCmd_>();
|
||||
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, ::unitree_go::msg::dds_::SportModeCmd_& 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 (!read(streamer, instance.mode()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.gait_type()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.speed_level()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.foot_raise_height()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.body_height()))
|
||||
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.position()[0], instance.position().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.euler()[0], instance.euler().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.velocity()[0], instance.velocity().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 (!read(streamer, instance.yaw_speed()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 9:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.bms_cmd(), prop))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 10:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(true, false))
|
||||
return false;
|
||||
for (auto & a_1:instance.path_point()) { //array depth 1
|
||||
if (!read(streamer, a_1, prop))
|
||||
return false;
|
||||
} //array depth 1
|
||||
if (!streamer.finish_consecutive())
|
||||
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, ::unitree_go::msg::dds_::SportModeCmd_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::SportModeCmd_>();
|
||||
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 ::unitree_go::msg::dds_::SportModeCmd_& 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 (!move(streamer, instance.mode()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.gait_type()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.speed_level()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.foot_raise_height()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.body_height()))
|
||||
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.position()[0], instance.position().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.euler()[0], instance.euler().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.velocity()[0], instance.velocity().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 (!move(streamer, instance.yaw_speed()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 9:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.bms_cmd(), prop))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 10:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(true, false))
|
||||
return false;
|
||||
for (const auto & a_1:instance.path_point()) { //array depth 1
|
||||
if (!move(streamer, a_1, prop))
|
||||
return false;
|
||||
} //array depth 1
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::SportModeCmd_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::SportModeCmd_>();
|
||||
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 ::unitree_go::msg::dds_::SportModeCmd_& 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 (!max(streamer, instance.mode()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.gait_type()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.speed_level()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.foot_raise_height()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.body_height()))
|
||||
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.position()[0], instance.position().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.euler()[0], instance.euler().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.velocity()[0], instance.velocity().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 (!max(streamer, instance.yaw_speed()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 9:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.bms_cmd(), prop))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 10:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(true, false))
|
||||
return false;
|
||||
for (const auto & a_1:instance.path_point()) { //array depth 1
|
||||
if (!max(streamer, a_1, prop))
|
||||
return false;
|
||||
} //array depth 1
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::SportModeCmd_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::SportModeCmd_>();
|
||||
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_UNITREE_IDL_GO2_SPORTMODECMD__HPP
|
||||
1121
unitree_SDK/include/unitree/idl/go2/SportModeState_.hpp
Normal file
1121
unitree_SDK/include/unitree/idl/go2/SportModeState_.hpp
Normal file
File diff suppressed because it is too large
Load Diff
302
unitree_SDK/include/unitree/idl/go2/TimeSpec_.hpp
Normal file
302
unitree_SDK/include/unitree/idl/go2/TimeSpec_.hpp
Normal file
@@ -0,0 +1,302 @@
|
||||
/****************************************************************
|
||||
|
||||
Generated by Eclipse Cyclone DDS IDL to CXX Translator
|
||||
File name: TimeSpec_.idl
|
||||
Source: TimeSpec_.hpp
|
||||
Cyclone DDS: v0.10.2
|
||||
|
||||
*****************************************************************/
|
||||
#ifndef DDSCXX_UNITREE_IDL_GO2_TIMESPEC__HPP
|
||||
#define DDSCXX_UNITREE_IDL_GO2_TIMESPEC__HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace unitree_go
|
||||
{
|
||||
namespace msg
|
||||
{
|
||||
namespace dds_
|
||||
{
|
||||
class TimeSpec_
|
||||
{
|
||||
private:
|
||||
int32_t sec_ = 0;
|
||||
uint32_t nanosec_ = 0;
|
||||
|
||||
public:
|
||||
TimeSpec_() = default;
|
||||
|
||||
explicit TimeSpec_(
|
||||
int32_t sec,
|
||||
uint32_t nanosec) :
|
||||
sec_(sec),
|
||||
nanosec_(nanosec) { }
|
||||
|
||||
int32_t sec() const { return this->sec_; }
|
||||
int32_t& sec() { return this->sec_; }
|
||||
void sec(int32_t _val_) { this->sec_ = _val_; }
|
||||
uint32_t nanosec() const { return this->nanosec_; }
|
||||
uint32_t& nanosec() { return this->nanosec_; }
|
||||
void nanosec(uint32_t _val_) { this->nanosec_ = _val_; }
|
||||
|
||||
bool operator==(const TimeSpec_& _other) const
|
||||
{
|
||||
(void) _other;
|
||||
return sec_ == _other.sec_ &&
|
||||
nanosec_ == _other.nanosec_;
|
||||
}
|
||||
|
||||
bool operator!=(const TimeSpec_& _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<::unitree_go::msg::dds_::TimeSpec_>::getTypeName()
|
||||
{
|
||||
return "unitree_go::msg::dds_::TimeSpec_";
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::TimeSpec_>::isKeyless()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::TimeSpec_>::type_map_blob_sz() { return 258; }
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::TimeSpec_>::type_info_blob_sz() { return 100; }
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::TimeSpec_>::type_map_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0x4b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b,
|
||||
0x10, 0x86, 0xa4, 0xba, 0x46, 0xf9, 0x8d, 0x00, 0x33, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x74, 0x45, 0x9c, 0xa3, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0xe2, 0x04, 0x64, 0xd5, 0x00,
|
||||
0x86, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x61, 0x24, 0x29, 0x6f, 0x59, 0x45, 0x9b,
|
||||
0xa9, 0x0b, 0xe9, 0x24, 0xc9, 0x35, 0xcc, 0x00, 0x6e, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00,
|
||||
0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74,
|
||||
0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73,
|
||||
0x5f, 0x3a, 0x3a, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x70, 0x65, 0x63, 0x5f, 0x00, 0x00, 0x00, 0x00,
|
||||
0x36, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||
0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0xf2, 0x61, 0x24, 0x29, 0x6f, 0x59, 0x45, 0x9b, 0xa9, 0x0b, 0xe9, 0x24,
|
||||
0xc9, 0x35, 0xcc, 0xf1, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba, 0x46,
|
||||
0xf9, 0x8d, };
|
||||
return blob;
|
||||
}
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::TimeSpec_>::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, 0x56, 0x7c, 0x5a, 0x93, 0x54, 0x1c, 0x3b, 0x10, 0x86, 0xa4, 0xba,
|
||||
0x46, 0xf9, 0x8d, 0x00, 0x37, 0x00, 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, 0x61, 0x24, 0x29, 0x6f, 0x59, 0x45, 0x9b, 0xa9, 0x0b, 0xe9, 0x24,
|
||||
0xc9, 0x35, 0xcc, 0x00, 0x72, 0x00, 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<::unitree_go::msg::dds_::TimeSpec_>
|
||||
{
|
||||
static std::string value()
|
||||
{
|
||||
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::TimeSpec_>::getTypeName();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::TimeSpec_)
|
||||
|
||||
namespace org{
|
||||
namespace eclipse{
|
||||
namespace cyclonedds{
|
||||
namespace core{
|
||||
namespace cdr{
|
||||
|
||||
template<>
|
||||
propvec &get_type_props<::unitree_go::msg::dds_::TimeSpec_>();
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
|
||||
bool write(T& streamer, const ::unitree_go::msg::dds_::TimeSpec_& 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 (!write(streamer, instance.sec()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.nanosec()))
|
||||
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 ::unitree_go::msg::dds_::TimeSpec_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::TimeSpec_>();
|
||||
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, ::unitree_go::msg::dds_::TimeSpec_& 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 (!read(streamer, instance.sec()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.nanosec()))
|
||||
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, ::unitree_go::msg::dds_::TimeSpec_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::TimeSpec_>();
|
||||
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 ::unitree_go::msg::dds_::TimeSpec_& 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 (!move(streamer, instance.sec()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.nanosec()))
|
||||
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 ::unitree_go::msg::dds_::TimeSpec_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::TimeSpec_>();
|
||||
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 ::unitree_go::msg::dds_::TimeSpec_& 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 (!max(streamer, instance.sec()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.nanosec()))
|
||||
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 ::unitree_go::msg::dds_::TimeSpec_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::TimeSpec_>();
|
||||
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_UNITREE_IDL_GO2_TIMESPEC__HPP
|
||||
968
unitree_SDK/include/unitree/idl/go2/UwbState_.hpp
Normal file
968
unitree_SDK/include/unitree/idl/go2/UwbState_.hpp
Normal file
@@ -0,0 +1,968 @@
|
||||
/****************************************************************
|
||||
|
||||
Generated by Eclipse Cyclone DDS IDL to CXX Translator
|
||||
File name: UwbState_.idl
|
||||
Source: UwbState_.hpp
|
||||
Cyclone DDS: v0.10.2
|
||||
|
||||
*****************************************************************/
|
||||
#ifndef DDSCXX_UNITREE_IDL_GO2_UWBSTATE__HPP
|
||||
#define DDSCXX_UNITREE_IDL_GO2_UWBSTATE__HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <array>
|
||||
|
||||
namespace unitree_go
|
||||
{
|
||||
namespace msg
|
||||
{
|
||||
namespace dds_
|
||||
{
|
||||
class UwbState_
|
||||
{
|
||||
private:
|
||||
std::array<uint8_t, 2> version_ = { };
|
||||
uint8_t channel_ = 0;
|
||||
uint8_t joy_mode_ = 0;
|
||||
float orientation_est_ = 0.0f;
|
||||
float pitch_est_ = 0.0f;
|
||||
float distance_est_ = 0.0f;
|
||||
float yaw_est_ = 0.0f;
|
||||
float tag_roll_ = 0.0f;
|
||||
float tag_pitch_ = 0.0f;
|
||||
float tag_yaw_ = 0.0f;
|
||||
float base_roll_ = 0.0f;
|
||||
float base_pitch_ = 0.0f;
|
||||
float base_yaw_ = 0.0f;
|
||||
std::array<float, 2> joystick_ = { };
|
||||
uint8_t error_state_ = 0;
|
||||
uint8_t buttons_ = 0;
|
||||
uint8_t enabled_from_app_ = 0;
|
||||
|
||||
public:
|
||||
UwbState_() = default;
|
||||
|
||||
explicit UwbState_(
|
||||
const std::array<uint8_t, 2>& version,
|
||||
uint8_t channel,
|
||||
uint8_t joy_mode,
|
||||
float orientation_est,
|
||||
float pitch_est,
|
||||
float distance_est,
|
||||
float yaw_est,
|
||||
float tag_roll,
|
||||
float tag_pitch,
|
||||
float tag_yaw,
|
||||
float base_roll,
|
||||
float base_pitch,
|
||||
float base_yaw,
|
||||
const std::array<float, 2>& joystick,
|
||||
uint8_t error_state,
|
||||
uint8_t buttons,
|
||||
uint8_t enabled_from_app) :
|
||||
version_(version),
|
||||
channel_(channel),
|
||||
joy_mode_(joy_mode),
|
||||
orientation_est_(orientation_est),
|
||||
pitch_est_(pitch_est),
|
||||
distance_est_(distance_est),
|
||||
yaw_est_(yaw_est),
|
||||
tag_roll_(tag_roll),
|
||||
tag_pitch_(tag_pitch),
|
||||
tag_yaw_(tag_yaw),
|
||||
base_roll_(base_roll),
|
||||
base_pitch_(base_pitch),
|
||||
base_yaw_(base_yaw),
|
||||
joystick_(joystick),
|
||||
error_state_(error_state),
|
||||
buttons_(buttons),
|
||||
enabled_from_app_(enabled_from_app) { }
|
||||
|
||||
const std::array<uint8_t, 2>& version() const { return this->version_; }
|
||||
std::array<uint8_t, 2>& version() { return this->version_; }
|
||||
void version(const std::array<uint8_t, 2>& _val_) { this->version_ = _val_; }
|
||||
void version(std::array<uint8_t, 2>&& _val_) { this->version_ = _val_; }
|
||||
uint8_t channel() const { return this->channel_; }
|
||||
uint8_t& channel() { return this->channel_; }
|
||||
void channel(uint8_t _val_) { this->channel_ = _val_; }
|
||||
uint8_t joy_mode() const { return this->joy_mode_; }
|
||||
uint8_t& joy_mode() { return this->joy_mode_; }
|
||||
void joy_mode(uint8_t _val_) { this->joy_mode_ = _val_; }
|
||||
float orientation_est() const { return this->orientation_est_; }
|
||||
float& orientation_est() { return this->orientation_est_; }
|
||||
void orientation_est(float _val_) { this->orientation_est_ = _val_; }
|
||||
float pitch_est() const { return this->pitch_est_; }
|
||||
float& pitch_est() { return this->pitch_est_; }
|
||||
void pitch_est(float _val_) { this->pitch_est_ = _val_; }
|
||||
float distance_est() const { return this->distance_est_; }
|
||||
float& distance_est() { return this->distance_est_; }
|
||||
void distance_est(float _val_) { this->distance_est_ = _val_; }
|
||||
float yaw_est() const { return this->yaw_est_; }
|
||||
float& yaw_est() { return this->yaw_est_; }
|
||||
void yaw_est(float _val_) { this->yaw_est_ = _val_; }
|
||||
float tag_roll() const { return this->tag_roll_; }
|
||||
float& tag_roll() { return this->tag_roll_; }
|
||||
void tag_roll(float _val_) { this->tag_roll_ = _val_; }
|
||||
float tag_pitch() const { return this->tag_pitch_; }
|
||||
float& tag_pitch() { return this->tag_pitch_; }
|
||||
void tag_pitch(float _val_) { this->tag_pitch_ = _val_; }
|
||||
float tag_yaw() const { return this->tag_yaw_; }
|
||||
float& tag_yaw() { return this->tag_yaw_; }
|
||||
void tag_yaw(float _val_) { this->tag_yaw_ = _val_; }
|
||||
float base_roll() const { return this->base_roll_; }
|
||||
float& base_roll() { return this->base_roll_; }
|
||||
void base_roll(float _val_) { this->base_roll_ = _val_; }
|
||||
float base_pitch() const { return this->base_pitch_; }
|
||||
float& base_pitch() { return this->base_pitch_; }
|
||||
void base_pitch(float _val_) { this->base_pitch_ = _val_; }
|
||||
float base_yaw() const { return this->base_yaw_; }
|
||||
float& base_yaw() { return this->base_yaw_; }
|
||||
void base_yaw(float _val_) { this->base_yaw_ = _val_; }
|
||||
const std::array<float, 2>& joystick() const { return this->joystick_; }
|
||||
std::array<float, 2>& joystick() { return this->joystick_; }
|
||||
void joystick(const std::array<float, 2>& _val_) { this->joystick_ = _val_; }
|
||||
void joystick(std::array<float, 2>&& _val_) { this->joystick_ = _val_; }
|
||||
uint8_t error_state() const { return this->error_state_; }
|
||||
uint8_t& error_state() { return this->error_state_; }
|
||||
void error_state(uint8_t _val_) { this->error_state_ = _val_; }
|
||||
uint8_t buttons() const { return this->buttons_; }
|
||||
uint8_t& buttons() { return this->buttons_; }
|
||||
void buttons(uint8_t _val_) { this->buttons_ = _val_; }
|
||||
uint8_t enabled_from_app() const { return this->enabled_from_app_; }
|
||||
uint8_t& enabled_from_app() { return this->enabled_from_app_; }
|
||||
void enabled_from_app(uint8_t _val_) { this->enabled_from_app_ = _val_; }
|
||||
|
||||
bool operator==(const UwbState_& _other) const
|
||||
{
|
||||
(void) _other;
|
||||
return version_ == _other.version_ &&
|
||||
channel_ == _other.channel_ &&
|
||||
joy_mode_ == _other.joy_mode_ &&
|
||||
orientation_est_ == _other.orientation_est_ &&
|
||||
pitch_est_ == _other.pitch_est_ &&
|
||||
distance_est_ == _other.distance_est_ &&
|
||||
yaw_est_ == _other.yaw_est_ &&
|
||||
tag_roll_ == _other.tag_roll_ &&
|
||||
tag_pitch_ == _other.tag_pitch_ &&
|
||||
tag_yaw_ == _other.tag_yaw_ &&
|
||||
base_roll_ == _other.base_roll_ &&
|
||||
base_pitch_ == _other.base_pitch_ &&
|
||||
base_yaw_ == _other.base_yaw_ &&
|
||||
joystick_ == _other.joystick_ &&
|
||||
error_state_ == _other.error_state_ &&
|
||||
buttons_ == _other.buttons_ &&
|
||||
enabled_from_app_ == _other.enabled_from_app_;
|
||||
}
|
||||
|
||||
bool operator!=(const UwbState_& _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<::unitree_go::msg::dds_::UwbState_>::getTypeName()
|
||||
{
|
||||
return "unitree_go::msg::dds_::UwbState_";
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::UwbState_>::isKeyless()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::UwbState_>::type_map_blob_sz() { return 998; }
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::UwbState_>::type_info_blob_sz() { return 100; }
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::UwbState_>::type_map_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0x53, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0xd9, 0x00, 0xc3, 0x35, 0xed, 0x0e, 0xb3,
|
||||
0x3d, 0x57, 0x4e, 0xb0, 0xbe, 0x39, 0xae, 0x00, 0x3b, 0x01, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x01, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
|
||||
0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x2a, 0xf7, 0x2f, 0x10, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xc4, 0x85, 0xd2, 0xed, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xf5, 0x20, 0x55, 0xed, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xb7, 0x48, 0xcc, 0x5d, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x17, 0x8d, 0xce, 0xa7, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xf5, 0x06, 0x73, 0x9b, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x2e, 0xae, 0x04, 0xde, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x6f, 0x2d, 0x01, 0xc9, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x2f, 0x7d, 0xc9, 0x14, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x1e, 0xe4, 0xc0, 0x80, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x69, 0x52, 0xd1, 0x26, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x02, 0xda, 0x41, 0x0a, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x83, 0xbd, 0x50, 0x7a, 0x00, 0x16, 0x00, 0x00, 0x00,
|
||||
0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x02, 0x09, 0x2e, 0xd6, 0x98, 0x33, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x02, 0xa7, 0xd8, 0x5b, 0x8a, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x02, 0x02, 0x63, 0x4e, 0xff, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x02, 0x84, 0x86, 0xf2, 0x61, 0x00, 0x63, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0xf2, 0x82, 0x5c, 0xad, 0xb9, 0xe5, 0x0d, 0xf1, 0x58, 0xaf, 0x64, 0xdc, 0x66, 0xa5, 0x20, 0x00,
|
||||
0x4b, 0x02, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x21, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a,
|
||||
0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x55, 0x77, 0x62, 0x53, 0x74,
|
||||
0x61, 0x74, 0x65, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x13, 0x02, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
|
||||
0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x76, 0x65, 0x72, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00,
|
||||
0x09, 0x00, 0x00, 0x00, 0x6a, 0x6f, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x00, 0x00, 0x00, 0x00,
|
||||
0x1e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x10, 0x00, 0x00, 0x00,
|
||||
0x6f, 0x72, 0x69, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x73, 0x74, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00,
|
||||
0x0a, 0x00, 0x00, 0x00, 0x70, 0x69, 0x74, 0x63, 0x68, 0x5f, 0x65, 0x73, 0x74, 0x00, 0x00, 0x00,
|
||||
0x1b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x0d, 0x00, 0x00, 0x00,
|
||||
0x64, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x65, 0x73, 0x74, 0x00, 0x00, 0x00, 0x00,
|
||||
0x16, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||
0x79, 0x61, 0x77, 0x5f, 0x65, 0x73, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x09, 0x00, 0x00, 0x00, 0x74, 0x61, 0x67, 0x5f,
|
||||
0x72, 0x6f, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x74, 0x61, 0x67, 0x5f, 0x70, 0x69, 0x74, 0x63,
|
||||
0x68, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x74, 0x61, 0x67, 0x5f, 0x79, 0x61, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x18, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x0a, 0x00, 0x00, 0x00,
|
||||
0x62, 0x61, 0x73, 0x65, 0x5f, 0x72, 0x6f, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x62, 0x61, 0x73, 0x65,
|
||||
0x5f, 0x70, 0x69, 0x74, 0x63, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00,
|
||||
0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x09, 0x00, 0x00, 0x00, 0x62, 0x61, 0x73, 0x65,
|
||||
0x5f, 0x79, 0x61, 0x77, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x09, 0x00, 0x00,
|
||||
0x09, 0x00, 0x00, 0x00, 0x6a, 0x6f, 0x79, 0x73, 0x74, 0x69, 0x63, 0x6b, 0x00, 0x00, 0x00, 0x00,
|
||||
0x1a, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x00, 0x00,
|
||||
0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x16, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||
0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
|
||||
0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x11, 0x00, 0x00, 0x00, 0x65, 0x6e, 0x61, 0x62,
|
||||
0x6c, 0x65, 0x64, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x70, 0x70, 0x00, 0x00, 0x00, 0x00,
|
||||
0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x82, 0x5c, 0xad, 0xb9, 0xe5, 0x0d, 0xf1,
|
||||
0x58, 0xaf, 0x64, 0xdc, 0x66, 0xa5, 0x20, 0xf1, 0xd9, 0x00, 0xc3, 0x35, 0xed, 0x0e, 0xb3, 0x3d,
|
||||
0x57, 0x4e, 0xb0, 0xbe, 0x39, 0xae, };
|
||||
return blob;
|
||||
}
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::UwbState_>::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, 0xd9, 0x00, 0xc3, 0x35, 0xed, 0x0e, 0xb3, 0x3d, 0x57, 0x4e, 0xb0,
|
||||
0xbe, 0x39, 0xae, 0x00, 0x3f, 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, 0x82, 0x5c, 0xad, 0xb9, 0xe5, 0x0d, 0xf1, 0x58, 0xaf, 0x64, 0xdc,
|
||||
0x66, 0xa5, 0x20, 0x00, 0x4f, 0x02, 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<::unitree_go::msg::dds_::UwbState_>
|
||||
{
|
||||
static std::string value()
|
||||
{
|
||||
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::UwbState_>::getTypeName();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::UwbState_)
|
||||
|
||||
namespace org{
|
||||
namespace eclipse{
|
||||
namespace cyclonedds{
|
||||
namespace core{
|
||||
namespace cdr{
|
||||
|
||||
template<>
|
||||
propvec &get_type_props<::unitree_go::msg::dds_::UwbState_>();
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
|
||||
bool write(T& streamer, const ::unitree_go::msg::dds_::UwbState_& 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.version()[0], instance.version().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 (!write(streamer, instance.channel()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.joy_mode()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.orientation_est()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.pitch_est()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 5:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.distance_est()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 6:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.yaw_est()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 7:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.tag_roll()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 8:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.tag_pitch()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 9:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.tag_yaw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 10:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.base_roll()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 11:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.base_pitch()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 12:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.base_yaw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 13:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(true, true))
|
||||
return false;
|
||||
if (!write(streamer, instance.joystick()[0], instance.joystick().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 14:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.error_state()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 15:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.buttons()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 16:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.enabled_from_app()))
|
||||
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 ::unitree_go::msg::dds_::UwbState_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::UwbState_>();
|
||||
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, ::unitree_go::msg::dds_::UwbState_& 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.version()[0], instance.version().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 (!read(streamer, instance.channel()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.joy_mode()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.orientation_est()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.pitch_est()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 5:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.distance_est()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 6:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.yaw_est()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 7:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.tag_roll()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 8:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.tag_pitch()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 9:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.tag_yaw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 10:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.base_roll()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 11:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.base_pitch()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 12:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.base_yaw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 13:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(true, true))
|
||||
return false;
|
||||
if (!read(streamer, instance.joystick()[0], instance.joystick().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 14:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.error_state()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 15:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.buttons()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 16:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.enabled_from_app()))
|
||||
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, ::unitree_go::msg::dds_::UwbState_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::UwbState_>();
|
||||
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 ::unitree_go::msg::dds_::UwbState_& 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.version()[0], instance.version().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 (!move(streamer, instance.channel()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.joy_mode()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.orientation_est()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.pitch_est()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 5:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.distance_est()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 6:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.yaw_est()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 7:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.tag_roll()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 8:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.tag_pitch()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 9:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.tag_yaw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 10:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.base_roll()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 11:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.base_pitch()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 12:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.base_yaw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 13:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(true, true))
|
||||
return false;
|
||||
if (!move(streamer, instance.joystick()[0], instance.joystick().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 14:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.error_state()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 15:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.buttons()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 16:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.enabled_from_app()))
|
||||
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 ::unitree_go::msg::dds_::UwbState_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::UwbState_>();
|
||||
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 ::unitree_go::msg::dds_::UwbState_& 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.version()[0], instance.version().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 (!max(streamer, instance.channel()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.joy_mode()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.orientation_est()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.pitch_est()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 5:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.distance_est()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 6:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.yaw_est()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 7:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.tag_roll()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 8:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.tag_pitch()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 9:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.tag_yaw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 10:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.base_roll()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 11:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.base_pitch()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 12:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.base_yaw()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 13:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(true, true))
|
||||
return false;
|
||||
if (!max(streamer, instance.joystick()[0], instance.joystick().size()))
|
||||
return false;
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 14:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.error_state()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 15:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.buttons()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 16:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.enabled_from_app()))
|
||||
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 ::unitree_go::msg::dds_::UwbState_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::UwbState_>();
|
||||
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_UNITREE_IDL_GO2_UWBSTATE__HPP
|
||||
260
unitree_SDK/include/unitree/idl/go2/UwbSwitch_.hpp
Normal file
260
unitree_SDK/include/unitree/idl/go2/UwbSwitch_.hpp
Normal file
@@ -0,0 +1,260 @@
|
||||
/****************************************************************
|
||||
|
||||
Generated by Eclipse Cyclone DDS IDL to CXX Translator
|
||||
File name: UwbSwitch_.idl
|
||||
Source: UwbSwitch_.hpp
|
||||
Cyclone DDS: v0.10.2
|
||||
|
||||
*****************************************************************/
|
||||
#ifndef DDSCXX_UNITREE_IDL_GO2_UWBSWITCH__HPP
|
||||
#define DDSCXX_UNITREE_IDL_GO2_UWBSWITCH__HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace unitree_go
|
||||
{
|
||||
namespace msg
|
||||
{
|
||||
namespace dds_
|
||||
{
|
||||
class UwbSwitch_
|
||||
{
|
||||
private:
|
||||
uint8_t enabled_ = 0;
|
||||
|
||||
public:
|
||||
UwbSwitch_() = default;
|
||||
|
||||
explicit UwbSwitch_(
|
||||
uint8_t enabled) :
|
||||
enabled_(enabled) { }
|
||||
|
||||
uint8_t enabled() const { return this->enabled_; }
|
||||
uint8_t& enabled() { return this->enabled_; }
|
||||
void enabled(uint8_t _val_) { this->enabled_ = _val_; }
|
||||
|
||||
bool operator==(const UwbSwitch_& _other) const
|
||||
{
|
||||
(void) _other;
|
||||
return enabled_ == _other.enabled_;
|
||||
}
|
||||
|
||||
bool operator!=(const UwbSwitch_& _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<::unitree_go::msg::dds_::UwbSwitch_>::getTypeName()
|
||||
{
|
||||
return "unitree_go::msg::dds_::UwbSwitch_";
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::UwbSwitch_>::isKeyless()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::UwbSwitch_>::type_map_blob_sz() { return 218; }
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::UwbSwitch_>::type_info_blob_sz() { return 100; }
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::UwbSwitch_>::type_map_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0x3b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0xb3, 0xcf, 0xfe, 0xd4, 0x3a, 0x87, 0x3e,
|
||||
0x4b, 0xff, 0x03, 0x70, 0x95, 0x52, 0x60, 0x00, 0x23, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0xa1, 0x03, 0x11, 0x45, 0x00,
|
||||
0x6e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x22, 0x0e, 0x76, 0xfa, 0x1b, 0x1c, 0x22,
|
||||
0x03, 0x2c, 0x71, 0xd3, 0x7c, 0x77, 0x05, 0x00, 0x56, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00,
|
||||
0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74,
|
||||
0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73,
|
||||
0x5f, 0x3a, 0x3a, 0x55, 0x77, 0x62, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x5f, 0x00, 0x00, 0x00,
|
||||
0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x22, 0x0e, 0x76,
|
||||
0xfa, 0x1b, 0x1c, 0x22, 0x03, 0x2c, 0x71, 0xd3, 0x7c, 0x77, 0x05, 0xf1, 0xb3, 0xcf, 0xfe, 0xd4,
|
||||
0x3a, 0x87, 0x3e, 0x4b, 0xff, 0x03, 0x70, 0x95, 0x52, 0x60, };
|
||||
return blob;
|
||||
}
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::UwbSwitch_>::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, 0xb3, 0xcf, 0xfe, 0xd4, 0x3a, 0x87, 0x3e, 0x4b, 0xff, 0x03, 0x70,
|
||||
0x95, 0x52, 0x60, 0x00, 0x27, 0x00, 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, 0x22, 0x0e, 0x76, 0xfa, 0x1b, 0x1c, 0x22, 0x03, 0x2c, 0x71, 0xd3,
|
||||
0x7c, 0x77, 0x05, 0x00, 0x5a, 0x00, 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<::unitree_go::msg::dds_::UwbSwitch_>
|
||||
{
|
||||
static std::string value()
|
||||
{
|
||||
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::UwbSwitch_>::getTypeName();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::UwbSwitch_)
|
||||
|
||||
namespace org{
|
||||
namespace eclipse{
|
||||
namespace cyclonedds{
|
||||
namespace core{
|
||||
namespace cdr{
|
||||
|
||||
template<>
|
||||
propvec &get_type_props<::unitree_go::msg::dds_::UwbSwitch_>();
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
|
||||
bool write(T& streamer, const ::unitree_go::msg::dds_::UwbSwitch_& 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 (!write(streamer, instance.enabled()))
|
||||
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 ::unitree_go::msg::dds_::UwbSwitch_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::UwbSwitch_>();
|
||||
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, ::unitree_go::msg::dds_::UwbSwitch_& 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 (!read(streamer, instance.enabled()))
|
||||
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, ::unitree_go::msg::dds_::UwbSwitch_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::UwbSwitch_>();
|
||||
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 ::unitree_go::msg::dds_::UwbSwitch_& 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 (!move(streamer, instance.enabled()))
|
||||
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 ::unitree_go::msg::dds_::UwbSwitch_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::UwbSwitch_>();
|
||||
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 ::unitree_go::msg::dds_::UwbSwitch_& 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 (!max(streamer, instance.enabled()))
|
||||
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 ::unitree_go::msg::dds_::UwbSwitch_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::UwbSwitch_>();
|
||||
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_UNITREE_IDL_GO2_UWBSWITCH__HPP
|
||||
600
unitree_SDK/include/unitree/idl/go2/VoxelMapCompressed_.hpp
Normal file
600
unitree_SDK/include/unitree/idl/go2/VoxelMapCompressed_.hpp
Normal file
@@ -0,0 +1,600 @@
|
||||
/****************************************************************
|
||||
|
||||
Generated by Eclipse Cyclone DDS IDL to CXX Translator
|
||||
File name: VoxelMapCompressed_.idl
|
||||
Source: VoxelMapCompressed_.hpp
|
||||
Cyclone DDS: v0.10.2
|
||||
|
||||
*****************************************************************/
|
||||
#ifndef DDSCXX_UNITREE_IDL_GO2_VOXELMAPCOMPRESSED__HPP
|
||||
#define DDSCXX_UNITREE_IDL_GO2_VOXELMAPCOMPRESSED__HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <array>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
namespace unitree_go
|
||||
{
|
||||
namespace msg
|
||||
{
|
||||
namespace dds_
|
||||
{
|
||||
class VoxelMapCompressed_
|
||||
{
|
||||
private:
|
||||
double stamp_ = 0.0;
|
||||
std::string frame_id_;
|
||||
double resolution_ = 0.0;
|
||||
std::array<double, 3> origin_ = { };
|
||||
std::array<uint16_t, 3> width_ = { };
|
||||
uint64_t src_size_ = 0;
|
||||
std::vector<uint8_t> data_;
|
||||
|
||||
public:
|
||||
VoxelMapCompressed_() = default;
|
||||
|
||||
explicit VoxelMapCompressed_(
|
||||
double stamp,
|
||||
const std::string& frame_id,
|
||||
double resolution,
|
||||
const std::array<double, 3>& origin,
|
||||
const std::array<uint16_t, 3>& width,
|
||||
uint64_t src_size,
|
||||
const std::vector<uint8_t>& data) :
|
||||
stamp_(stamp),
|
||||
frame_id_(frame_id),
|
||||
resolution_(resolution),
|
||||
origin_(origin),
|
||||
width_(width),
|
||||
src_size_(src_size),
|
||||
data_(data) { }
|
||||
|
||||
double stamp() const { return this->stamp_; }
|
||||
double& stamp() { return this->stamp_; }
|
||||
void stamp(double _val_) { this->stamp_ = _val_; }
|
||||
const std::string& frame_id() const { return this->frame_id_; }
|
||||
std::string& frame_id() { return this->frame_id_; }
|
||||
void frame_id(const std::string& _val_) { this->frame_id_ = _val_; }
|
||||
void frame_id(std::string&& _val_) { this->frame_id_ = _val_; }
|
||||
double resolution() const { return this->resolution_; }
|
||||
double& resolution() { return this->resolution_; }
|
||||
void resolution(double _val_) { this->resolution_ = _val_; }
|
||||
const std::array<double, 3>& origin() const { return this->origin_; }
|
||||
std::array<double, 3>& origin() { return this->origin_; }
|
||||
void origin(const std::array<double, 3>& _val_) { this->origin_ = _val_; }
|
||||
void origin(std::array<double, 3>&& _val_) { this->origin_ = _val_; }
|
||||
const std::array<uint16_t, 3>& width() const { return this->width_; }
|
||||
std::array<uint16_t, 3>& width() { return this->width_; }
|
||||
void width(const std::array<uint16_t, 3>& _val_) { this->width_ = _val_; }
|
||||
void width(std::array<uint16_t, 3>&& _val_) { this->width_ = _val_; }
|
||||
uint64_t src_size() const { return this->src_size_; }
|
||||
uint64_t& src_size() { return this->src_size_; }
|
||||
void src_size(uint64_t _val_) { this->src_size_ = _val_; }
|
||||
const std::vector<uint8_t>& data() const { return this->data_; }
|
||||
std::vector<uint8_t>& data() { return this->data_; }
|
||||
void data(const std::vector<uint8_t>& _val_) { this->data_ = _val_; }
|
||||
void data(std::vector<uint8_t>&& _val_) { this->data_ = _val_; }
|
||||
|
||||
bool operator==(const VoxelMapCompressed_& _other) const
|
||||
{
|
||||
(void) _other;
|
||||
return stamp_ == _other.stamp_ &&
|
||||
frame_id_ == _other.frame_id_ &&
|
||||
resolution_ == _other.resolution_ &&
|
||||
origin_ == _other.origin_ &&
|
||||
width_ == _other.width_ &&
|
||||
src_size_ == _other.src_size_ &&
|
||||
data_ == _other.data_;
|
||||
}
|
||||
|
||||
bool operator!=(const VoxelMapCompressed_& _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<::unitree_go::msg::dds_::VoxelMapCompressed_>::getTypeName()
|
||||
{
|
||||
return "unitree_go::msg::dds_::VoxelMapCompressed_";
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::VoxelMapCompressed_>::isSelfContained()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::VoxelMapCompressed_>::isKeyless()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::VoxelMapCompressed_>::type_map_blob_sz() { return 538; }
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::VoxelMapCompressed_>::type_info_blob_sz() { return 100; }
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::VoxelMapCompressed_>::type_map_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0xb8, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0xf4, 0x58, 0xe7, 0x8f, 0x62, 0xc9, 0xad,
|
||||
0xbc, 0x43, 0x1d, 0x16, 0x4e, 0xdf, 0xdd, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x96, 0xb8, 0xc7, 0x8d, 0x00,
|
||||
0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00, 0x4b, 0xb3, 0x9c, 0x5c,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xb7, 0xe1, 0x64, 0xb3, 0x00,
|
||||
0x16, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x03, 0x0a, 0x7c, 0x49, 0xb1, 0x53, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x03, 0x06, 0xea, 0xae, 0x26, 0xa6, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x08, 0x20, 0x1e, 0x06, 0xae, 0x00, 0x10, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, 0x8d, 0x77, 0x7f, 0x38, 0x33, 0x01, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0xf2, 0x07, 0xc6, 0xdb, 0x76, 0xf0, 0x34, 0x86, 0x2a, 0x75, 0x47, 0x5e,
|
||||
0xd7, 0xa4, 0x76, 0x00, 0x1b, 0x01, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x33, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74, 0x72, 0x65, 0x65, 0x5f,
|
||||
0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73, 0x5f, 0x3a, 0x3a, 0x56,
|
||||
0x6f, 0x78, 0x65, 0x6c, 0x4d, 0x61, 0x70, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65,
|
||||
0x64, 0x5f, 0x00, 0x00, 0xdb, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x06, 0x00, 0x00, 0x00, 0x73, 0x74, 0x61, 0x6d,
|
||||
0x70, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x00,
|
||||
0x09, 0x00, 0x00, 0x00, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x00, 0x00, 0x00, 0x00,
|
||||
0x19, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x21, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x03, 0x0a, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x6f, 0x72, 0x69, 0x67,
|
||||
0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00,
|
||||
0x06, 0x00, 0x00, 0x00, 0x77, 0x69, 0x64, 0x74, 0x68, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00,
|
||||
0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x09, 0x00, 0x00, 0x00, 0x73, 0x72, 0x63, 0x5f,
|
||||
0x73, 0x69, 0x7a, 0x65, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x80, 0xf3, 0x01, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x00, 0x64, 0x61, 0x74, 0x61,
|
||||
0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x07, 0xc6, 0xdb,
|
||||
0x76, 0xf0, 0x34, 0x86, 0x2a, 0x75, 0x47, 0x5e, 0xd7, 0xa4, 0x76, 0xf1, 0xf4, 0x58, 0xe7, 0x8f,
|
||||
0x62, 0xc9, 0xad, 0xbc, 0x43, 0x1d, 0x16, 0x4e, 0xdf, 0xdd, };
|
||||
return blob;
|
||||
}
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::VoxelMapCompressed_>::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, 0xf4, 0x58, 0xe7, 0x8f, 0x62, 0xc9, 0xad, 0xbc, 0x43, 0x1d, 0x16,
|
||||
0x4e, 0xdf, 0xdd, 0x00, 0xa4, 0x00, 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, 0x07, 0xc6, 0xdb, 0x76, 0xf0, 0x34, 0x86, 0x2a, 0x75, 0x47, 0x5e,
|
||||
0xd7, 0xa4, 0x76, 0x00, 0x1f, 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<::unitree_go::msg::dds_::VoxelMapCompressed_>
|
||||
{
|
||||
static std::string value()
|
||||
{
|
||||
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::VoxelMapCompressed_>::getTypeName();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::VoxelMapCompressed_)
|
||||
|
||||
namespace org{
|
||||
namespace eclipse{
|
||||
namespace cyclonedds{
|
||||
namespace core{
|
||||
namespace cdr{
|
||||
|
||||
template<>
|
||||
propvec &get_type_props<::unitree_go::msg::dds_::VoxelMapCompressed_>();
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
|
||||
bool write(T& streamer, const ::unitree_go::msg::dds_::VoxelMapCompressed_& 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 (!write(streamer, instance.stamp()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write_string(streamer, instance.frame_id(), 0))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.resolution()))
|
||||
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.origin()[0], instance.origin().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.width()[0], instance.width().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 (!write(streamer, instance.src_size()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 6:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.data().size());
|
||||
if (!write(streamer, se_1))
|
||||
return false;
|
||||
if (se_1 > 0 &&
|
||||
!write(streamer, instance.data()[0], se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::VoxelMapCompressed_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::VoxelMapCompressed_>();
|
||||
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, ::unitree_go::msg::dds_::VoxelMapCompressed_& 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 (!read(streamer, instance.stamp()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read_string(streamer, instance.frame_id(), 0))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.resolution()))
|
||||
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.origin()[0], instance.origin().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.width()[0], instance.width().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 (!read(streamer, instance.src_size()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 6:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.data().size());
|
||||
if (!read(streamer, se_1))
|
||||
return false;
|
||||
instance.data().resize(se_1);
|
||||
if (se_1 > 0 &&
|
||||
!read(streamer, instance.data()[0], se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
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, ::unitree_go::msg::dds_::VoxelMapCompressed_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::VoxelMapCompressed_>();
|
||||
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 ::unitree_go::msg::dds_::VoxelMapCompressed_& 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 (!move(streamer, instance.stamp()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move_string(streamer, instance.frame_id(), 0))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.resolution()))
|
||||
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.origin()[0], instance.origin().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.width()[0], instance.width().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 (!move(streamer, instance.src_size()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 6:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = uint32_t(instance.data().size());
|
||||
if (!move(streamer, se_1))
|
||||
return false;
|
||||
if (se_1 > 0 &&
|
||||
!move(streamer, uint8_t(), se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
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 ::unitree_go::msg::dds_::VoxelMapCompressed_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::VoxelMapCompressed_>();
|
||||
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 ::unitree_go::msg::dds_::VoxelMapCompressed_& 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 (!max(streamer, instance.stamp()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max_string(streamer, instance.frame_id(), 0))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.resolution()))
|
||||
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.origin()[0], instance.origin().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.width()[0], instance.width().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 (!max(streamer, instance.src_size()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 6:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!streamer.start_consecutive(false, true))
|
||||
return false;
|
||||
{
|
||||
uint32_t se_1 = 0;
|
||||
if (!max(streamer, se_1))
|
||||
return false;
|
||||
if (se_1 > 0 &&
|
||||
!max(streamer, uint8_t(), se_1))
|
||||
return false;
|
||||
} //end sequence 1
|
||||
if (!streamer.finish_consecutive())
|
||||
return false;
|
||||
streamer.position(SIZE_MAX);
|
||||
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 ::unitree_go::msg::dds_::VoxelMapCompressed_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::VoxelMapCompressed_>();
|
||||
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_UNITREE_IDL_GO2_VOXELMAPCOMPRESSED__HPP
|
||||
426
unitree_SDK/include/unitree/idl/go2/WirelessController_.hpp
Normal file
426
unitree_SDK/include/unitree/idl/go2/WirelessController_.hpp
Normal file
@@ -0,0 +1,426 @@
|
||||
/****************************************************************
|
||||
|
||||
Generated by Eclipse Cyclone DDS IDL to CXX Translator
|
||||
File name: WirelessController_.idl
|
||||
Source: WirelessController_.hpp
|
||||
Cyclone DDS: v0.10.2
|
||||
|
||||
*****************************************************************/
|
||||
#ifndef DDSCXX_UNITREE_IDL_GO2_WIRELESSCONTROLLER__HPP
|
||||
#define DDSCXX_UNITREE_IDL_GO2_WIRELESSCONTROLLER__HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace unitree_go
|
||||
{
|
||||
namespace msg
|
||||
{
|
||||
namespace dds_
|
||||
{
|
||||
class WirelessController_
|
||||
{
|
||||
private:
|
||||
float lx_ = 0.0f;
|
||||
float ly_ = 0.0f;
|
||||
float rx_ = 0.0f;
|
||||
float ry_ = 0.0f;
|
||||
uint16_t keys_ = 0;
|
||||
|
||||
public:
|
||||
WirelessController_() = default;
|
||||
|
||||
explicit WirelessController_(
|
||||
float lx,
|
||||
float ly,
|
||||
float rx,
|
||||
float ry,
|
||||
uint16_t keys) :
|
||||
lx_(lx),
|
||||
ly_(ly),
|
||||
rx_(rx),
|
||||
ry_(ry),
|
||||
keys_(keys) { }
|
||||
|
||||
float lx() const { return this->lx_; }
|
||||
float& lx() { return this->lx_; }
|
||||
void lx(float _val_) { this->lx_ = _val_; }
|
||||
float ly() const { return this->ly_; }
|
||||
float& ly() { return this->ly_; }
|
||||
void ly(float _val_) { this->ly_ = _val_; }
|
||||
float rx() const { return this->rx_; }
|
||||
float& rx() { return this->rx_; }
|
||||
void rx(float _val_) { this->rx_ = _val_; }
|
||||
float ry() const { return this->ry_; }
|
||||
float& ry() { return this->ry_; }
|
||||
void ry(float _val_) { this->ry_ = _val_; }
|
||||
uint16_t keys() const { return this->keys_; }
|
||||
uint16_t& keys() { return this->keys_; }
|
||||
void keys(uint16_t _val_) { this->keys_ = _val_; }
|
||||
|
||||
bool operator==(const WirelessController_& _other) const
|
||||
{
|
||||
(void) _other;
|
||||
return lx_ == _other.lx_ &&
|
||||
ly_ == _other.ly_ &&
|
||||
rx_ == _other.rx_ &&
|
||||
ry_ == _other.ry_ &&
|
||||
keys_ == _other.keys_;
|
||||
}
|
||||
|
||||
bool operator!=(const WirelessController_& _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<::unitree_go::msg::dds_::WirelessController_>::getTypeName()
|
||||
{
|
||||
return "unitree_go::msg::dds_::WirelessController_";
|
||||
}
|
||||
|
||||
template <> constexpr bool TopicTraits<::unitree_go::msg::dds_::WirelessController_>::isKeyless()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::WirelessController_>::type_map_blob_sz() { return 382; }
|
||||
template<> constexpr unsigned int TopicTraits<::unitree_go::msg::dds_::WirelessController_>::type_info_blob_sz() { return 100; }
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::WirelessController_>::type_map_blob() {
|
||||
static const uint8_t blob[] = {
|
||||
0x7b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0xd8, 0xdc, 0x69, 0xff, 0xf5, 0xd7, 0x59,
|
||||
0x61, 0xcd, 0x0e, 0x3f, 0xc0, 0x49, 0xcb, 0x00, 0x63, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x80, 0x37, 0xcc, 0xea, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0xe7, 0x28, 0xb4, 0x77, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x22, 0x77, 0x0f, 0xbd, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x73, 0x1a, 0x58, 0x83, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x14, 0xf8, 0x02, 0xe1, 0x00,
|
||||
0xd3, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0xe9, 0x68, 0x6f, 0xe7, 0x6f, 0x7b, 0x08,
|
||||
0xf9, 0x2c, 0xb2, 0x49, 0x43, 0xac, 0x72, 0x00, 0xbb, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00,
|
||||
0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74,
|
||||
0x72, 0x65, 0x65, 0x5f, 0x67, 0x6f, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73,
|
||||
0x5f, 0x3a, 0x3a, 0x57, 0x69, 0x72, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x00, 0x00, 0x7b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
|
||||
0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x6c, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x6c, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x72, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00, 0x00, 0x72, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x13, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x06, 0x00, 0x05, 0x00, 0x00, 0x00,
|
||||
0x6b, 0x65, 0x79, 0x73, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0xf2, 0xe9, 0x68, 0x6f, 0xe7, 0x6f, 0x7b, 0x08, 0xf9, 0x2c, 0xb2, 0x49, 0x43, 0xac, 0x72, 0xf1,
|
||||
0xd8, 0xdc, 0x69, 0xff, 0xf5, 0xd7, 0x59, 0x61, 0xcd, 0x0e, 0x3f, 0xc0, 0x49, 0xcb, };
|
||||
return blob;
|
||||
}
|
||||
template<> inline const uint8_t * TopicTraits<::unitree_go::msg::dds_::WirelessController_>::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, 0xd8, 0xdc, 0x69, 0xff, 0xf5, 0xd7, 0x59, 0x61, 0xcd, 0x0e, 0x3f,
|
||||
0xc0, 0x49, 0xcb, 0x00, 0x67, 0x00, 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, 0xe9, 0x68, 0x6f, 0xe7, 0x6f, 0x7b, 0x08, 0xf9, 0x2c, 0xb2, 0x49,
|
||||
0x43, 0xac, 0x72, 0x00, 0xbf, 0x00, 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<::unitree_go::msg::dds_::WirelessController_>
|
||||
{
|
||||
static std::string value()
|
||||
{
|
||||
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_go::msg::dds_::WirelessController_>::getTypeName();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_TOPIC_TYPE(::unitree_go::msg::dds_::WirelessController_)
|
||||
|
||||
namespace org{
|
||||
namespace eclipse{
|
||||
namespace cyclonedds{
|
||||
namespace core{
|
||||
namespace cdr{
|
||||
|
||||
template<>
|
||||
propvec &get_type_props<::unitree_go::msg::dds_::WirelessController_>();
|
||||
|
||||
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
|
||||
bool write(T& streamer, const ::unitree_go::msg::dds_::WirelessController_& 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 (!write(streamer, instance.lx()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.ly()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.rx()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.ry()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!write(streamer, instance.keys()))
|
||||
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 ::unitree_go::msg::dds_::WirelessController_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::WirelessController_>();
|
||||
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, ::unitree_go::msg::dds_::WirelessController_& 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 (!read(streamer, instance.lx()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.ly()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.rx()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.ry()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!read(streamer, instance.keys()))
|
||||
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, ::unitree_go::msg::dds_::WirelessController_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::WirelessController_>();
|
||||
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 ::unitree_go::msg::dds_::WirelessController_& 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 (!move(streamer, instance.lx()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.ly()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.rx()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.ry()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!move(streamer, instance.keys()))
|
||||
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 ::unitree_go::msg::dds_::WirelessController_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::WirelessController_>();
|
||||
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 ::unitree_go::msg::dds_::WirelessController_& 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 (!max(streamer, instance.lx()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 1:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.ly()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 2:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.rx()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 3:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.ry()))
|
||||
return false;
|
||||
if (!streamer.finish_member(*prop))
|
||||
return false;
|
||||
break;
|
||||
case 4:
|
||||
if (!streamer.start_member(*prop))
|
||||
return false;
|
||||
if (!max(streamer, instance.keys()))
|
||||
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 ::unitree_go::msg::dds_::WirelessController_& instance, bool as_key) {
|
||||
auto &props = get_type_props<::unitree_go::msg::dds_::WirelessController_>();
|
||||
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_UNITREE_IDL_GO2_WIRELESSCONTROLLER__HPP
|
||||
Reference in New Issue
Block a user