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;
94 return ::google::protobuf::internal::NameOfEnum(
99 return ::google::protobuf::internal::ParseNamedEnum<SetpointType>(
118 *
this = ::std::move(from);
122 if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
123 if (
this != &from) InternalSwap(&from);
131 return _internal_metadata_.unknown_fields();
134 return _internal_metadata_.mutable_unknown_fields();
137 static const ::google::protobuf::Descriptor*
descriptor();
156 return CreateMaybeMessage<RemoteControl>(NULL);
160 return CreateMaybeMessage<RemoteControl>(arena);
162 void CopyFrom(const ::google::protobuf::Message& from)
final;
163 void MergeFrom(const ::google::protobuf::Message& from)
final;
171 ::
google::protobuf::io::CodedInputStream* input) final;
173 ::
google::protobuf::io::CodedOutputStream* output) const final;
175 bool deterministic, ::
google::protobuf::uint8* target) const final;
181 void SetCachedSize(
int size)
const final;
184 inline ::google::protobuf::Arena* GetArenaNoVirtual()
const {
187 inline void* MaybeArenaPtr()
const {
192 ::google::protobuf::Metadata
GetMetadata() const final;
216 double speed() const;
223 template<typename Quantity >
225 {
set_duration(boost::units::quantity<duration_unit,google::protobuf::int32 >(value_w_units).value() ); };
227 template<
typename Quantity >
232 {
return duration_with_units<boost::units::quantity< duration_unit,google::protobuf::int32 > >(); };
236 typedef boost::units::unit<heading_dimension,boost::units::degree::system>
heading_unit;
238 template<
typename Quantity >
240 {
set_heading(boost::units::quantity<heading_unit,double >(value_w_units).value() ); };
242 template<
typename Quantity >
247 {
return heading_with_units<boost::units::quantity< heading_unit,double > >(); };
249 typedef boost::mpl::divides<boost::units::length_dimension,boost::units::time_dimension>::type
speed_dimension;
251 typedef boost::units::unit<speed_dimension,boost::units::si::system>
speed_unit;
253 template<
typename Quantity >
255 {
set_speed(boost::units::quantity<speed_unit,double >(value_w_units).value() ); };
257 template<
typename Quantity >
262 {
return speed_with_units<boost::units::quantity< speed_unit,double > >(); };
266 void set_has_duration();
267 void clear_has_duration();
268 void set_has_heading();
269 void clear_has_heading();
270 void set_has_speed();
271 void clear_has_speed();
273 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
274 ::google::protobuf::internal::HasBits<1> _has_bits_;
275 mutable ::google::protobuf::internal::CachedSize _cached_size_;
276 ::google::protobuf::int32 duration_;
279 friend struct ::protobuf_jaiabot_2fmessages_2fhigh_5fcontrol_2eproto::TableStruct;
297 *
this = ::std::move(from);
301 if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
302 if (
this != &from) InternalSwap(&from);
310 return _internal_metadata_.unknown_fields();
313 return _internal_metadata_.mutable_unknown_fields();
316 static const ::google::protobuf::Descriptor*
descriptor();
343 return CreateMaybeMessage<DesiredSetpoints>(NULL);
347 return CreateMaybeMessage<DesiredSetpoints>(arena);
349 void CopyFrom(const ::google::protobuf::Message& from)
final;
350 void MergeFrom(const ::google::protobuf::Message& from)
final;
358 ::
google::protobuf::io::CodedInputStream* input) final;
360 ::
google::protobuf::io::CodedOutputStream* output) const final;
362 bool deterministic, ::
google::protobuf::uint8* target) const final;
368 void SetCachedSize(
int size)
const final;
371 inline ::google::protobuf::Arena* GetArenaNoVirtual()
const {
374 inline void* MaybeArenaPtr()
const {
379 ::google::protobuf::Metadata
GetMetadata() const final;
404 const ::
goby::middleware::frontseat::protobuf::DesiredCourse& _internal_helm_course() const;
406 const ::
goby::middleware::frontseat::protobuf::DesiredCourse&
helm_course() const;
443 template<typename Quantity >
445 {
set_dive_depth(boost::units::quantity<dive_depth_unit,double >(value_w_units).value() ); };
447 template<
typename Quantity >
452 {
return dive_depth_with_units<boost::units::quantity< dive_depth_unit,double > >(); };
457 void clear_has_type();
458 void set_has_helm_course();
459 void set_has_remote_control();
460 void set_has_dive_depth();
461 void set_has_throttle();
462 void set_has_is_helm_constant_course();
463 void clear_has_is_helm_constant_course();
465 inline bool has_setpoint_data()
const;
466 inline void clear_has_setpoint_data();
468 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
469 ::google::protobuf::internal::HasBits<1> _has_bits_;
470 mutable ::google::protobuf::internal::CachedSize _cached_size_;
472 bool is_helm_constant_course_;
473 union SetpointDataUnion {
474 SetpointDataUnion() {}
475 ::goby::middleware::frontseat::protobuf::DesiredCourse* helm_course_;
480 ::google::protobuf::uint32 _oneof_case_[1];
482 friend struct ::protobuf_jaiabot_2fmessages_2fhigh_5fcontrol_2eproto::TableStruct;
490 #pragma GCC diagnostic push
491 #pragma GCC diagnostic ignored "-Wstrict-aliasing"
497 return (_has_bits_[0] & 0x00000001u) != 0;
499 inline void RemoteControl::set_has_duration() {
500 _has_bits_[0] |= 0x00000001u;
502 inline void RemoteControl::clear_has_duration() {
503 _has_bits_[0] &= ~0x00000001u;
507 clear_has_duration();
521 return (_has_bits_[0] & 0x00000002u) != 0;
523 inline void RemoteControl::set_has_heading() {
524 _has_bits_[0] |= 0x00000002u;
526 inline void RemoteControl::clear_has_heading() {
527 _has_bits_[0] &= ~0x00000002u;
545 return (_has_bits_[0] & 0x00000004u) != 0;
547 inline void RemoteControl::set_has_speed() {
548 _has_bits_[0] |= 0x00000004u;
550 inline void RemoteControl::clear_has_speed() {
551 _has_bits_[0] &= ~0x00000004u;
573 return (_has_bits_[0] & 0x00000001u) != 0;
575 inline void DesiredSetpoints::set_has_type() {
576 _has_bits_[0] |= 0x00000001u;
578 inline void DesiredSetpoints::clear_has_type() {
579 _has_bits_[0] &= ~0x00000001u;
600 inline void DesiredSetpoints::set_has_helm_course() {
603 inline const ::goby::middleware::frontseat::protobuf::DesiredCourse& DesiredSetpoints::_internal_helm_course()
const {
604 return *setpoint_data_.helm_course_;
609 clear_has_setpoint_data();
610 ::goby::middleware::frontseat::protobuf::DesiredCourse* temp = setpoint_data_.helm_course_;
611 setpoint_data_.helm_course_ = NULL;
620 ? *setpoint_data_.helm_course_
621 : *
reinterpret_cast< ::goby::middleware::frontseat::protobuf::DesiredCourse*
>(&::goby::middleware::frontseat::protobuf::_DesiredCourse_default_instance_);
626 set_has_helm_course();
627 setpoint_data_.helm_course_ = CreateMaybeMessage< ::goby::middleware::frontseat::protobuf::DesiredCourse >(
628 GetArenaNoVirtual());
631 return setpoint_data_.helm_course_;
638 inline void DesiredSetpoints::set_has_remote_control() {
643 delete setpoint_data_.remote_control_;
644 clear_has_setpoint_data();
647 inline const ::jaiabot::protobuf::RemoteControl& DesiredSetpoints::_internal_remote_control()
const {
648 return *setpoint_data_.remote_control_;
653 clear_has_setpoint_data();
655 setpoint_data_.remote_control_ = NULL;
664 ? *setpoint_data_.remote_control_
670 set_has_remote_control();
671 setpoint_data_.remote_control_ = CreateMaybeMessage< ::jaiabot::protobuf::RemoteControl >(
672 GetArenaNoVirtual());
675 return setpoint_data_.remote_control_;
682 inline void DesiredSetpoints::set_has_dive_depth() {
687 setpoint_data_.dive_depth_ = 0;
688 clear_has_setpoint_data();
694 return setpoint_data_.dive_depth_;
701 set_has_dive_depth();
703 setpoint_data_.dive_depth_ = value;
711 inline void DesiredSetpoints::set_has_throttle() {
716 setpoint_data_.throttle_ = 0;
717 clear_has_setpoint_data();
723 return setpoint_data_.throttle_;
732 setpoint_data_.throttle_ = value;
738 return (_has_bits_[0] & 0x00000002u) != 0;
740 inline void DesiredSetpoints::set_has_is_helm_constant_course() {
741 _has_bits_[0] |= 0x00000002u;
743 inline void DesiredSetpoints::clear_has_is_helm_constant_course() {
744 _has_bits_[0] &= ~0x00000002u;
747 is_helm_constant_course_ =
false;
748 clear_has_is_helm_constant_course();
752 return is_helm_constant_course_;
755 set_has_is_helm_constant_course();
756 is_helm_constant_course_ = value;
760 inline bool DesiredSetpoints::has_setpoint_data()
const {
763 inline void DesiredSetpoints::clear_has_setpoint_data() {
770 #pragma GCC diagnostic pop
785 inline const EnumDescriptor* GetEnumDescriptor< ::jaiabot::protobuf::SetpointType>() {
794 #endif // PROTOBUF_INCLUDED_jaiabot_2fmessages_2fhigh_5fcontrol_2eproto