plc_message.pb.h 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: plc_message.proto
  3. #ifndef PROTOBUF_plc_5fmessage_2eproto__INCLUDED
  4. #define PROTOBUF_plc_5fmessage_2eproto__INCLUDED
  5. #include <string>
  6. #include <google/protobuf/stubs/common.h>
  7. #if GOOGLE_PROTOBUF_VERSION < 3005000
  8. #error This file was generated by a newer version of protoc which is
  9. #error incompatible with your Protocol Buffer headers. Please update
  10. #error your headers.
  11. #endif
  12. #if 3005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
  13. #error This file was generated by an older version of protoc which is
  14. #error incompatible with your Protocol Buffer headers. Please
  15. #error regenerate this file with a newer version of protoc.
  16. #endif
  17. #include <google/protobuf/io/coded_stream.h>
  18. #include <google/protobuf/arena.h>
  19. #include <google/protobuf/arenastring.h>
  20. #include <google/protobuf/generated_message_table_driven.h>
  21. #include <google/protobuf/generated_message_util.h>
  22. #include <google/protobuf/metadata.h>
  23. #include <google/protobuf/message.h>
  24. #include <google/protobuf/repeated_field.h> // IWYU pragma: export
  25. #include <google/protobuf/extension_set.h> // IWYU pragma: export
  26. #include <google/protobuf/generated_enum_reflection.h>
  27. #include <google/protobuf/unknown_field_set.h>
  28. // @@protoc_insertion_point(includes)
  29. namespace protobuf_plc_5fmessage_2eproto {
  30. // Internal implementation detail -- do not use these members.
  31. struct TableStruct {
  32. static const ::google::protobuf::internal::ParseTableField entries[];
  33. static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
  34. static const ::google::protobuf::internal::ParseTable schema[1];
  35. static const ::google::protobuf::internal::FieldMetadata field_metadata[];
  36. static const ::google::protobuf::internal::SerializationTable serialization_table[];
  37. static const ::google::protobuf::uint32 offsets[];
  38. };
  39. void AddDescriptors();
  40. void InitDefaultsplcMsgImpl();
  41. void InitDefaultsplcMsg();
  42. inline void InitDefaults() {
  43. InitDefaultsplcMsg();
  44. }
  45. } // namespace protobuf_plc_5fmessage_2eproto
  46. namespace plc_message {
  47. class plcMsg;
  48. class plcMsgDefaultTypeInternal;
  49. extern plcMsgDefaultTypeInternal _plcMsg_default_instance_;
  50. } // namespace plc_message
  51. namespace plc_message {
  52. enum plcStatus {
  53. ePLCConnected = 0,
  54. ePLCDisconnected = 1,
  55. ePLCRefused = 2,
  56. ePLCUnknown = 3
  57. };
  58. bool plcStatus_IsValid(int value);
  59. const plcStatus plcStatus_MIN = ePLCConnected;
  60. const plcStatus plcStatus_MAX = ePLCUnknown;
  61. const int plcStatus_ARRAYSIZE = plcStatus_MAX + 1;
  62. const ::google::protobuf::EnumDescriptor* plcStatus_descriptor();
  63. inline const ::std::string& plcStatus_Name(plcStatus value) {
  64. return ::google::protobuf::internal::NameOfEnum(
  65. plcStatus_descriptor(), value);
  66. }
  67. inline bool plcStatus_Parse(
  68. const ::std::string& name, plcStatus* value) {
  69. return ::google::protobuf::internal::ParseNamedEnum<plcStatus>(
  70. plcStatus_descriptor(), name, value);
  71. }
  72. // ===================================================================
  73. class plcMsg : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:plc_message.plcMsg) */ {
  74. public:
  75. plcMsg();
  76. virtual ~plcMsg();
  77. plcMsg(const plcMsg& from);
  78. inline plcMsg& operator=(const plcMsg& from) {
  79. CopyFrom(from);
  80. return *this;
  81. }
  82. #if LANG_CXX11
  83. plcMsg(plcMsg&& from) noexcept
  84. : plcMsg() {
  85. *this = ::std::move(from);
  86. }
  87. inline plcMsg& operator=(plcMsg&& from) noexcept {
  88. if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
  89. if (this != &from) InternalSwap(&from);
  90. } else {
  91. CopyFrom(from);
  92. }
  93. return *this;
  94. }
  95. #endif
  96. inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
  97. return _internal_metadata_.unknown_fields();
  98. }
  99. inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
  100. return _internal_metadata_.mutable_unknown_fields();
  101. }
  102. static const ::google::protobuf::Descriptor* descriptor();
  103. static const plcMsg& default_instance();
  104. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  105. static inline const plcMsg* internal_default_instance() {
  106. return reinterpret_cast<const plcMsg*>(
  107. &_plcMsg_default_instance_);
  108. }
  109. static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
  110. 0;
  111. void Swap(plcMsg* other);
  112. friend void swap(plcMsg& a, plcMsg& b) {
  113. a.Swap(&b);
  114. }
  115. // implements Message ----------------------------------------------
  116. inline plcMsg* New() const PROTOBUF_FINAL { return New(NULL); }
  117. plcMsg* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
  118. void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
  119. void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
  120. void CopyFrom(const plcMsg& from);
  121. void MergeFrom(const plcMsg& from);
  122. void Clear() PROTOBUF_FINAL;
  123. bool IsInitialized() const PROTOBUF_FINAL;
  124. size_t ByteSizeLong() const PROTOBUF_FINAL;
  125. bool MergePartialFromCodedStream(
  126. ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
  127. void SerializeWithCachedSizes(
  128. ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
  129. ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
  130. bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
  131. int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
  132. private:
  133. void SharedCtor();
  134. void SharedDtor();
  135. void SetCachedSize(int size) const PROTOBUF_FINAL;
  136. void InternalSwap(plcMsg* other);
  137. private:
  138. inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
  139. return NULL;
  140. }
  141. inline void* MaybeArenaPtr() const {
  142. return NULL;
  143. }
  144. public:
  145. ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
  146. // nested types ----------------------------------------------------
  147. // accessors -------------------------------------------------------
  148. // repeated int32 plc_values = 2;
  149. int plc_values_size() const;
  150. void clear_plc_values();
  151. static const int kPlcValuesFieldNumber = 2;
  152. ::google::protobuf::int32 plc_values(int index) const;
  153. void set_plc_values(int index, ::google::protobuf::int32 value);
  154. void add_plc_values(::google::protobuf::int32 value);
  155. const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
  156. plc_values() const;
  157. ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
  158. mutable_plc_values();
  159. // optional .plc_message.plcStatus plc_status = 1;
  160. bool has_plc_status() const;
  161. void clear_plc_status();
  162. static const int kPlcStatusFieldNumber = 1;
  163. ::plc_message::plcStatus plc_status() const;
  164. void set_plc_status(::plc_message::plcStatus value);
  165. // @@protoc_insertion_point(class_scope:plc_message.plcMsg)
  166. private:
  167. void set_has_plc_status();
  168. void clear_has_plc_status();
  169. ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  170. ::google::protobuf::internal::HasBits<1> _has_bits_;
  171. mutable int _cached_size_;
  172. ::google::protobuf::RepeatedField< ::google::protobuf::int32 > plc_values_;
  173. int plc_status_;
  174. friend struct ::protobuf_plc_5fmessage_2eproto::TableStruct;
  175. friend void ::protobuf_plc_5fmessage_2eproto::InitDefaultsplcMsgImpl();
  176. };
  177. // ===================================================================
  178. // ===================================================================
  179. #ifdef __GNUC__
  180. #pragma GCC diagnostic push
  181. #pragma GCC diagnostic ignored "-Wstrict-aliasing"
  182. #endif // __GNUC__
  183. // plcMsg
  184. // optional .plc_message.plcStatus plc_status = 1;
  185. inline bool plcMsg::has_plc_status() const {
  186. return (_has_bits_[0] & 0x00000001u) != 0;
  187. }
  188. inline void plcMsg::set_has_plc_status() {
  189. _has_bits_[0] |= 0x00000001u;
  190. }
  191. inline void plcMsg::clear_has_plc_status() {
  192. _has_bits_[0] &= ~0x00000001u;
  193. }
  194. inline void plcMsg::clear_plc_status() {
  195. plc_status_ = 0;
  196. clear_has_plc_status();
  197. }
  198. inline ::plc_message::plcStatus plcMsg::plc_status() const {
  199. // @@protoc_insertion_point(field_get:plc_message.plcMsg.plc_status)
  200. return static_cast< ::plc_message::plcStatus >(plc_status_);
  201. }
  202. inline void plcMsg::set_plc_status(::plc_message::plcStatus value) {
  203. assert(::plc_message::plcStatus_IsValid(value));
  204. set_has_plc_status();
  205. plc_status_ = value;
  206. // @@protoc_insertion_point(field_set:plc_message.plcMsg.plc_status)
  207. }
  208. // repeated int32 plc_values = 2;
  209. inline int plcMsg::plc_values_size() const {
  210. return plc_values_.size();
  211. }
  212. inline void plcMsg::clear_plc_values() {
  213. plc_values_.Clear();
  214. }
  215. inline ::google::protobuf::int32 plcMsg::plc_values(int index) const {
  216. // @@protoc_insertion_point(field_get:plc_message.plcMsg.plc_values)
  217. return plc_values_.Get(index);
  218. }
  219. inline void plcMsg::set_plc_values(int index, ::google::protobuf::int32 value) {
  220. plc_values_.Set(index, value);
  221. // @@protoc_insertion_point(field_set:plc_message.plcMsg.plc_values)
  222. }
  223. inline void plcMsg::add_plc_values(::google::protobuf::int32 value) {
  224. plc_values_.Add(value);
  225. // @@protoc_insertion_point(field_add:plc_message.plcMsg.plc_values)
  226. }
  227. inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
  228. plcMsg::plc_values() const {
  229. // @@protoc_insertion_point(field_list:plc_message.plcMsg.plc_values)
  230. return plc_values_;
  231. }
  232. inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
  233. plcMsg::mutable_plc_values() {
  234. // @@protoc_insertion_point(field_mutable_list:plc_message.plcMsg.plc_values)
  235. return &plc_values_;
  236. }
  237. #ifdef __GNUC__
  238. #pragma GCC diagnostic pop
  239. #endif // __GNUC__
  240. // @@protoc_insertion_point(namespace_scope)
  241. } // namespace plc_message
  242. namespace google {
  243. namespace protobuf {
  244. template <> struct is_proto_enum< ::plc_message::plcStatus> : ::google::protobuf::internal::true_type {};
  245. template <>
  246. inline const EnumDescriptor* GetEnumDescriptor< ::plc_message::plcStatus>() {
  247. return ::plc_message::plcStatus_descriptor();
  248. }
  249. } // namespace protobuf
  250. } // namespace google
  251. // @@protoc_insertion_point(global_scope)
  252. #endif // PROTOBUF_plc_5fmessage_2eproto__INCLUDED