4 #ifndef PROTOBUF_INCLUDED_jaiabot_2fmessages_2fmotor_2eproto
5 #define PROTOBUF_INCLUDED_jaiabot_2fmessages_2fmotor_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 <boost/units/quantity.hpp>
36 #include <boost/units/absolute.hpp>
37 #include <boost/units/dimensionless_type.hpp>
38 #include <boost/units/make_scaled_unit.hpp>
40 #include <boost/units/systems/temperature/celsius.hpp>
42 #define PROTOBUF_INTERNAL_EXPORT_protobuf_jaiabot_2fmessages_2fmotor_2eproto
47 static const ::google::protobuf::internal::ParseTableField
entries[];
48 static const ::google::protobuf::internal::AuxillaryParseTableField
aux[];
49 static const ::google::protobuf::internal::ParseTable
schema[2];
52 static const ::google::protobuf::uint32
offsets[];
59 class MotorDefaultTypeInternal;
61 class Motor_Thermistor;
62 class Motor_ThermistorDefaultTypeInternal;
86 return ::google::protobuf::internal::NameOfEnum(
91 return ::google::protobuf::internal::ParseNamedEnum<MotorHarnessType>(
110 *
this = ::std::move(from);
114 if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
115 if (
this != &from) InternalSwap(&from);
123 return _internal_metadata_.unknown_fields();
126 return _internal_metadata_.mutable_unknown_fields();
129 static const ::google::protobuf::Descriptor*
descriptor();
148 return CreateMaybeMessage<Motor_Thermistor>(NULL);
152 return CreateMaybeMessage<Motor_Thermistor>(arena);
154 void CopyFrom(const ::google::protobuf::Message& from)
final;
155 void MergeFrom(const ::google::protobuf::Message& from)
final;
163 ::
google::protobuf::io::CodedInputStream* input) final;
165 ::
google::protobuf::io::CodedOutputStream* output) const final;
167 bool deterministic, ::
google::protobuf::uint8* target) const final;
173 void SetCachedSize(
int size)
const final;
176 inline ::google::protobuf::Arena* GetArenaNoVirtual()
const {
179 inline void* MaybeArenaPtr()
const {
184 ::google::protobuf::Metadata
GetMetadata() const final;
215 template<typename Quantity >
217 {
set_temperature(boost::units::quantity<temperature_unit,float >(value_w_units).value() ); };
219 template<
typename Quantity >
224 {
return temperature_with_units<boost::units::quantity< temperature_unit,float > >(); };
228 void set_has_temperature();
229 void clear_has_temperature();
230 void set_has_resistance();
231 void clear_has_resistance();
232 void set_has_voltage();
233 void clear_has_voltage();
235 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
236 ::google::protobuf::internal::HasBits<1> _has_bits_;
237 mutable ::google::protobuf::internal::CachedSize _cached_size_;
241 friend struct ::protobuf_jaiabot_2fmessages_2fmotor_2eproto::TableStruct;
245 class Motor :
public ::google::protobuf::Message {
259 *
this = ::std::move(from);
263 if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
264 if (
this != &from) InternalSwap(&from);
272 return _internal_metadata_.unknown_fields();
275 return _internal_metadata_.mutable_unknown_fields();
278 static const ::google::protobuf::Descriptor*
descriptor();
283 return reinterpret_cast<const Motor*
>(
297 return CreateMaybeMessage<Motor>(NULL);
300 Motor*
New(::google::protobuf::Arena* arena)
const final {
301 return CreateMaybeMessage<Motor>(arena);
303 void CopyFrom(const ::google::protobuf::Message& from)
final;
304 void MergeFrom(const ::google::protobuf::Message& from)
final;
312 ::
google::protobuf::io::CodedInputStream* input) final;
314 ::
google::protobuf::io::CodedOutputStream* output) const final;
316 bool deterministic, ::
google::protobuf::uint8* target) const final;
322 void SetCachedSize(
int size)
const final;
323 void InternalSwap(
Motor* other);
325 inline ::google::protobuf::Arena* GetArenaNoVirtual()
const {
328 inline void* MaybeArenaPtr()
const {
333 ::google::protobuf::Metadata
GetMetadata() const final;
370 void clear_has_rpm();
371 void set_has_thermistor();
372 void clear_has_thermistor();
373 void set_has_motor_harness_type();
374 void clear_has_motor_harness_type();
376 ::
google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
377 ::
google::protobuf::internal::HasBits<1> _has_bits_;
378 mutable ::
google::protobuf::internal::CachedSize _cached_size_;
381 int motor_harness_type_;
390 #pragma GCC diagnostic push
391 #pragma GCC diagnostic ignored "-Wstrict-aliasing"
397 return (_has_bits_[0] & 0x00000001u) != 0;
399 inline void Motor_Thermistor::set_has_temperature() {
400 _has_bits_[0] |= 0x00000001u;
402 inline void Motor_Thermistor::clear_has_temperature() {
403 _has_bits_[0] &= ~0x00000001u;
407 clear_has_temperature();
414 set_has_temperature();
415 temperature_ = value;
421 return (_has_bits_[0] & 0x00000002u) != 0;
423 inline void Motor_Thermistor::set_has_resistance() {
424 _has_bits_[0] |= 0x00000002u;
426 inline void Motor_Thermistor::clear_has_resistance() {
427 _has_bits_[0] &= ~0x00000002u;
431 clear_has_resistance();
438 set_has_resistance();
445 return (_has_bits_[0] & 0x00000004u) != 0;
447 inline void Motor_Thermistor::set_has_voltage() {
448 _has_bits_[0] |= 0x00000004u;
450 inline void Motor_Thermistor::clear_has_voltage() {
451 _has_bits_[0] &= ~0x00000004u;
473 return (_has_bits_[0] & 0x00000002u) != 0;
475 inline void Motor::set_has_rpm() {
476 _has_bits_[0] |= 0x00000002u;
478 inline void Motor::clear_has_rpm() {
479 _has_bits_[0] &= ~0x00000002u;
497 return (_has_bits_[0] & 0x00000001u) != 0;
499 inline void Motor::set_has_thermistor() {
500 _has_bits_[0] |= 0x00000001u;
502 inline void Motor::clear_has_thermistor() {
503 _has_bits_[0] &= ~0x00000001u;
506 if (thermistor_ != NULL) thermistor_->Clear();
507 clear_has_thermistor();
509 inline const ::jaiabot::protobuf::Motor_Thermistor& Motor::_internal_thermistor()
const {
513 const ::jaiabot::protobuf::Motor_Thermistor* p = thermistor_;
520 clear_has_thermistor();
526 set_has_thermistor();
527 if (thermistor_ == NULL) {
528 auto* p = CreateMaybeMessage<::jaiabot::protobuf::Motor_Thermistor>(GetArenaNoVirtual());
535 ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
536 if (message_arena == NULL) {
540 ::google::protobuf::Arena* submessage_arena = NULL;
541 if (message_arena != submessage_arena) {
542 thermistor = ::google::protobuf::internal::GetOwnedMessage(
545 set_has_thermistor();
547 clear_has_thermistor();
555 return (_has_bits_[0] & 0x00000004u) != 0;
557 inline void Motor::set_has_motor_harness_type() {
558 _has_bits_[0] |= 0x00000004u;
560 inline void Motor::clear_has_motor_harness_type() {
561 _has_bits_[0] &= ~0x00000004u;
564 motor_harness_type_ = 1;
565 clear_has_motor_harness_type();
573 set_has_motor_harness_type();
574 motor_harness_type_ = value;
579 #pragma GCC diagnostic pop
594 inline const EnumDescriptor* GetEnumDescriptor< ::jaiabot::protobuf::MotorHarnessType>() {
603 #endif // PROTOBUF_INCLUDED_jaiabot_2fmessages_2fmotor_2eproto