Go2Py_SIM/cpp_bridge/include/go2py/LowState.hpp

654 lines
24 KiB
C++

/****************************************************************
Generated by Eclipse Cyclone DDS IDL to CXX Translator
File name: LowState.idl
Source: LowState.hpp
Cyclone DDS: v0.10.2
*****************************************************************/
#ifndef DDSCXX_LOWSTATE_HPP
#define DDSCXX_LOWSTATE_HPP
#include <array>
namespace msgs
{
class LowState
{
private:
std::array<float, 12> q_ = { };
std::array<float, 12> dq_ = { };
std::array<float, 12> ddq_ = { };
std::array<float, 12> tau_est_ = { };
std::array<float, 12> tmp_ = { };
std::array<float, 4> contact_ = { };
float voltage_ = 0.0f;
float current_ = 0.0f;
public:
LowState() = default;
explicit LowState(
const std::array<float, 12>& q,
const std::array<float, 12>& dq,
const std::array<float, 12>& ddq,
const std::array<float, 12>& tau_est,
const std::array<float, 12>& tmp,
const std::array<float, 4>& contact,
float voltage,
float current) :
q_(q),
dq_(dq),
ddq_(ddq),
tau_est_(tau_est),
tmp_(tmp),
contact_(contact),
voltage_(voltage),
current_(current) { }
const std::array<float, 12>& q() const { return this->q_; }
std::array<float, 12>& q() { return this->q_; }
void q(const std::array<float, 12>& _val_) { this->q_ = _val_; }
void q(std::array<float, 12>&& _val_) { this->q_ = _val_; }
const std::array<float, 12>& dq() const { return this->dq_; }
std::array<float, 12>& dq() { return this->dq_; }
void dq(const std::array<float, 12>& _val_) { this->dq_ = _val_; }
void dq(std::array<float, 12>&& _val_) { this->dq_ = _val_; }
const std::array<float, 12>& ddq() const { return this->ddq_; }
std::array<float, 12>& ddq() { return this->ddq_; }
void ddq(const std::array<float, 12>& _val_) { this->ddq_ = _val_; }
void ddq(std::array<float, 12>&& _val_) { this->ddq_ = _val_; }
const std::array<float, 12>& tau_est() const { return this->tau_est_; }
std::array<float, 12>& tau_est() { return this->tau_est_; }
void tau_est(const std::array<float, 12>& _val_) { this->tau_est_ = _val_; }
void tau_est(std::array<float, 12>&& _val_) { this->tau_est_ = _val_; }
const std::array<float, 12>& tmp() const { return this->tmp_; }
std::array<float, 12>& tmp() { return this->tmp_; }
void tmp(const std::array<float, 12>& _val_) { this->tmp_ = _val_; }
void tmp(std::array<float, 12>&& _val_) { this->tmp_ = _val_; }
const std::array<float, 4>& contact() const { return this->contact_; }
std::array<float, 4>& contact() { return this->contact_; }
void contact(const std::array<float, 4>& _val_) { this->contact_ = _val_; }
void contact(std::array<float, 4>&& _val_) { this->contact_ = _val_; }
float voltage() const { return this->voltage_; }
float& voltage() { return this->voltage_; }
void voltage(float _val_) { this->voltage_ = _val_; }
float current() const { return this->current_; }
float& current() { return this->current_; }
void current(float _val_) { this->current_ = _val_; }
bool operator==(const LowState& _other) const
{
(void) _other;
return q_ == _other.q_ &&
dq_ == _other.dq_ &&
ddq_ == _other.ddq_ &&
tau_est_ == _other.tau_est_ &&
tmp_ == _other.tmp_ &&
contact_ == _other.contact_ &&
voltage_ == _other.voltage_ &&
current_ == _other.current_;
}
bool operator!=(const LowState& _other) const
{
return !(*this == _other);
}
};
}
#include "dds/topic/TopicTraits.hpp"
#include "org/eclipse/cyclonedds/topic/datatopic.hpp"
namespace org {
namespace eclipse {
namespace cyclonedds {
namespace topic {
template <> constexpr const char* TopicTraits<::msgs::LowState>::getTypeName()
{
return "msgs::LowState";
}
template <> constexpr bool TopicTraits<::msgs::LowState>::isKeyless()
{
return true;
}
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
template<> constexpr unsigned int TopicTraits<::msgs::LowState>::type_map_blob_sz() { return 630; }
template<> constexpr unsigned int TopicTraits<::msgs::LowState>::type_info_blob_sz() { return 100; }
template<> inline const uint8_t * TopicTraits<::msgs::LowState>::type_map_blob() {
static const uint8_t blob[] = {
0xf3, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0xd4, 0x69, 0x80, 0x35, 0xf5, 0x8b, 0x51,
0xea, 0x7f, 0x47, 0x3a, 0x7b, 0x09, 0x0f, 0x00, 0xdb, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x0c, 0x09, 0x76, 0x94, 0xf4, 0xa6, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x0c, 0x09, 0x47, 0xbc, 0xdc, 0xd7, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x09, 0xe9, 0x16,
0x89, 0x09, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x09, 0x8a, 0xf7, 0xae, 0xdf, 0x00, 0x00,
0x16, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x0c, 0x09, 0xfa, 0x81, 0x6e, 0xdb, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00,
0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x04, 0x09, 0x2f, 0x8a, 0x6b, 0xf3, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x01, 0x00, 0x09, 0xe4, 0x37, 0xba, 0x43, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
0x01, 0x00, 0x09, 0x43, 0xb5, 0xc9, 0x17, 0x00, 0x52, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0xf2, 0x84, 0x20, 0x63, 0xda, 0x5c, 0x28, 0xbb, 0x27, 0x92, 0xe4, 0x1c, 0xce, 0x56, 0xbc, 0x00,
0x3a, 0x01, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0f, 0x00, 0x00, 0x00, 0x6d, 0x73, 0x67, 0x73, 0x3a, 0x3a, 0x4c, 0x6f, 0x77, 0x53, 0x74, 0x61,
0x74, 0x65, 0x00, 0x00, 0x16, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x0c, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x0c, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x64, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x0c, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x64, 0x64, 0x71, 0x00,
0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x74, 0x61, 0x75, 0x5f, 0x65, 0x73, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x0c, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x74, 0x6d, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00,
0x22, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x90, 0xf3, 0x01, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x04, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x63, 0x6f, 0x6e, 0x74,
0x61, 0x63, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x01, 0x00, 0x09, 0x00, 0x08, 0x00, 0x00, 0x00, 0x76, 0x6f, 0x6c, 0x74, 0x61, 0x67, 0x65, 0x00,
0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00,
0x08, 0x00, 0x00, 0x00, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00,
0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x84, 0x20, 0x63, 0xda, 0x5c, 0x28, 0xbb,
0x27, 0x92, 0xe4, 0x1c, 0xce, 0x56, 0xbc, 0xf1, 0xd4, 0x69, 0x80, 0x35, 0xf5, 0x8b, 0x51, 0xea,
0x7f, 0x47, 0x3a, 0x7b, 0x09, 0x0f, };
return blob;
}
template<> inline const uint8_t * TopicTraits<::msgs::LowState>::type_info_blob() {
static const uint8_t blob[] = {
0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
0x14, 0x00, 0x00, 0x00, 0xf1, 0xd4, 0x69, 0x80, 0x35, 0xf5, 0x8b, 0x51, 0xea, 0x7f, 0x47, 0x3a,
0x7b, 0x09, 0x0f, 0x00, 0xdf, 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, 0x84, 0x20, 0x63, 0xda, 0x5c, 0x28, 0xbb, 0x27, 0x92, 0xe4, 0x1c,
0xce, 0x56, 0xbc, 0x00, 0x3e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, };
return blob;
}
#endif //DDSCXX_HAS_TYPE_DISCOVERY
} //namespace topic
} //namespace cyclonedds
} //namespace eclipse
} //namespace org
namespace dds {
namespace topic {
template <>
struct topic_type_name<::msgs::LowState>
{
static std::string value()
{
return org::eclipse::cyclonedds::topic::TopicTraits<::msgs::LowState>::getTypeName();
}
};
}
}
REGISTER_TOPIC_TYPE(::msgs::LowState)
namespace org{
namespace eclipse{
namespace cyclonedds{
namespace core{
namespace cdr{
template<>
propvec &get_type_props<::msgs::LowState>();
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
bool write(T& streamer, const ::msgs::LowState& instance, entity_properties_t *props) {
(void)instance;
if (!streamer.start_struct(*props))
return false;
auto prop = streamer.first_entity(props);
while (prop) {
switch (prop->m_id) {
case 0:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!write(streamer, instance.q()[0], instance.q().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 1:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!write(streamer, instance.dq()[0], instance.dq().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 2:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!write(streamer, instance.ddq()[0], instance.ddq().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 3:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!write(streamer, instance.tau_est()[0], instance.tau_est().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 4:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!write(streamer, instance.tmp()[0], instance.tmp().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 5:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!write(streamer, instance.contact()[0], instance.contact().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 6:
if (!streamer.start_member(*prop))
return false;
if (!write(streamer, instance.voltage()))
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 7:
if (!streamer.start_member(*prop))
return false;
if (!write(streamer, instance.current()))
return false;
if (!streamer.finish_member(*prop))
return false;
break;
}
prop = streamer.next_entity(prop);
}
return streamer.finish_struct(*props);
}
template<typename S, std::enable_if_t<std::is_base_of<cdr_stream, S>::value, bool> = true >
bool write(S& str, const ::msgs::LowState& instance, bool as_key) {
auto &props = get_type_props<::msgs::LowState>();
str.set_mode(cdr_stream::stream_mode::write, as_key);
return write(str, instance, props.data());
}
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
bool read(T& streamer, ::msgs::LowState& instance, entity_properties_t *props) {
(void)instance;
if (!streamer.start_struct(*props))
return false;
auto prop = streamer.first_entity(props);
while (prop) {
switch (prop->m_id) {
case 0:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!read(streamer, instance.q()[0], instance.q().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 1:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!read(streamer, instance.dq()[0], instance.dq().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 2:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!read(streamer, instance.ddq()[0], instance.ddq().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 3:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!read(streamer, instance.tau_est()[0], instance.tau_est().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 4:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!read(streamer, instance.tmp()[0], instance.tmp().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 5:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!read(streamer, instance.contact()[0], instance.contact().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 6:
if (!streamer.start_member(*prop))
return false;
if (!read(streamer, instance.voltage()))
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 7:
if (!streamer.start_member(*prop))
return false;
if (!read(streamer, instance.current()))
return false;
if (!streamer.finish_member(*prop))
return false;
break;
}
prop = streamer.next_entity(prop);
}
return streamer.finish_struct(*props);
}
template<typename S, std::enable_if_t<std::is_base_of<cdr_stream, S>::value, bool> = true >
bool read(S& str, ::msgs::LowState& instance, bool as_key) {
auto &props = get_type_props<::msgs::LowState>();
str.set_mode(cdr_stream::stream_mode::read, as_key);
return read(str, instance, props.data());
}
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
bool move(T& streamer, const ::msgs::LowState& instance, entity_properties_t *props) {
(void)instance;
if (!streamer.start_struct(*props))
return false;
auto prop = streamer.first_entity(props);
while (prop) {
switch (prop->m_id) {
case 0:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!move(streamer, instance.q()[0], instance.q().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 1:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!move(streamer, instance.dq()[0], instance.dq().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 2:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!move(streamer, instance.ddq()[0], instance.ddq().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 3:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!move(streamer, instance.tau_est()[0], instance.tau_est().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 4:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!move(streamer, instance.tmp()[0], instance.tmp().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 5:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!move(streamer, instance.contact()[0], instance.contact().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 6:
if (!streamer.start_member(*prop))
return false;
if (!move(streamer, instance.voltage()))
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 7:
if (!streamer.start_member(*prop))
return false;
if (!move(streamer, instance.current()))
return false;
if (!streamer.finish_member(*prop))
return false;
break;
}
prop = streamer.next_entity(prop);
}
return streamer.finish_struct(*props);
}
template<typename S, std::enable_if_t<std::is_base_of<cdr_stream, S>::value, bool> = true >
bool move(S& str, const ::msgs::LowState& instance, bool as_key) {
auto &props = get_type_props<::msgs::LowState>();
str.set_mode(cdr_stream::stream_mode::move, as_key);
return move(str, instance, props.data());
}
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
bool max(T& streamer, const ::msgs::LowState& instance, entity_properties_t *props) {
(void)instance;
if (!streamer.start_struct(*props))
return false;
auto prop = streamer.first_entity(props);
while (prop) {
switch (prop->m_id) {
case 0:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!max(streamer, instance.q()[0], instance.q().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 1:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!max(streamer, instance.dq()[0], instance.dq().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 2:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!max(streamer, instance.ddq()[0], instance.ddq().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 3:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!max(streamer, instance.tau_est()[0], instance.tau_est().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 4:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!max(streamer, instance.tmp()[0], instance.tmp().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 5:
if (!streamer.start_member(*prop))
return false;
if (!streamer.start_consecutive(true, true))
return false;
if (!max(streamer, instance.contact()[0], instance.contact().size()))
return false;
if (!streamer.finish_consecutive())
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 6:
if (!streamer.start_member(*prop))
return false;
if (!max(streamer, instance.voltage()))
return false;
if (!streamer.finish_member(*prop))
return false;
break;
case 7:
if (!streamer.start_member(*prop))
return false;
if (!max(streamer, instance.current()))
return false;
if (!streamer.finish_member(*prop))
return false;
break;
}
prop = streamer.next_entity(prop);
}
return streamer.finish_struct(*props);
}
template<typename S, std::enable_if_t<std::is_base_of<cdr_stream, S>::value, bool> = true >
bool max(S& str, const ::msgs::LowState& instance, bool as_key) {
auto &props = get_type_props<::msgs::LowState>();
str.set_mode(cdr_stream::stream_mode::max, as_key);
return max(str, instance, props.data());
}
} //namespace cdr
} //namespace core
} //namespace cyclonedds
} //namespace eclipse
} //namespace org
#endif // DDSCXX_LOWSTATE_HPP