4 #ifndef PROTOBUF_INCLUDED_jaiabot_2fmessages_2fhigh_5fcontrol_2eproto
5 #define PROTOBUF_INCLUDED_jaiabot_2fmessages_2fhigh_5fcontrol_2eproto
9 #include <google/protobuf/stubs/common.h>
11 #if GOOGLE_PROTOBUF_VERSION < 3006001
12 #error This file was generated by a newer version of protoc which is
13 #error incompatible with your Protocol Buffer headers. Please update
16 #if 3006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
17 #error This file was generated by an older version of protoc which is
18 #error incompatible with your Protocol Buffer headers. Please
19 #error regenerate this file with a newer version of protoc.
22 #include <google/protobuf/io/coded_stream.h>
23 #include <google/protobuf/arena.h>
24 #include <google/protobuf/arenastring.h>
25 #include <google/protobuf/generated_message_table_driven.h>
26 #include <google/protobuf/generated_message_util.h>
27 #include <google/protobuf/inlined_string_field.h>
28 #include <google/protobuf/metadata.h>
29 #include <google/protobuf/message.h>
30 #include <google/protobuf/repeated_field.h>
31 #include <google/protobuf/extension_set.h>
32 #include <google/protobuf/generated_enum_reflection.h>
33 #include <google/protobuf/unknown_field_set.h>
34 #include "dccl/option_extensions.pb.h"
35 #include "goby/middleware/protobuf/frontseat_data.pb.h"
37 #include <boost/units/quantity.hpp>
38 #include <boost/units/absolute.hpp>
39 #include <boost/units/dimensionless_type.hpp>
40 #include <boost/units/make_scaled_unit.hpp>
42 #include <boost/units/systems/angle/degrees.hpp>
44 #include <boost/units/systems/si.hpp>
46 #define PROTOBUF_INTERNAL_EXPORT_protobuf_jaiabot_2fmessages_2fhigh_5fcontrol_2eproto
51 static const ::google::protobuf::internal::ParseTableField
entries[];
52 static const ::google::protobuf::internal::AuxillaryParseTableField
aux[];
53 static const ::google::protobuf::internal::ParseTable
schema[2];
56 static const ::google::protobuf::uint32
offsets[];
62 class DesiredSetpoints;
63 class DesiredSetpointsDefaultTypeInternal;
66 class RemoteControlDefaultTypeInternal;
93 return ::google::protobuf::internal::NameOfEnum(
98 return ::google::protobuf::internal::ParseNamedEnum<SetpointType>(
117 *
this = ::std::move(from);
121 if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
122 if (
this != &from) InternalSwap(&from);
130 return _internal_metadata_.unknown_fields();
133 return _internal_metadata_.mutable_unknown_fields();
136 static const ::google::protobuf::Descriptor*
descriptor();
155 return CreateMaybeMessage<RemoteControl>(NULL);
159 return CreateMaybeMessage<RemoteControl>(arena);
161 void CopyFrom(const ::google::protobuf::Message& from)
final;
162 void MergeFrom(const ::google::protobuf::Message& from)
final;
170 ::
google::protobuf::io::CodedInputStream* input) final;
172 ::
google::protobuf::io::CodedOutputStream* output) const final;
174 bool deterministic, ::
google::protobuf::uint8* target) const final;
180 void SetCachedSize(
int size)
const final;
183 inline ::google::protobuf::Arena* GetArenaNoVirtual()
const {
186 inline void* MaybeArenaPtr()
const {
191 ::google::protobuf::Metadata
GetMetadata() const final;
215 double speed() const;
222 template<typename Quantity >
224 {
set_duration(boost::units::quantity<duration_unit,google::protobuf::int32 >(value_w_units).value() ); };
226 template<
typename Quantity >
231 {
return duration_with_units<boost::units::quantity< duration_unit,google::protobuf::int32 > >(); };
235 typedef boost::units::unit<heading_dimension,boost::units::degree::system>
heading_unit;
237 template<
typename Quantity >
239 {
set_heading(boost::units::quantity<heading_unit,double >(value_w_units).value() ); };
241 template<
typename Quantity >
246 {
return heading_with_units<boost::units::quantity< heading_unit,double > >(); };
248 typedef boost::mpl::divides<boost::units::length_dimension,boost::units::time_dimension>::type
speed_dimension;
250 typedef boost::units::unit<speed_dimension,boost::units::si::system>
speed_unit;
252 template<
typename Quantity >
254 {
set_speed(boost::units::quantity<speed_unit,double >(value_w_units).value() ); };
256 template<
typename Quantity >
261 {
return speed_with_units<boost::units::quantity< speed_unit,double > >(); };
265 void set_has_duration();
266 void clear_has_duration();
267 void set_has_heading();
268 void clear_has_heading();
269 void set_has_speed();
270 void clear_has_speed();
272 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
273 ::google::protobuf::internal::HasBits<1> _has_bits_;
274 mutable ::google::protobuf::internal::CachedSize _cached_size_;
275 ::google::protobuf::int32 duration_;
278 friend struct ::protobuf_jaiabot_2fmessages_2fhigh_5fcontrol_2eproto::TableStruct;
296 *
this = ::std::move(from);
300 if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
301 if (
this != &from) InternalSwap(&from);
309 return _internal_metadata_.unknown_fields();
312 return _internal_metadata_.mutable_unknown_fields();
315 static const ::google::protobuf::Descriptor*
descriptor();
342 return CreateMaybeMessage<DesiredSetpoints>(NULL);
346 return CreateMaybeMessage<DesiredSetpoints>(arena);
348 void CopyFrom(const ::google::protobuf::Message& from)
final;
349 void MergeFrom(const ::google::protobuf::Message& from)
final;
357 ::
google::protobuf::io::CodedInputStream* input) final;
359 ::
google::protobuf::io::CodedOutputStream* output) const final;
361 bool deterministic, ::
google::protobuf::uint8* target) const final;
367 void SetCachedSize(
int size)
const final;
370 inline ::google::protobuf::Arena* GetArenaNoVirtual()
const {
373 inline void* MaybeArenaPtr()
const {
378 ::google::protobuf::Metadata
GetMetadata() const final;
403 const ::
goby::middleware::frontseat::protobuf::DesiredCourse& _internal_helm_course() const;
405 const ::
goby::middleware::frontseat::protobuf::DesiredCourse&
helm_course() const;
442 template<typename Quantity >
444 {
set_dive_depth(boost::units::quantity<dive_depth_unit,double >(value_w_units).value() ); };
446 template<
typename Quantity >
451 {
return dive_depth_with_units<boost::units::quantity< dive_depth_unit,double > >(); };
456 void clear_has_type();
457 void set_has_helm_course();
458 void set_has_remote_control();
459 void set_has_dive_depth();
460 void set_has_throttle();
461 void set_has_is_helm_constant_course();
462 void clear_has_is_helm_constant_course();
464 inline bool has_setpoint_data()
const;
465 inline void clear_has_setpoint_data();
467 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
468 ::google::protobuf::internal::HasBits<1> _has_bits_;
469 mutable ::google::protobuf::internal::CachedSize _cached_size_;
471 bool is_helm_constant_course_;
472 union SetpointDataUnion {
473 SetpointDataUnion() {}
474 ::goby::middleware::frontseat::protobuf::DesiredCourse* helm_course_;
479 ::google::protobuf::uint32 _oneof_case_[1];
481 friend struct ::protobuf_jaiabot_2fmessages_2fhigh_5fcontrol_2eproto::TableStruct;
489 #pragma GCC diagnostic push
490 #pragma GCC diagnostic ignored "-Wstrict-aliasing"
496 return (_has_bits_[0] & 0x00000001u) != 0;
498 inline void RemoteControl::set_has_duration() {
499 _has_bits_[0] |= 0x00000001u;
501 inline void RemoteControl::clear_has_duration() {
502 _has_bits_[0] &= ~0x00000001u;
506 clear_has_duration();
520 return (_has_bits_[0] & 0x00000002u) != 0;
522 inline void RemoteControl::set_has_heading() {
523 _has_bits_[0] |= 0x00000002u;
525 inline void RemoteControl::clear_has_heading() {
526 _has_bits_[0] &= ~0x00000002u;
544 return (_has_bits_[0] & 0x00000004u) != 0;
546 inline void RemoteControl::set_has_speed() {
547 _has_bits_[0] |= 0x00000004u;
549 inline void RemoteControl::clear_has_speed() {
550 _has_bits_[0] &= ~0x00000004u;
572 return (_has_bits_[0] & 0x00000001u) != 0;
574 inline void DesiredSetpoints::set_has_type() {
575 _has_bits_[0] |= 0x00000001u;
577 inline void DesiredSetpoints::clear_has_type() {
578 _has_bits_[0] &= ~0x00000001u;
599 inline void DesiredSetpoints::set_has_helm_course() {
602 inline const ::goby::middleware::frontseat::protobuf::DesiredCourse& DesiredSetpoints::_internal_helm_course()
const {
603 return *setpoint_data_.helm_course_;
608 clear_has_setpoint_data();
609 ::goby::middleware::frontseat::protobuf::DesiredCourse* temp = setpoint_data_.helm_course_;
610 setpoint_data_.helm_course_ = NULL;
619 ? *setpoint_data_.helm_course_
620 : *
reinterpret_cast< ::goby::middleware::frontseat::protobuf::DesiredCourse*
>(&::goby::middleware::frontseat::protobuf::_DesiredCourse_default_instance_);
625 set_has_helm_course();
626 setpoint_data_.helm_course_ = CreateMaybeMessage< ::goby::middleware::frontseat::protobuf::DesiredCourse >(
627 GetArenaNoVirtual());
630 return setpoint_data_.helm_course_;
637 inline void DesiredSetpoints::set_has_remote_control() {
642 delete setpoint_data_.remote_control_;
643 clear_has_setpoint_data();
646 inline const ::jaiabot::protobuf::RemoteControl& DesiredSetpoints::_internal_remote_control()
const {
647 return *setpoint_data_.remote_control_;
652 clear_has_setpoint_data();
654 setpoint_data_.remote_control_ = NULL;
663 ? *setpoint_data_.remote_control_
669 set_has_remote_control();
670 setpoint_data_.remote_control_ = CreateMaybeMessage< ::jaiabot::protobuf::RemoteControl >(
671 GetArenaNoVirtual());
674 return setpoint_data_.remote_control_;
681 inline void DesiredSetpoints::set_has_dive_depth() {
686 setpoint_data_.dive_depth_ = 0;
687 clear_has_setpoint_data();
693 return setpoint_data_.dive_depth_;
700 set_has_dive_depth();
702 setpoint_data_.dive_depth_ = value;
710 inline void DesiredSetpoints::set_has_throttle() {
715 setpoint_data_.throttle_ = 0;
716 clear_has_setpoint_data();
722 return setpoint_data_.throttle_;
731 setpoint_data_.throttle_ = value;
737 return (_has_bits_[0] & 0x00000002u) != 0;
739 inline void DesiredSetpoints::set_has_is_helm_constant_course() {
740 _has_bits_[0] |= 0x00000002u;
742 inline void DesiredSetpoints::clear_has_is_helm_constant_course() {
743 _has_bits_[0] &= ~0x00000002u;
746 is_helm_constant_course_ =
false;
747 clear_has_is_helm_constant_course();
751 return is_helm_constant_course_;
754 set_has_is_helm_constant_course();
755 is_helm_constant_course_ = value;
759 inline bool DesiredSetpoints::has_setpoint_data()
const {
762 inline void DesiredSetpoints::clear_has_setpoint_data() {
769 #pragma GCC diagnostic pop
784 inline const EnumDescriptor* GetEnumDescriptor< ::jaiabot::protobuf::SetpointType>() {
793 #endif // PROTOBUF_INCLUDED_jaiabot_2fmessages_2fhigh_5fcontrol_2eproto