4 #ifndef PROTOBUF_INCLUDED_gz_2fmsgs_2fbattery_5fstate_2eproto
5 #define PROTOBUF_INCLUDED_gz_2fmsgs_2fbattery_5fstate_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 "gz/msgs/header.pb.h"
36 #define PROTOBUF_INTERNAL_EXPORT_protobuf_gz_2fmsgs_2fbattery_5fstate_2eproto GZ_MSGS_VISIBLE
41 static const ::google::protobuf::internal::ParseTableField entries[];
42 static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
43 static const ::google::protobuf::internal::ParseTable schema[1];
44 static const ::google::protobuf::internal::FieldMetadata field_metadata[];
45 static const ::google::protobuf::internal::SerializationTable serialization_table[];
46 static const ::google::protobuf::uint32 offsets[];
53 class BatteryStateDefaultTypeInternal;
59 template<> GZ_MSGS_VISIBLE ::gz::msgs::BatteryState* Arena::CreateMaybeMessage<::gz::msgs::BatteryState>(Arena*);
81 return ::google::protobuf::internal::NameOfEnum(
86 return ::google::protobuf::internal::ParseNamedEnum<BatteryState_PowerSupplyStatus>(
91 class GZ_MSGS_VISIBLE
BatteryState :
public ::google::protobuf::Message {
105 *
this = ::std::move(from);
108 inline BatteryState& operator=(BatteryState&& from) noexcept {
109 if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
110 if (
this != &from) InternalSwap(&from);
117 static const ::google::protobuf::Descriptor* descriptor();
118 static const BatteryState& default_instance();
120 static void InitAsDefaultInstance();
125 static constexpr
int kIndexInFileMessages =
136 return CreateMaybeMessage<BatteryState>(NULL);
140 return CreateMaybeMessage<BatteryState>(arena);
142 void CopyFrom(const ::google::protobuf::Message& from)
final;
143 void MergeFrom(const ::google::protobuf::Message& from)
final;
147 bool IsInitialized() const final;
149 size_t ByteSizeLong() const final;
150 bool MergePartialFromCodedStream(
151 ::
google::protobuf::io::CodedInputStream* input) final;
152 void SerializeWithCachedSizes(
153 ::
google::protobuf::io::CodedOutputStream* output) const final;
154 ::
google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
155 bool deterministic, ::
google::protobuf::uint8* target) const final;
156 int GetCachedSize() const final {
return _cached_size_.Get(); }
161 void SetCachedSize(
int size)
const final;
164 inline ::google::protobuf::Arena* GetArenaNoVirtual()
const {
167 inline void* MaybeArenaPtr()
const {
172 ::google::protobuf::Metadata GetMetadata() const final;
187 static inline
bool PowerSupplyStatus_IsValid(
int value) {
194 static const int PowerSupplyStatus_ARRAYSIZE =
196 static inline const ::google::protobuf::EnumDescriptor*
211 bool has_header()
const;
213 static const int kHeaderFieldNumber = 1;
215 const ::gz::msgs::Header& _internal_header()
const;
217 const ::gz::msgs::Header& header()
const;
223 void clear_voltage();
224 static const int kVoltageFieldNumber = 2;
225 double voltage()
const;
226 void set_voltage(
double value);
229 void clear_current();
230 static const int kCurrentFieldNumber = 3;
231 double current()
const;
232 void set_current(
double value);
236 static const int kChargeFieldNumber = 4;
237 double charge()
const;
238 void set_charge(
double value);
241 void clear_capacity();
242 static const int kCapacityFieldNumber = 5;
243 double capacity()
const;
244 void set_capacity(
double value);
247 void clear_percentage();
248 static const int kPercentageFieldNumber = 6;
249 double percentage()
const;
250 void set_percentage(
double value);
253 void clear_power_supply_status();
254 static const int kPowerSupplyStatusFieldNumber = 7;
261 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
268 int power_supply_status_;
269 mutable ::google::protobuf::internal::CachedSize _cached_size_;
270 friend struct ::protobuf_gz_2fmsgs_2fbattery_5fstate_2eproto::TableStruct;
278 #pragma GCC diagnostic push
279 #pragma GCC diagnostic ignored "-Wstrict-aliasing"
287 inline const ::gz::msgs::Header& BatteryState::_internal_header()
const {
291 const ::gz::msgs::Header* p = header_;
305 if (header_ == NULL) {
306 auto* p = CreateMaybeMessage<::gz::msgs::Header>(GetArenaNoVirtual());
313 ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
314 if (message_arena == NULL) {
315 delete reinterpret_cast< ::google::protobuf::MessageLite*
>(header_);
318 ::google::protobuf::Arena* submessage_arena = NULL;
319 if (message_arena != submessage_arena) {
320 header = ::google::protobuf::internal::GetOwnedMessage(
321 message_arena,
header, submessage_arena);
403 power_supply_status_ = 0;
411 power_supply_status_ = value;
416 #pragma GCC diagnostic pop
429 inline const EnumDescriptor* GetEnumDescriptor< ::gz::msgs::BatteryState_PowerSupplyStatus>() {
438 #endif // PROTOBUF_INCLUDED_gz_2fmsgs_2fbattery_5fstate_2eproto