Skip to content

Commit 72cd480

Browse files
author
Sun Jiayun
committed
add idl hg SportModeState_
1 parent 2cd3023 commit 72cd480

File tree

3 files changed

+386
-0
lines changed

3 files changed

+386
-0
lines changed
Lines changed: 386 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,386 @@
1+
/****************************************************************
2+
3+
Generated by Eclipse Cyclone DDS IDL to CXX Translator
4+
File name: SportModeState_.idl
5+
Source: SportModeState_.hpp
6+
Cyclone DDS: v0.10.2
7+
8+
*****************************************************************/
9+
#ifndef DDSCXX_UNITREE_IDL_HG_SPORTMODESTATE__HPP
10+
#define DDSCXX_UNITREE_IDL_HG_SPORTMODESTATE__HPP
11+
12+
#include <cstdint>
13+
14+
namespace unitree_hg
15+
{
16+
namespace msg
17+
{
18+
namespace dds_
19+
{
20+
class SportModeState_
21+
{
22+
private:
23+
uint32_t fsm_id_ = 0;
24+
uint32_t fsm_mode_ = 0;
25+
uint32_t task_id_ = 0;
26+
float task_time_ = 0.0f;
27+
28+
public:
29+
SportModeState_() = default;
30+
31+
explicit SportModeState_(
32+
uint32_t fsm_id,
33+
uint32_t fsm_mode,
34+
uint32_t task_id,
35+
float task_time) :
36+
fsm_id_(fsm_id),
37+
fsm_mode_(fsm_mode),
38+
task_id_(task_id),
39+
task_time_(task_time) { }
40+
41+
uint32_t fsm_id() const { return this->fsm_id_; }
42+
uint32_t& fsm_id() { return this->fsm_id_; }
43+
void fsm_id(uint32_t _val_) { this->fsm_id_ = _val_; }
44+
uint32_t fsm_mode() const { return this->fsm_mode_; }
45+
uint32_t& fsm_mode() { return this->fsm_mode_; }
46+
void fsm_mode(uint32_t _val_) { this->fsm_mode_ = _val_; }
47+
uint32_t task_id() const { return this->task_id_; }
48+
uint32_t& task_id() { return this->task_id_; }
49+
void task_id(uint32_t _val_) { this->task_id_ = _val_; }
50+
float task_time() const { return this->task_time_; }
51+
float& task_time() { return this->task_time_; }
52+
void task_time(float _val_) { this->task_time_ = _val_; }
53+
54+
bool operator==(const SportModeState_& _other) const
55+
{
56+
(void) _other;
57+
return fsm_id_ == _other.fsm_id_ &&
58+
fsm_mode_ == _other.fsm_mode_ &&
59+
task_id_ == _other.task_id_ &&
60+
task_time_ == _other.task_time_;
61+
}
62+
63+
bool operator!=(const SportModeState_& _other) const
64+
{
65+
return !(*this == _other);
66+
}
67+
68+
};
69+
70+
}
71+
72+
}
73+
74+
}
75+
76+
#include "dds/topic/TopicTraits.hpp"
77+
#include "org/eclipse/cyclonedds/topic/datatopic.hpp"
78+
79+
namespace org {
80+
namespace eclipse {
81+
namespace cyclonedds {
82+
namespace topic {
83+
84+
template <> constexpr const char* TopicTraits<::unitree_hg::msg::dds_::SportModeState_>::getTypeName()
85+
{
86+
return "unitree_hg::msg::dds_::SportModeState_";
87+
}
88+
89+
template <> constexpr bool TopicTraits<::unitree_hg::msg::dds_::SportModeState_>::isKeyless()
90+
{
91+
return true;
92+
}
93+
94+
#ifdef DDSCXX_HAS_TYPE_DISCOVERY
95+
template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::SportModeState_>::type_map_blob_sz() { return 354; }
96+
template<> constexpr unsigned int TopicTraits<::unitree_hg::msg::dds_::SportModeState_>::type_info_blob_sz() { return 100; }
97+
template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::SportModeState_>::type_map_blob() {
98+
static const uint8_t blob[] = {
99+
0x6b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf1, 0x28, 0xcf, 0xd7, 0xf0, 0x1c, 0x80, 0xe8,
100+
0x28, 0xb3, 0x93, 0x6e, 0xf9, 0xad, 0xcd, 0x00, 0x53, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x01, 0x00,
101+
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
102+
0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x2d, 0xd6, 0x36, 0xc3, 0x00,
103+
0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x8d, 0x48, 0xe5, 0x3f, 0x00,
104+
0x0b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x57, 0x74, 0x6c, 0xc8, 0x00,
105+
0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x80, 0xea, 0xf8, 0x4c, 0x00,
106+
0xc8, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xf2, 0x8c, 0x32, 0xbb, 0x55, 0x6f, 0x4d, 0x30,
107+
0xa5, 0xcc, 0x29, 0x21, 0x14, 0x99, 0xd6, 0x00, 0xb0, 0x00, 0x00, 0x00, 0xf2, 0x51, 0x01, 0x00,
108+
0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x74,
109+
0x72, 0x65, 0x65, 0x5f, 0x68, 0x67, 0x3a, 0x3a, 0x6d, 0x73, 0x67, 0x3a, 0x3a, 0x64, 0x64, 0x73,
110+
0x5f, 0x3a, 0x3a, 0x53, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74,
111+
0x65, 0x5f, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00,
112+
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x66, 0x73, 0x6d, 0x5f,
113+
0x69, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
114+
0x01, 0x00, 0x07, 0x00, 0x09, 0x00, 0x00, 0x00, 0x66, 0x73, 0x6d, 0x5f, 0x6d, 0x6f, 0x64, 0x65,
115+
0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x00,
116+
0x08, 0x00, 0x00, 0x00, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00,
117+
0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x00, 0x0a, 0x00, 0x00, 0x00,
118+
0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00,
119+
0x01, 0x00, 0x00, 0x00, 0xf2, 0x8c, 0x32, 0xbb, 0x55, 0x6f, 0x4d, 0x30, 0xa5, 0xcc, 0x29, 0x21,
120+
0x14, 0x99, 0xd6, 0xf1, 0x28, 0xcf, 0xd7, 0xf0, 0x1c, 0x80, 0xe8, 0x28, 0xb3, 0x93, 0x6e, 0xf9,
121+
0xad, 0xcd, };
122+
return blob;
123+
}
124+
template<> inline const uint8_t * TopicTraits<::unitree_hg::msg::dds_::SportModeState_>::type_info_blob() {
125+
static const uint8_t blob[] = {
126+
0x60, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
127+
0x14, 0x00, 0x00, 0x00, 0xf1, 0x28, 0xcf, 0xd7, 0xf0, 0x1c, 0x80, 0xe8, 0x28, 0xb3, 0x93, 0x6e,
128+
0xf9, 0xad, 0xcd, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
129+
0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
130+
0x14, 0x00, 0x00, 0x00, 0xf2, 0x8c, 0x32, 0xbb, 0x55, 0x6f, 0x4d, 0x30, 0xa5, 0xcc, 0x29, 0x21,
131+
0x14, 0x99, 0xd6, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
132+
0x00, 0x00, 0x00, 0x00, };
133+
return blob;
134+
}
135+
#endif //DDSCXX_HAS_TYPE_DISCOVERY
136+
137+
} //namespace topic
138+
} //namespace cyclonedds
139+
} //namespace eclipse
140+
} //namespace org
141+
142+
namespace dds {
143+
namespace topic {
144+
145+
template <>
146+
struct topic_type_name<::unitree_hg::msg::dds_::SportModeState_>
147+
{
148+
static std::string value()
149+
{
150+
return org::eclipse::cyclonedds::topic::TopicTraits<::unitree_hg::msg::dds_::SportModeState_>::getTypeName();
151+
}
152+
};
153+
154+
}
155+
}
156+
157+
REGISTER_TOPIC_TYPE(::unitree_hg::msg::dds_::SportModeState_)
158+
159+
namespace org{
160+
namespace eclipse{
161+
namespace cyclonedds{
162+
namespace core{
163+
namespace cdr{
164+
165+
template<>
166+
propvec &get_type_props<::unitree_hg::msg::dds_::SportModeState_>();
167+
168+
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
169+
bool write(T& streamer, const ::unitree_hg::msg::dds_::SportModeState_& instance, entity_properties_t *props) {
170+
(void)instance;
171+
if (!streamer.start_struct(*props))
172+
return false;
173+
auto prop = streamer.first_entity(props);
174+
while (prop) {
175+
switch (prop->m_id) {
176+
case 0:
177+
if (!streamer.start_member(*prop))
178+
return false;
179+
if (!write(streamer, instance.fsm_id()))
180+
return false;
181+
if (!streamer.finish_member(*prop))
182+
return false;
183+
break;
184+
case 1:
185+
if (!streamer.start_member(*prop))
186+
return false;
187+
if (!write(streamer, instance.fsm_mode()))
188+
return false;
189+
if (!streamer.finish_member(*prop))
190+
return false;
191+
break;
192+
case 2:
193+
if (!streamer.start_member(*prop))
194+
return false;
195+
if (!write(streamer, instance.task_id()))
196+
return false;
197+
if (!streamer.finish_member(*prop))
198+
return false;
199+
break;
200+
case 3:
201+
if (!streamer.start_member(*prop))
202+
return false;
203+
if (!write(streamer, instance.task_time()))
204+
return false;
205+
if (!streamer.finish_member(*prop))
206+
return false;
207+
break;
208+
}
209+
prop = streamer.next_entity(prop);
210+
}
211+
return streamer.finish_struct(*props);
212+
}
213+
214+
template<typename S, std::enable_if_t<std::is_base_of<cdr_stream, S>::value, bool> = true >
215+
bool write(S& str, const ::unitree_hg::msg::dds_::SportModeState_& instance, bool as_key) {
216+
auto &props = get_type_props<::unitree_hg::msg::dds_::SportModeState_>();
217+
str.set_mode(cdr_stream::stream_mode::write, as_key);
218+
return write(str, instance, props.data());
219+
}
220+
221+
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
222+
bool read(T& streamer, ::unitree_hg::msg::dds_::SportModeState_& instance, entity_properties_t *props) {
223+
(void)instance;
224+
if (!streamer.start_struct(*props))
225+
return false;
226+
auto prop = streamer.first_entity(props);
227+
while (prop) {
228+
switch (prop->m_id) {
229+
case 0:
230+
if (!streamer.start_member(*prop))
231+
return false;
232+
if (!read(streamer, instance.fsm_id()))
233+
return false;
234+
if (!streamer.finish_member(*prop))
235+
return false;
236+
break;
237+
case 1:
238+
if (!streamer.start_member(*prop))
239+
return false;
240+
if (!read(streamer, instance.fsm_mode()))
241+
return false;
242+
if (!streamer.finish_member(*prop))
243+
return false;
244+
break;
245+
case 2:
246+
if (!streamer.start_member(*prop))
247+
return false;
248+
if (!read(streamer, instance.task_id()))
249+
return false;
250+
if (!streamer.finish_member(*prop))
251+
return false;
252+
break;
253+
case 3:
254+
if (!streamer.start_member(*prop))
255+
return false;
256+
if (!read(streamer, instance.task_time()))
257+
return false;
258+
if (!streamer.finish_member(*prop))
259+
return false;
260+
break;
261+
}
262+
prop = streamer.next_entity(prop);
263+
}
264+
return streamer.finish_struct(*props);
265+
}
266+
267+
template<typename S, std::enable_if_t<std::is_base_of<cdr_stream, S>::value, bool> = true >
268+
bool read(S& str, ::unitree_hg::msg::dds_::SportModeState_& instance, bool as_key) {
269+
auto &props = get_type_props<::unitree_hg::msg::dds_::SportModeState_>();
270+
str.set_mode(cdr_stream::stream_mode::read, as_key);
271+
return read(str, instance, props.data());
272+
}
273+
274+
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
275+
bool move(T& streamer, const ::unitree_hg::msg::dds_::SportModeState_& instance, entity_properties_t *props) {
276+
(void)instance;
277+
if (!streamer.start_struct(*props))
278+
return false;
279+
auto prop = streamer.first_entity(props);
280+
while (prop) {
281+
switch (prop->m_id) {
282+
case 0:
283+
if (!streamer.start_member(*prop))
284+
return false;
285+
if (!move(streamer, instance.fsm_id()))
286+
return false;
287+
if (!streamer.finish_member(*prop))
288+
return false;
289+
break;
290+
case 1:
291+
if (!streamer.start_member(*prop))
292+
return false;
293+
if (!move(streamer, instance.fsm_mode()))
294+
return false;
295+
if (!streamer.finish_member(*prop))
296+
return false;
297+
break;
298+
case 2:
299+
if (!streamer.start_member(*prop))
300+
return false;
301+
if (!move(streamer, instance.task_id()))
302+
return false;
303+
if (!streamer.finish_member(*prop))
304+
return false;
305+
break;
306+
case 3:
307+
if (!streamer.start_member(*prop))
308+
return false;
309+
if (!move(streamer, instance.task_time()))
310+
return false;
311+
if (!streamer.finish_member(*prop))
312+
return false;
313+
break;
314+
}
315+
prop = streamer.next_entity(prop);
316+
}
317+
return streamer.finish_struct(*props);
318+
}
319+
320+
template<typename S, std::enable_if_t<std::is_base_of<cdr_stream, S>::value, bool> = true >
321+
bool move(S& str, const ::unitree_hg::msg::dds_::SportModeState_& instance, bool as_key) {
322+
auto &props = get_type_props<::unitree_hg::msg::dds_::SportModeState_>();
323+
str.set_mode(cdr_stream::stream_mode::move, as_key);
324+
return move(str, instance, props.data());
325+
}
326+
327+
template<typename T, std::enable_if_t<std::is_base_of<cdr_stream, T>::value, bool> = true >
328+
bool max(T& streamer, const ::unitree_hg::msg::dds_::SportModeState_& instance, entity_properties_t *props) {
329+
(void)instance;
330+
if (!streamer.start_struct(*props))
331+
return false;
332+
auto prop = streamer.first_entity(props);
333+
while (prop) {
334+
switch (prop->m_id) {
335+
case 0:
336+
if (!streamer.start_member(*prop))
337+
return false;
338+
if (!max(streamer, instance.fsm_id()))
339+
return false;
340+
if (!streamer.finish_member(*prop))
341+
return false;
342+
break;
343+
case 1:
344+
if (!streamer.start_member(*prop))
345+
return false;
346+
if (!max(streamer, instance.fsm_mode()))
347+
return false;
348+
if (!streamer.finish_member(*prop))
349+
return false;
350+
break;
351+
case 2:
352+
if (!streamer.start_member(*prop))
353+
return false;
354+
if (!max(streamer, instance.task_id()))
355+
return false;
356+
if (!streamer.finish_member(*prop))
357+
return false;
358+
break;
359+
case 3:
360+
if (!streamer.start_member(*prop))
361+
return false;
362+
if (!max(streamer, instance.task_time()))
363+
return false;
364+
if (!streamer.finish_member(*prop))
365+
return false;
366+
break;
367+
}
368+
prop = streamer.next_entity(prop);
369+
}
370+
return streamer.finish_struct(*props);
371+
}
372+
373+
template<typename S, std::enable_if_t<std::is_base_of<cdr_stream, S>::value, bool> = true >
374+
bool max(S& str, const ::unitree_hg::msg::dds_::SportModeState_& instance, bool as_key) {
375+
auto &props = get_type_props<::unitree_hg::msg::dds_::SportModeState_>();
376+
str.set_mode(cdr_stream::stream_mode::max, as_key);
377+
return max(str, instance, props.data());
378+
}
379+
380+
} //namespace cdr
381+
} //namespace core
382+
} //namespace cyclonedds
383+
} //namespace eclipse
384+
} //namespace org
385+
386+
#endif // DDSCXX_UNITREE_IDL_HG_SPORTMODESTATE__HPP

lib/aarch64/libunitree_sdk2.a

101 KB
Binary file not shown.

lib/x86_64/libunitree_sdk2.a

96 KB
Binary file not shown.

0 commit comments

Comments
 (0)