mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
Removed modules from the simulation infrastructure and refactored FRCPlugin.
Pneumatics still have CAN modules. The refactored code is now eight plugins for sensors and actuators. There is some code reuse that should be refactored out, but that level of abstraction will wait until we figure out how these plugins are integrating with gazebo proper. Change-Id: I357e695ef05af6dda83a39ba60380686bd57d11a Closes: artf2610, artf2623
This commit is contained in:
committed by
Alex Henning
parent
3b4718fc92
commit
8ae64a12ea
310
simulation/frc_gazebo_plugins/msgs/src/msgs/bool.pb.cc
Normal file
310
simulation/frc_gazebo_plugins/msgs/src/msgs/bool.pb.cc
Normal file
@@ -0,0 +1,310 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: msgs/bool.proto
|
||||
|
||||
#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
|
||||
#include "msgs/bool.pb.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <google/protobuf/stubs/common.h>
|
||||
#include <google/protobuf/stubs/once.h>
|
||||
#include <google/protobuf/io/coded_stream.h>
|
||||
#include <google/protobuf/wire_format_lite_inl.h>
|
||||
#include <google/protobuf/descriptor.h>
|
||||
#include <google/protobuf/generated_message_reflection.h>
|
||||
#include <google/protobuf/reflection_ops.h>
|
||||
#include <google/protobuf/wire_format.h>
|
||||
// @@protoc_insertion_point(includes)
|
||||
|
||||
namespace gazebo {
|
||||
namespace msgs {
|
||||
|
||||
namespace {
|
||||
|
||||
const ::google::protobuf::Descriptor* Bool_descriptor_ = NULL;
|
||||
const ::google::protobuf::internal::GeneratedMessageReflection*
|
||||
Bool_reflection_ = NULL;
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
void protobuf_AssignDesc_msgs_2fbool_2eproto() {
|
||||
protobuf_AddDesc_msgs_2fbool_2eproto();
|
||||
const ::google::protobuf::FileDescriptor* file =
|
||||
::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
|
||||
"msgs/bool.proto");
|
||||
GOOGLE_CHECK(file != NULL);
|
||||
Bool_descriptor_ = file->message_type(0);
|
||||
static const int Bool_offsets_[1] = {
|
||||
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Bool, data_),
|
||||
};
|
||||
Bool_reflection_ =
|
||||
new ::google::protobuf::internal::GeneratedMessageReflection(
|
||||
Bool_descriptor_,
|
||||
Bool::default_instance_,
|
||||
Bool_offsets_,
|
||||
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Bool, _has_bits_[0]),
|
||||
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Bool, _unknown_fields_),
|
||||
-1,
|
||||
::google::protobuf::DescriptorPool::generated_pool(),
|
||||
::google::protobuf::MessageFactory::generated_factory(),
|
||||
sizeof(Bool));
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
|
||||
inline void protobuf_AssignDescriptorsOnce() {
|
||||
::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
|
||||
&protobuf_AssignDesc_msgs_2fbool_2eproto);
|
||||
}
|
||||
|
||||
void protobuf_RegisterTypes(const ::std::string&) {
|
||||
protobuf_AssignDescriptorsOnce();
|
||||
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
|
||||
Bool_descriptor_, &Bool::default_instance());
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
void protobuf_ShutdownFile_msgs_2fbool_2eproto() {
|
||||
delete Bool::default_instance_;
|
||||
delete Bool_reflection_;
|
||||
}
|
||||
|
||||
void protobuf_AddDesc_msgs_2fbool_2eproto() {
|
||||
static bool already_here = false;
|
||||
if (already_here) return;
|
||||
already_here = true;
|
||||
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
||||
|
||||
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
|
||||
"\n\017msgs/bool.proto\022\013gazebo.msgs\"\024\n\004Bool\022\014"
|
||||
"\n\004data\030\001 \002(\010B\010B\006GzBool", 62);
|
||||
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
|
||||
"msgs/bool.proto", &protobuf_RegisterTypes);
|
||||
Bool::default_instance_ = new Bool();
|
||||
Bool::default_instance_->InitAsDefaultInstance();
|
||||
::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_msgs_2fbool_2eproto);
|
||||
}
|
||||
|
||||
// Force AddDescriptors() to be called at static initialization time.
|
||||
struct StaticDescriptorInitializer_msgs_2fbool_2eproto {
|
||||
StaticDescriptorInitializer_msgs_2fbool_2eproto() {
|
||||
protobuf_AddDesc_msgs_2fbool_2eproto();
|
||||
}
|
||||
} static_descriptor_initializer_msgs_2fbool_2eproto_;
|
||||
|
||||
// ===================================================================
|
||||
|
||||
#ifndef _MSC_VER
|
||||
const int Bool::kDataFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
|
||||
Bool::Bool()
|
||||
: ::google::protobuf::Message() {
|
||||
SharedCtor();
|
||||
}
|
||||
|
||||
void Bool::InitAsDefaultInstance() {
|
||||
}
|
||||
|
||||
Bool::Bool(const Bool& from)
|
||||
: ::google::protobuf::Message() {
|
||||
SharedCtor();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
void Bool::SharedCtor() {
|
||||
_cached_size_ = 0;
|
||||
data_ = false;
|
||||
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
||||
}
|
||||
|
||||
Bool::~Bool() {
|
||||
SharedDtor();
|
||||
}
|
||||
|
||||
void Bool::SharedDtor() {
|
||||
if (this != default_instance_) {
|
||||
}
|
||||
}
|
||||
|
||||
void Bool::SetCachedSize(int size) const {
|
||||
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
||||
_cached_size_ = size;
|
||||
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
||||
}
|
||||
const ::google::protobuf::Descriptor* Bool::descriptor() {
|
||||
protobuf_AssignDescriptorsOnce();
|
||||
return Bool_descriptor_;
|
||||
}
|
||||
|
||||
const Bool& Bool::default_instance() {
|
||||
if (default_instance_ == NULL) protobuf_AddDesc_msgs_2fbool_2eproto();
|
||||
return *default_instance_;
|
||||
}
|
||||
|
||||
Bool* Bool::default_instance_ = NULL;
|
||||
|
||||
Bool* Bool::New() const {
|
||||
return new Bool;
|
||||
}
|
||||
|
||||
void Bool::Clear() {
|
||||
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
||||
data_ = false;
|
||||
}
|
||||
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
||||
mutable_unknown_fields()->Clear();
|
||||
}
|
||||
|
||||
bool Bool::MergePartialFromCodedStream(
|
||||
::google::protobuf::io::CodedInputStream* input) {
|
||||
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
|
||||
::google::protobuf::uint32 tag;
|
||||
while ((tag = input->ReadTag()) != 0) {
|
||||
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
||||
// required bool data = 1;
|
||||
case 1: {
|
||||
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
||||
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
|
||||
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
||||
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
|
||||
input, &data_)));
|
||||
set_has_data();
|
||||
} else {
|
||||
goto handle_uninterpreted;
|
||||
}
|
||||
if (input->ExpectAtEnd()) return true;
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
handle_uninterpreted:
|
||||
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
||||
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
|
||||
return true;
|
||||
}
|
||||
DO_(::google::protobuf::internal::WireFormat::SkipField(
|
||||
input, tag, mutable_unknown_fields()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
#undef DO_
|
||||
}
|
||||
|
||||
void Bool::SerializeWithCachedSizes(
|
||||
::google::protobuf::io::CodedOutputStream* output) const {
|
||||
// required bool data = 1;
|
||||
if (has_data()) {
|
||||
::google::protobuf::internal::WireFormatLite::WriteBool(1, this->data(), output);
|
||||
}
|
||||
|
||||
if (!unknown_fields().empty()) {
|
||||
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
||||
unknown_fields(), output);
|
||||
}
|
||||
}
|
||||
|
||||
::google::protobuf::uint8* Bool::SerializeWithCachedSizesToArray(
|
||||
::google::protobuf::uint8* target) const {
|
||||
// required bool data = 1;
|
||||
if (has_data()) {
|
||||
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->data(), target);
|
||||
}
|
||||
|
||||
if (!unknown_fields().empty()) {
|
||||
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
||||
unknown_fields(), target);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
int Bool::ByteSize() const {
|
||||
int total_size = 0;
|
||||
|
||||
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
||||
// required bool data = 1;
|
||||
if (has_data()) {
|
||||
total_size += 1 + 1;
|
||||
}
|
||||
|
||||
}
|
||||
if (!unknown_fields().empty()) {
|
||||
total_size +=
|
||||
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
||||
unknown_fields());
|
||||
}
|
||||
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
||||
_cached_size_ = total_size;
|
||||
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
||||
return total_size;
|
||||
}
|
||||
|
||||
void Bool::MergeFrom(const ::google::protobuf::Message& from) {
|
||||
GOOGLE_CHECK_NE(&from, this);
|
||||
const Bool* source =
|
||||
::google::protobuf::internal::dynamic_cast_if_available<const Bool*>(
|
||||
&from);
|
||||
if (source == NULL) {
|
||||
::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
||||
} else {
|
||||
MergeFrom(*source);
|
||||
}
|
||||
}
|
||||
|
||||
void Bool::MergeFrom(const Bool& from) {
|
||||
GOOGLE_CHECK_NE(&from, this);
|
||||
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
||||
if (from.has_data()) {
|
||||
set_data(from.data());
|
||||
}
|
||||
}
|
||||
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
|
||||
}
|
||||
|
||||
void Bool::CopyFrom(const ::google::protobuf::Message& from) {
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
void Bool::CopyFrom(const Bool& from) {
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
bool Bool::IsInitialized() const {
|
||||
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Bool::Swap(Bool* other) {
|
||||
if (other != this) {
|
||||
std::swap(data_, other->data_);
|
||||
std::swap(_has_bits_[0], other->_has_bits_[0]);
|
||||
_unknown_fields_.Swap(&other->_unknown_fields_);
|
||||
std::swap(_cached_size_, other->_cached_size_);
|
||||
}
|
||||
}
|
||||
|
||||
::google::protobuf::Metadata Bool::GetMetadata() const {
|
||||
protobuf_AssignDescriptorsOnce();
|
||||
::google::protobuf::Metadata metadata;
|
||||
metadata.descriptor = Bool_descriptor_;
|
||||
metadata.reflection = Bool_reflection_;
|
||||
return metadata;
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
|
||||
} // namespace msgs
|
||||
} // namespace gazebo
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
||||
167
simulation/frc_gazebo_plugins/msgs/src/msgs/bool.pb.h
Normal file
167
simulation/frc_gazebo_plugins/msgs/src/msgs/bool.pb.h
Normal file
@@ -0,0 +1,167 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: msgs/bool.proto
|
||||
|
||||
#ifndef PROTOBUF_msgs_2fbool_2eproto__INCLUDED
|
||||
#define PROTOBUF_msgs_2fbool_2eproto__INCLUDED
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <google/protobuf/stubs/common.h>
|
||||
|
||||
#if GOOGLE_PROTOBUF_VERSION < 2005000
|
||||
#error This file was generated by a newer version of protoc which is
|
||||
#error incompatible with your Protocol Buffer headers. Please update
|
||||
#error your headers.
|
||||
#endif
|
||||
#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
|
||||
#error This file was generated by an older version of protoc which is
|
||||
#error incompatible with your Protocol Buffer headers. Please
|
||||
#error regenerate this file with a newer version of protoc.
|
||||
#endif
|
||||
|
||||
#include <google/protobuf/generated_message_util.h>
|
||||
#include <google/protobuf/message.h>
|
||||
#include <google/protobuf/repeated_field.h>
|
||||
#include <google/protobuf/extension_set.h>
|
||||
#include <google/protobuf/unknown_field_set.h>
|
||||
// @@protoc_insertion_point(includes)
|
||||
|
||||
namespace gazebo {
|
||||
namespace msgs {
|
||||
|
||||
// Internal implementation detail -- do not call these.
|
||||
void protobuf_AddDesc_msgs_2fbool_2eproto();
|
||||
void protobuf_AssignDesc_msgs_2fbool_2eproto();
|
||||
void protobuf_ShutdownFile_msgs_2fbool_2eproto();
|
||||
|
||||
class Bool;
|
||||
|
||||
// ===================================================================
|
||||
|
||||
class Bool : public ::google::protobuf::Message {
|
||||
public:
|
||||
Bool();
|
||||
virtual ~Bool();
|
||||
|
||||
Bool(const Bool& from);
|
||||
|
||||
inline Bool& operator=(const Bool& from) {
|
||||
CopyFrom(from);
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
|
||||
return _unknown_fields_;
|
||||
}
|
||||
|
||||
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
|
||||
return &_unknown_fields_;
|
||||
}
|
||||
|
||||
static const ::google::protobuf::Descriptor* descriptor();
|
||||
static const Bool& default_instance();
|
||||
|
||||
void Swap(Bool* other);
|
||||
|
||||
// implements Message ----------------------------------------------
|
||||
|
||||
Bool* New() const;
|
||||
void CopyFrom(const ::google::protobuf::Message& from);
|
||||
void MergeFrom(const ::google::protobuf::Message& from);
|
||||
void CopyFrom(const Bool& from);
|
||||
void MergeFrom(const Bool& from);
|
||||
void Clear();
|
||||
bool IsInitialized() const;
|
||||
|
||||
int ByteSize() const;
|
||||
bool MergePartialFromCodedStream(
|
||||
::google::protobuf::io::CodedInputStream* input);
|
||||
void SerializeWithCachedSizes(
|
||||
::google::protobuf::io::CodedOutputStream* output) const;
|
||||
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
|
||||
int GetCachedSize() const { return _cached_size_; }
|
||||
private:
|
||||
void SharedCtor();
|
||||
void SharedDtor();
|
||||
void SetCachedSize(int size) const;
|
||||
public:
|
||||
|
||||
::google::protobuf::Metadata GetMetadata() const;
|
||||
|
||||
// nested types ----------------------------------------------------
|
||||
|
||||
// accessors -------------------------------------------------------
|
||||
|
||||
// required bool data = 1;
|
||||
inline bool has_data() const;
|
||||
inline void clear_data();
|
||||
static const int kDataFieldNumber = 1;
|
||||
inline bool data() const;
|
||||
inline void set_data(bool value);
|
||||
|
||||
// @@protoc_insertion_point(class_scope:gazebo.msgs.Bool)
|
||||
private:
|
||||
inline void set_has_data();
|
||||
inline void clear_has_data();
|
||||
|
||||
::google::protobuf::UnknownFieldSet _unknown_fields_;
|
||||
|
||||
bool data_;
|
||||
|
||||
mutable int _cached_size_;
|
||||
::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
|
||||
|
||||
friend void protobuf_AddDesc_msgs_2fbool_2eproto();
|
||||
friend void protobuf_AssignDesc_msgs_2fbool_2eproto();
|
||||
friend void protobuf_ShutdownFile_msgs_2fbool_2eproto();
|
||||
|
||||
void InitAsDefaultInstance();
|
||||
static Bool* default_instance_;
|
||||
};
|
||||
// ===================================================================
|
||||
|
||||
|
||||
// ===================================================================
|
||||
|
||||
// Bool
|
||||
|
||||
// required bool data = 1;
|
||||
inline bool Bool::has_data() const {
|
||||
return (_has_bits_[0] & 0x00000001u) != 0;
|
||||
}
|
||||
inline void Bool::set_has_data() {
|
||||
_has_bits_[0] |= 0x00000001u;
|
||||
}
|
||||
inline void Bool::clear_has_data() {
|
||||
_has_bits_[0] &= ~0x00000001u;
|
||||
}
|
||||
inline void Bool::clear_data() {
|
||||
data_ = false;
|
||||
clear_has_data();
|
||||
}
|
||||
inline bool Bool::data() const {
|
||||
return data_;
|
||||
}
|
||||
inline void Bool::set_data(bool value) {
|
||||
set_has_data();
|
||||
data_ = value;
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
|
||||
} // namespace msgs
|
||||
} // namespace gazebo
|
||||
|
||||
#ifndef SWIG
|
||||
namespace google {
|
||||
namespace protobuf {
|
||||
|
||||
|
||||
} // namespace google
|
||||
} // namespace protobuf
|
||||
#endif // SWIG
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
||||
|
||||
#endif // PROTOBUF_msgs_2fbool_2eproto__INCLUDED
|
||||
385
simulation/frc_gazebo_plugins/msgs/src/msgs/driver-station.pb.cc
Normal file
385
simulation/frc_gazebo_plugins/msgs/src/msgs/driver-station.pb.cc
Normal file
@@ -0,0 +1,385 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: msgs/driver-station.proto
|
||||
|
||||
#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
|
||||
#include "msgs/driver-station.pb.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <google/protobuf/stubs/common.h>
|
||||
#include <google/protobuf/stubs/once.h>
|
||||
#include <google/protobuf/io/coded_stream.h>
|
||||
#include <google/protobuf/wire_format_lite_inl.h>
|
||||
#include <google/protobuf/descriptor.h>
|
||||
#include <google/protobuf/generated_message_reflection.h>
|
||||
#include <google/protobuf/reflection_ops.h>
|
||||
#include <google/protobuf/wire_format.h>
|
||||
// @@protoc_insertion_point(includes)
|
||||
|
||||
namespace gazebo {
|
||||
namespace msgs {
|
||||
|
||||
namespace {
|
||||
|
||||
const ::google::protobuf::Descriptor* DriverStation_descriptor_ = NULL;
|
||||
const ::google::protobuf::internal::GeneratedMessageReflection*
|
||||
DriverStation_reflection_ = NULL;
|
||||
const ::google::protobuf::EnumDescriptor* DriverStation_State_descriptor_ = NULL;
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
void protobuf_AssignDesc_msgs_2fdriver_2dstation_2eproto() {
|
||||
protobuf_AddDesc_msgs_2fdriver_2dstation_2eproto();
|
||||
const ::google::protobuf::FileDescriptor* file =
|
||||
::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
|
||||
"msgs/driver-station.proto");
|
||||
GOOGLE_CHECK(file != NULL);
|
||||
DriverStation_descriptor_ = file->message_type(0);
|
||||
static const int DriverStation_offsets_[2] = {
|
||||
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DriverStation, enabled_),
|
||||
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DriverStation, state_),
|
||||
};
|
||||
DriverStation_reflection_ =
|
||||
new ::google::protobuf::internal::GeneratedMessageReflection(
|
||||
DriverStation_descriptor_,
|
||||
DriverStation::default_instance_,
|
||||
DriverStation_offsets_,
|
||||
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DriverStation, _has_bits_[0]),
|
||||
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DriverStation, _unknown_fields_),
|
||||
-1,
|
||||
::google::protobuf::DescriptorPool::generated_pool(),
|
||||
::google::protobuf::MessageFactory::generated_factory(),
|
||||
sizeof(DriverStation));
|
||||
DriverStation_State_descriptor_ = DriverStation_descriptor_->enum_type(0);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
|
||||
inline void protobuf_AssignDescriptorsOnce() {
|
||||
::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
|
||||
&protobuf_AssignDesc_msgs_2fdriver_2dstation_2eproto);
|
||||
}
|
||||
|
||||
void protobuf_RegisterTypes(const ::std::string&) {
|
||||
protobuf_AssignDescriptorsOnce();
|
||||
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
|
||||
DriverStation_descriptor_, &DriverStation::default_instance());
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
void protobuf_ShutdownFile_msgs_2fdriver_2dstation_2eproto() {
|
||||
delete DriverStation::default_instance_;
|
||||
delete DriverStation_reflection_;
|
||||
}
|
||||
|
||||
void protobuf_AddDesc_msgs_2fdriver_2dstation_2eproto() {
|
||||
static bool already_here = false;
|
||||
if (already_here) return;
|
||||
already_here = true;
|
||||
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
||||
|
||||
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
|
||||
"\n\031msgs/driver-station.proto\022\013gazebo.msgs"
|
||||
"\"z\n\rDriverStation\022\017\n\007enabled\030\001 \002(\010\022/\n\005st"
|
||||
"ate\030\002 \002(\0162 .gazebo.msgs.DriverStation.St"
|
||||
"ate\"\'\n\005State\022\010\n\004AUTO\020\000\022\n\n\006TELEOP\020\001\022\010\n\004TE"
|
||||
"ST\020\002B\021B\017GzDriverStation", 183);
|
||||
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
|
||||
"msgs/driver-station.proto", &protobuf_RegisterTypes);
|
||||
DriverStation::default_instance_ = new DriverStation();
|
||||
DriverStation::default_instance_->InitAsDefaultInstance();
|
||||
::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_msgs_2fdriver_2dstation_2eproto);
|
||||
}
|
||||
|
||||
// Force AddDescriptors() to be called at static initialization time.
|
||||
struct StaticDescriptorInitializer_msgs_2fdriver_2dstation_2eproto {
|
||||
StaticDescriptorInitializer_msgs_2fdriver_2dstation_2eproto() {
|
||||
protobuf_AddDesc_msgs_2fdriver_2dstation_2eproto();
|
||||
}
|
||||
} static_descriptor_initializer_msgs_2fdriver_2dstation_2eproto_;
|
||||
|
||||
// ===================================================================
|
||||
|
||||
const ::google::protobuf::EnumDescriptor* DriverStation_State_descriptor() {
|
||||
protobuf_AssignDescriptorsOnce();
|
||||
return DriverStation_State_descriptor_;
|
||||
}
|
||||
bool DriverStation_State_IsValid(int value) {
|
||||
switch(value) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef _MSC_VER
|
||||
const DriverStation_State DriverStation::AUTO;
|
||||
const DriverStation_State DriverStation::TELEOP;
|
||||
const DriverStation_State DriverStation::TEST;
|
||||
const DriverStation_State DriverStation::State_MIN;
|
||||
const DriverStation_State DriverStation::State_MAX;
|
||||
const int DriverStation::State_ARRAYSIZE;
|
||||
#endif // _MSC_VER
|
||||
#ifndef _MSC_VER
|
||||
const int DriverStation::kEnabledFieldNumber;
|
||||
const int DriverStation::kStateFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
|
||||
DriverStation::DriverStation()
|
||||
: ::google::protobuf::Message() {
|
||||
SharedCtor();
|
||||
}
|
||||
|
||||
void DriverStation::InitAsDefaultInstance() {
|
||||
}
|
||||
|
||||
DriverStation::DriverStation(const DriverStation& from)
|
||||
: ::google::protobuf::Message() {
|
||||
SharedCtor();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
void DriverStation::SharedCtor() {
|
||||
_cached_size_ = 0;
|
||||
enabled_ = false;
|
||||
state_ = 0;
|
||||
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
||||
}
|
||||
|
||||
DriverStation::~DriverStation() {
|
||||
SharedDtor();
|
||||
}
|
||||
|
||||
void DriverStation::SharedDtor() {
|
||||
if (this != default_instance_) {
|
||||
}
|
||||
}
|
||||
|
||||
void DriverStation::SetCachedSize(int size) const {
|
||||
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
||||
_cached_size_ = size;
|
||||
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
||||
}
|
||||
const ::google::protobuf::Descriptor* DriverStation::descriptor() {
|
||||
protobuf_AssignDescriptorsOnce();
|
||||
return DriverStation_descriptor_;
|
||||
}
|
||||
|
||||
const DriverStation& DriverStation::default_instance() {
|
||||
if (default_instance_ == NULL) protobuf_AddDesc_msgs_2fdriver_2dstation_2eproto();
|
||||
return *default_instance_;
|
||||
}
|
||||
|
||||
DriverStation* DriverStation::default_instance_ = NULL;
|
||||
|
||||
DriverStation* DriverStation::New() const {
|
||||
return new DriverStation;
|
||||
}
|
||||
|
||||
void DriverStation::Clear() {
|
||||
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
||||
enabled_ = false;
|
||||
state_ = 0;
|
||||
}
|
||||
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
||||
mutable_unknown_fields()->Clear();
|
||||
}
|
||||
|
||||
bool DriverStation::MergePartialFromCodedStream(
|
||||
::google::protobuf::io::CodedInputStream* input) {
|
||||
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
|
||||
::google::protobuf::uint32 tag;
|
||||
while ((tag = input->ReadTag()) != 0) {
|
||||
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
||||
// required bool enabled = 1;
|
||||
case 1: {
|
||||
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
||||
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
|
||||
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
||||
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
|
||||
input, &enabled_)));
|
||||
set_has_enabled();
|
||||
} else {
|
||||
goto handle_uninterpreted;
|
||||
}
|
||||
if (input->ExpectTag(16)) goto parse_state;
|
||||
break;
|
||||
}
|
||||
|
||||
// required .gazebo.msgs.DriverStation.State state = 2;
|
||||
case 2: {
|
||||
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
||||
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
|
||||
parse_state:
|
||||
int value;
|
||||
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
||||
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
|
||||
input, &value)));
|
||||
if (::gazebo::msgs::DriverStation_State_IsValid(value)) {
|
||||
set_state(static_cast< ::gazebo::msgs::DriverStation_State >(value));
|
||||
} else {
|
||||
mutable_unknown_fields()->AddVarint(2, value);
|
||||
}
|
||||
} else {
|
||||
goto handle_uninterpreted;
|
||||
}
|
||||
if (input->ExpectAtEnd()) return true;
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
handle_uninterpreted:
|
||||
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
||||
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
|
||||
return true;
|
||||
}
|
||||
DO_(::google::protobuf::internal::WireFormat::SkipField(
|
||||
input, tag, mutable_unknown_fields()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
#undef DO_
|
||||
}
|
||||
|
||||
void DriverStation::SerializeWithCachedSizes(
|
||||
::google::protobuf::io::CodedOutputStream* output) const {
|
||||
// required bool enabled = 1;
|
||||
if (has_enabled()) {
|
||||
::google::protobuf::internal::WireFormatLite::WriteBool(1, this->enabled(), output);
|
||||
}
|
||||
|
||||
// required .gazebo.msgs.DriverStation.State state = 2;
|
||||
if (has_state()) {
|
||||
::google::protobuf::internal::WireFormatLite::WriteEnum(
|
||||
2, this->state(), output);
|
||||
}
|
||||
|
||||
if (!unknown_fields().empty()) {
|
||||
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
||||
unknown_fields(), output);
|
||||
}
|
||||
}
|
||||
|
||||
::google::protobuf::uint8* DriverStation::SerializeWithCachedSizesToArray(
|
||||
::google::protobuf::uint8* target) const {
|
||||
// required bool enabled = 1;
|
||||
if (has_enabled()) {
|
||||
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->enabled(), target);
|
||||
}
|
||||
|
||||
// required .gazebo.msgs.DriverStation.State state = 2;
|
||||
if (has_state()) {
|
||||
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
|
||||
2, this->state(), target);
|
||||
}
|
||||
|
||||
if (!unknown_fields().empty()) {
|
||||
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
||||
unknown_fields(), target);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
int DriverStation::ByteSize() const {
|
||||
int total_size = 0;
|
||||
|
||||
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
||||
// required bool enabled = 1;
|
||||
if (has_enabled()) {
|
||||
total_size += 1 + 1;
|
||||
}
|
||||
|
||||
// required .gazebo.msgs.DriverStation.State state = 2;
|
||||
if (has_state()) {
|
||||
total_size += 1 +
|
||||
::google::protobuf::internal::WireFormatLite::EnumSize(this->state());
|
||||
}
|
||||
|
||||
}
|
||||
if (!unknown_fields().empty()) {
|
||||
total_size +=
|
||||
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
||||
unknown_fields());
|
||||
}
|
||||
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
||||
_cached_size_ = total_size;
|
||||
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
||||
return total_size;
|
||||
}
|
||||
|
||||
void DriverStation::MergeFrom(const ::google::protobuf::Message& from) {
|
||||
GOOGLE_CHECK_NE(&from, this);
|
||||
const DriverStation* source =
|
||||
::google::protobuf::internal::dynamic_cast_if_available<const DriverStation*>(
|
||||
&from);
|
||||
if (source == NULL) {
|
||||
::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
||||
} else {
|
||||
MergeFrom(*source);
|
||||
}
|
||||
}
|
||||
|
||||
void DriverStation::MergeFrom(const DriverStation& from) {
|
||||
GOOGLE_CHECK_NE(&from, this);
|
||||
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
||||
if (from.has_enabled()) {
|
||||
set_enabled(from.enabled());
|
||||
}
|
||||
if (from.has_state()) {
|
||||
set_state(from.state());
|
||||
}
|
||||
}
|
||||
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
|
||||
}
|
||||
|
||||
void DriverStation::CopyFrom(const ::google::protobuf::Message& from) {
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
void DriverStation::CopyFrom(const DriverStation& from) {
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
bool DriverStation::IsInitialized() const {
|
||||
if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void DriverStation::Swap(DriverStation* other) {
|
||||
if (other != this) {
|
||||
std::swap(enabled_, other->enabled_);
|
||||
std::swap(state_, other->state_);
|
||||
std::swap(_has_bits_[0], other->_has_bits_[0]);
|
||||
_unknown_fields_.Swap(&other->_unknown_fields_);
|
||||
std::swap(_cached_size_, other->_cached_size_);
|
||||
}
|
||||
}
|
||||
|
||||
::google::protobuf::Metadata DriverStation::GetMetadata() const {
|
||||
protobuf_AssignDescriptorsOnce();
|
||||
::google::protobuf::Metadata metadata;
|
||||
metadata.descriptor = DriverStation_descriptor_;
|
||||
metadata.reflection = DriverStation_reflection_;
|
||||
return metadata;
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
|
||||
} // namespace msgs
|
||||
} // namespace gazebo
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
||||
250
simulation/frc_gazebo_plugins/msgs/src/msgs/driver-station.pb.h
Normal file
250
simulation/frc_gazebo_plugins/msgs/src/msgs/driver-station.pb.h
Normal file
@@ -0,0 +1,250 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: msgs/driver-station.proto
|
||||
|
||||
#ifndef PROTOBUF_msgs_2fdriver_2dstation_2eproto__INCLUDED
|
||||
#define PROTOBUF_msgs_2fdriver_2dstation_2eproto__INCLUDED
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <google/protobuf/stubs/common.h>
|
||||
|
||||
#if GOOGLE_PROTOBUF_VERSION < 2005000
|
||||
#error This file was generated by a newer version of protoc which is
|
||||
#error incompatible with your Protocol Buffer headers. Please update
|
||||
#error your headers.
|
||||
#endif
|
||||
#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
|
||||
#error This file was generated by an older version of protoc which is
|
||||
#error incompatible with your Protocol Buffer headers. Please
|
||||
#error regenerate this file with a newer version of protoc.
|
||||
#endif
|
||||
|
||||
#include <google/protobuf/generated_message_util.h>
|
||||
#include <google/protobuf/message.h>
|
||||
#include <google/protobuf/repeated_field.h>
|
||||
#include <google/protobuf/extension_set.h>
|
||||
#include <google/protobuf/generated_enum_reflection.h>
|
||||
#include <google/protobuf/unknown_field_set.h>
|
||||
// @@protoc_insertion_point(includes)
|
||||
|
||||
namespace gazebo {
|
||||
namespace msgs {
|
||||
|
||||
// Internal implementation detail -- do not call these.
|
||||
void protobuf_AddDesc_msgs_2fdriver_2dstation_2eproto();
|
||||
void protobuf_AssignDesc_msgs_2fdriver_2dstation_2eproto();
|
||||
void protobuf_ShutdownFile_msgs_2fdriver_2dstation_2eproto();
|
||||
|
||||
class DriverStation;
|
||||
|
||||
enum DriverStation_State {
|
||||
DriverStation_State_AUTO = 0,
|
||||
DriverStation_State_TELEOP = 1,
|
||||
DriverStation_State_TEST = 2
|
||||
};
|
||||
bool DriverStation_State_IsValid(int value);
|
||||
const DriverStation_State DriverStation_State_State_MIN = DriverStation_State_AUTO;
|
||||
const DriverStation_State DriverStation_State_State_MAX = DriverStation_State_TEST;
|
||||
const int DriverStation_State_State_ARRAYSIZE = DriverStation_State_State_MAX + 1;
|
||||
|
||||
const ::google::protobuf::EnumDescriptor* DriverStation_State_descriptor();
|
||||
inline const ::std::string& DriverStation_State_Name(DriverStation_State value) {
|
||||
return ::google::protobuf::internal::NameOfEnum(
|
||||
DriverStation_State_descriptor(), value);
|
||||
}
|
||||
inline bool DriverStation_State_Parse(
|
||||
const ::std::string& name, DriverStation_State* value) {
|
||||
return ::google::protobuf::internal::ParseNamedEnum<DriverStation_State>(
|
||||
DriverStation_State_descriptor(), name, value);
|
||||
}
|
||||
// ===================================================================
|
||||
|
||||
class DriverStation : public ::google::protobuf::Message {
|
||||
public:
|
||||
DriverStation();
|
||||
virtual ~DriverStation();
|
||||
|
||||
DriverStation(const DriverStation& from);
|
||||
|
||||
inline DriverStation& operator=(const DriverStation& from) {
|
||||
CopyFrom(from);
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
|
||||
return _unknown_fields_;
|
||||
}
|
||||
|
||||
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
|
||||
return &_unknown_fields_;
|
||||
}
|
||||
|
||||
static const ::google::protobuf::Descriptor* descriptor();
|
||||
static const DriverStation& default_instance();
|
||||
|
||||
void Swap(DriverStation* other);
|
||||
|
||||
// implements Message ----------------------------------------------
|
||||
|
||||
DriverStation* New() const;
|
||||
void CopyFrom(const ::google::protobuf::Message& from);
|
||||
void MergeFrom(const ::google::protobuf::Message& from);
|
||||
void CopyFrom(const DriverStation& from);
|
||||
void MergeFrom(const DriverStation& from);
|
||||
void Clear();
|
||||
bool IsInitialized() const;
|
||||
|
||||
int ByteSize() const;
|
||||
bool MergePartialFromCodedStream(
|
||||
::google::protobuf::io::CodedInputStream* input);
|
||||
void SerializeWithCachedSizes(
|
||||
::google::protobuf::io::CodedOutputStream* output) const;
|
||||
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
|
||||
int GetCachedSize() const { return _cached_size_; }
|
||||
private:
|
||||
void SharedCtor();
|
||||
void SharedDtor();
|
||||
void SetCachedSize(int size) const;
|
||||
public:
|
||||
|
||||
::google::protobuf::Metadata GetMetadata() const;
|
||||
|
||||
// nested types ----------------------------------------------------
|
||||
|
||||
typedef DriverStation_State State;
|
||||
static const State AUTO = DriverStation_State_AUTO;
|
||||
static const State TELEOP = DriverStation_State_TELEOP;
|
||||
static const State TEST = DriverStation_State_TEST;
|
||||
static inline bool State_IsValid(int value) {
|
||||
return DriverStation_State_IsValid(value);
|
||||
}
|
||||
static const State State_MIN =
|
||||
DriverStation_State_State_MIN;
|
||||
static const State State_MAX =
|
||||
DriverStation_State_State_MAX;
|
||||
static const int State_ARRAYSIZE =
|
||||
DriverStation_State_State_ARRAYSIZE;
|
||||
static inline const ::google::protobuf::EnumDescriptor*
|
||||
State_descriptor() {
|
||||
return DriverStation_State_descriptor();
|
||||
}
|
||||
static inline const ::std::string& State_Name(State value) {
|
||||
return DriverStation_State_Name(value);
|
||||
}
|
||||
static inline bool State_Parse(const ::std::string& name,
|
||||
State* value) {
|
||||
return DriverStation_State_Parse(name, value);
|
||||
}
|
||||
|
||||
// accessors -------------------------------------------------------
|
||||
|
||||
// required bool enabled = 1;
|
||||
inline bool has_enabled() const;
|
||||
inline void clear_enabled();
|
||||
static const int kEnabledFieldNumber = 1;
|
||||
inline bool enabled() const;
|
||||
inline void set_enabled(bool value);
|
||||
|
||||
// required .gazebo.msgs.DriverStation.State state = 2;
|
||||
inline bool has_state() const;
|
||||
inline void clear_state();
|
||||
static const int kStateFieldNumber = 2;
|
||||
inline ::gazebo::msgs::DriverStation_State state() const;
|
||||
inline void set_state(::gazebo::msgs::DriverStation_State value);
|
||||
|
||||
// @@protoc_insertion_point(class_scope:gazebo.msgs.DriverStation)
|
||||
private:
|
||||
inline void set_has_enabled();
|
||||
inline void clear_has_enabled();
|
||||
inline void set_has_state();
|
||||
inline void clear_has_state();
|
||||
|
||||
::google::protobuf::UnknownFieldSet _unknown_fields_;
|
||||
|
||||
bool enabled_;
|
||||
int state_;
|
||||
|
||||
mutable int _cached_size_;
|
||||
::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
|
||||
|
||||
friend void protobuf_AddDesc_msgs_2fdriver_2dstation_2eproto();
|
||||
friend void protobuf_AssignDesc_msgs_2fdriver_2dstation_2eproto();
|
||||
friend void protobuf_ShutdownFile_msgs_2fdriver_2dstation_2eproto();
|
||||
|
||||
void InitAsDefaultInstance();
|
||||
static DriverStation* default_instance_;
|
||||
};
|
||||
// ===================================================================
|
||||
|
||||
|
||||
// ===================================================================
|
||||
|
||||
// DriverStation
|
||||
|
||||
// required bool enabled = 1;
|
||||
inline bool DriverStation::has_enabled() const {
|
||||
return (_has_bits_[0] & 0x00000001u) != 0;
|
||||
}
|
||||
inline void DriverStation::set_has_enabled() {
|
||||
_has_bits_[0] |= 0x00000001u;
|
||||
}
|
||||
inline void DriverStation::clear_has_enabled() {
|
||||
_has_bits_[0] &= ~0x00000001u;
|
||||
}
|
||||
inline void DriverStation::clear_enabled() {
|
||||
enabled_ = false;
|
||||
clear_has_enabled();
|
||||
}
|
||||
inline bool DriverStation::enabled() const {
|
||||
return enabled_;
|
||||
}
|
||||
inline void DriverStation::set_enabled(bool value) {
|
||||
set_has_enabled();
|
||||
enabled_ = value;
|
||||
}
|
||||
|
||||
// required .gazebo.msgs.DriverStation.State state = 2;
|
||||
inline bool DriverStation::has_state() const {
|
||||
return (_has_bits_[0] & 0x00000002u) != 0;
|
||||
}
|
||||
inline void DriverStation::set_has_state() {
|
||||
_has_bits_[0] |= 0x00000002u;
|
||||
}
|
||||
inline void DriverStation::clear_has_state() {
|
||||
_has_bits_[0] &= ~0x00000002u;
|
||||
}
|
||||
inline void DriverStation::clear_state() {
|
||||
state_ = 0;
|
||||
clear_has_state();
|
||||
}
|
||||
inline ::gazebo::msgs::DriverStation_State DriverStation::state() const {
|
||||
return static_cast< ::gazebo::msgs::DriverStation_State >(state_);
|
||||
}
|
||||
inline void DriverStation::set_state(::gazebo::msgs::DriverStation_State value) {
|
||||
assert(::gazebo::msgs::DriverStation_State_IsValid(value));
|
||||
set_has_state();
|
||||
state_ = value;
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
|
||||
} // namespace msgs
|
||||
} // namespace gazebo
|
||||
|
||||
#ifndef SWIG
|
||||
namespace google {
|
||||
namespace protobuf {
|
||||
|
||||
template <>
|
||||
inline const EnumDescriptor* GetEnumDescriptor< ::gazebo::msgs::DriverStation_State>() {
|
||||
return ::gazebo::msgs::DriverStation_State_descriptor();
|
||||
}
|
||||
|
||||
} // namespace google
|
||||
} // namespace protobuf
|
||||
#endif // SWIG
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
||||
|
||||
#endif // PROTOBUF_msgs_2fdriver_2dstation_2eproto__INCLUDED
|
||||
310
simulation/frc_gazebo_plugins/msgs/src/msgs/float64.pb.cc
Normal file
310
simulation/frc_gazebo_plugins/msgs/src/msgs/float64.pb.cc
Normal file
@@ -0,0 +1,310 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: msgs/float64.proto
|
||||
|
||||
#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
|
||||
#include "msgs/float64.pb.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <google/protobuf/stubs/common.h>
|
||||
#include <google/protobuf/stubs/once.h>
|
||||
#include <google/protobuf/io/coded_stream.h>
|
||||
#include <google/protobuf/wire_format_lite_inl.h>
|
||||
#include <google/protobuf/descriptor.h>
|
||||
#include <google/protobuf/generated_message_reflection.h>
|
||||
#include <google/protobuf/reflection_ops.h>
|
||||
#include <google/protobuf/wire_format.h>
|
||||
// @@protoc_insertion_point(includes)
|
||||
|
||||
namespace gazebo {
|
||||
namespace msgs {
|
||||
|
||||
namespace {
|
||||
|
||||
const ::google::protobuf::Descriptor* Float64_descriptor_ = NULL;
|
||||
const ::google::protobuf::internal::GeneratedMessageReflection*
|
||||
Float64_reflection_ = NULL;
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
void protobuf_AssignDesc_msgs_2ffloat64_2eproto() {
|
||||
protobuf_AddDesc_msgs_2ffloat64_2eproto();
|
||||
const ::google::protobuf::FileDescriptor* file =
|
||||
::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
|
||||
"msgs/float64.proto");
|
||||
GOOGLE_CHECK(file != NULL);
|
||||
Float64_descriptor_ = file->message_type(0);
|
||||
static const int Float64_offsets_[1] = {
|
||||
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Float64, data_),
|
||||
};
|
||||
Float64_reflection_ =
|
||||
new ::google::protobuf::internal::GeneratedMessageReflection(
|
||||
Float64_descriptor_,
|
||||
Float64::default_instance_,
|
||||
Float64_offsets_,
|
||||
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Float64, _has_bits_[0]),
|
||||
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Float64, _unknown_fields_),
|
||||
-1,
|
||||
::google::protobuf::DescriptorPool::generated_pool(),
|
||||
::google::protobuf::MessageFactory::generated_factory(),
|
||||
sizeof(Float64));
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
|
||||
inline void protobuf_AssignDescriptorsOnce() {
|
||||
::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
|
||||
&protobuf_AssignDesc_msgs_2ffloat64_2eproto);
|
||||
}
|
||||
|
||||
void protobuf_RegisterTypes(const ::std::string&) {
|
||||
protobuf_AssignDescriptorsOnce();
|
||||
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
|
||||
Float64_descriptor_, &Float64::default_instance());
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
void protobuf_ShutdownFile_msgs_2ffloat64_2eproto() {
|
||||
delete Float64::default_instance_;
|
||||
delete Float64_reflection_;
|
||||
}
|
||||
|
||||
void protobuf_AddDesc_msgs_2ffloat64_2eproto() {
|
||||
static bool already_here = false;
|
||||
if (already_here) return;
|
||||
already_here = true;
|
||||
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
||||
|
||||
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
|
||||
"\n\022msgs/float64.proto\022\013gazebo.msgs\"\027\n\007Flo"
|
||||
"at64\022\014\n\004data\030\001 \002(\001B\013B\tGzFloat64", 71);
|
||||
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
|
||||
"msgs/float64.proto", &protobuf_RegisterTypes);
|
||||
Float64::default_instance_ = new Float64();
|
||||
Float64::default_instance_->InitAsDefaultInstance();
|
||||
::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_msgs_2ffloat64_2eproto);
|
||||
}
|
||||
|
||||
// Force AddDescriptors() to be called at static initialization time.
|
||||
struct StaticDescriptorInitializer_msgs_2ffloat64_2eproto {
|
||||
StaticDescriptorInitializer_msgs_2ffloat64_2eproto() {
|
||||
protobuf_AddDesc_msgs_2ffloat64_2eproto();
|
||||
}
|
||||
} static_descriptor_initializer_msgs_2ffloat64_2eproto_;
|
||||
|
||||
// ===================================================================
|
||||
|
||||
#ifndef _MSC_VER
|
||||
const int Float64::kDataFieldNumber;
|
||||
#endif // !_MSC_VER
|
||||
|
||||
Float64::Float64()
|
||||
: ::google::protobuf::Message() {
|
||||
SharedCtor();
|
||||
}
|
||||
|
||||
void Float64::InitAsDefaultInstance() {
|
||||
}
|
||||
|
||||
Float64::Float64(const Float64& from)
|
||||
: ::google::protobuf::Message() {
|
||||
SharedCtor();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
void Float64::SharedCtor() {
|
||||
_cached_size_ = 0;
|
||||
data_ = 0;
|
||||
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
||||
}
|
||||
|
||||
Float64::~Float64() {
|
||||
SharedDtor();
|
||||
}
|
||||
|
||||
void Float64::SharedDtor() {
|
||||
if (this != default_instance_) {
|
||||
}
|
||||
}
|
||||
|
||||
void Float64::SetCachedSize(int size) const {
|
||||
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
||||
_cached_size_ = size;
|
||||
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
||||
}
|
||||
const ::google::protobuf::Descriptor* Float64::descriptor() {
|
||||
protobuf_AssignDescriptorsOnce();
|
||||
return Float64_descriptor_;
|
||||
}
|
||||
|
||||
const Float64& Float64::default_instance() {
|
||||
if (default_instance_ == NULL) protobuf_AddDesc_msgs_2ffloat64_2eproto();
|
||||
return *default_instance_;
|
||||
}
|
||||
|
||||
Float64* Float64::default_instance_ = NULL;
|
||||
|
||||
Float64* Float64::New() const {
|
||||
return new Float64;
|
||||
}
|
||||
|
||||
void Float64::Clear() {
|
||||
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
||||
data_ = 0;
|
||||
}
|
||||
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
||||
mutable_unknown_fields()->Clear();
|
||||
}
|
||||
|
||||
bool Float64::MergePartialFromCodedStream(
|
||||
::google::protobuf::io::CodedInputStream* input) {
|
||||
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
|
||||
::google::protobuf::uint32 tag;
|
||||
while ((tag = input->ReadTag()) != 0) {
|
||||
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
||||
// required double data = 1;
|
||||
case 1: {
|
||||
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
||||
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) {
|
||||
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
||||
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
|
||||
input, &data_)));
|
||||
set_has_data();
|
||||
} else {
|
||||
goto handle_uninterpreted;
|
||||
}
|
||||
if (input->ExpectAtEnd()) return true;
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
handle_uninterpreted:
|
||||
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
||||
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
|
||||
return true;
|
||||
}
|
||||
DO_(::google::protobuf::internal::WireFormat::SkipField(
|
||||
input, tag, mutable_unknown_fields()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
#undef DO_
|
||||
}
|
||||
|
||||
void Float64::SerializeWithCachedSizes(
|
||||
::google::protobuf::io::CodedOutputStream* output) const {
|
||||
// required double data = 1;
|
||||
if (has_data()) {
|
||||
::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->data(), output);
|
||||
}
|
||||
|
||||
if (!unknown_fields().empty()) {
|
||||
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
||||
unknown_fields(), output);
|
||||
}
|
||||
}
|
||||
|
||||
::google::protobuf::uint8* Float64::SerializeWithCachedSizesToArray(
|
||||
::google::protobuf::uint8* target) const {
|
||||
// required double data = 1;
|
||||
if (has_data()) {
|
||||
target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->data(), target);
|
||||
}
|
||||
|
||||
if (!unknown_fields().empty()) {
|
||||
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
||||
unknown_fields(), target);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
int Float64::ByteSize() const {
|
||||
int total_size = 0;
|
||||
|
||||
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
||||
// required double data = 1;
|
||||
if (has_data()) {
|
||||
total_size += 1 + 8;
|
||||
}
|
||||
|
||||
}
|
||||
if (!unknown_fields().empty()) {
|
||||
total_size +=
|
||||
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
||||
unknown_fields());
|
||||
}
|
||||
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
||||
_cached_size_ = total_size;
|
||||
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
||||
return total_size;
|
||||
}
|
||||
|
||||
void Float64::MergeFrom(const ::google::protobuf::Message& from) {
|
||||
GOOGLE_CHECK_NE(&from, this);
|
||||
const Float64* source =
|
||||
::google::protobuf::internal::dynamic_cast_if_available<const Float64*>(
|
||||
&from);
|
||||
if (source == NULL) {
|
||||
::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
||||
} else {
|
||||
MergeFrom(*source);
|
||||
}
|
||||
}
|
||||
|
||||
void Float64::MergeFrom(const Float64& from) {
|
||||
GOOGLE_CHECK_NE(&from, this);
|
||||
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
||||
if (from.has_data()) {
|
||||
set_data(from.data());
|
||||
}
|
||||
}
|
||||
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
|
||||
}
|
||||
|
||||
void Float64::CopyFrom(const ::google::protobuf::Message& from) {
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
void Float64::CopyFrom(const Float64& from) {
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
bool Float64::IsInitialized() const {
|
||||
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Float64::Swap(Float64* other) {
|
||||
if (other != this) {
|
||||
std::swap(data_, other->data_);
|
||||
std::swap(_has_bits_[0], other->_has_bits_[0]);
|
||||
_unknown_fields_.Swap(&other->_unknown_fields_);
|
||||
std::swap(_cached_size_, other->_cached_size_);
|
||||
}
|
||||
}
|
||||
|
||||
::google::protobuf::Metadata Float64::GetMetadata() const {
|
||||
protobuf_AssignDescriptorsOnce();
|
||||
::google::protobuf::Metadata metadata;
|
||||
metadata.descriptor = Float64_descriptor_;
|
||||
metadata.reflection = Float64_reflection_;
|
||||
return metadata;
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
|
||||
} // namespace msgs
|
||||
} // namespace gazebo
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
||||
167
simulation/frc_gazebo_plugins/msgs/src/msgs/float64.pb.h
Normal file
167
simulation/frc_gazebo_plugins/msgs/src/msgs/float64.pb.h
Normal file
@@ -0,0 +1,167 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: msgs/float64.proto
|
||||
|
||||
#ifndef PROTOBUF_msgs_2ffloat64_2eproto__INCLUDED
|
||||
#define PROTOBUF_msgs_2ffloat64_2eproto__INCLUDED
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <google/protobuf/stubs/common.h>
|
||||
|
||||
#if GOOGLE_PROTOBUF_VERSION < 2005000
|
||||
#error This file was generated by a newer version of protoc which is
|
||||
#error incompatible with your Protocol Buffer headers. Please update
|
||||
#error your headers.
|
||||
#endif
|
||||
#if 2005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
|
||||
#error This file was generated by an older version of protoc which is
|
||||
#error incompatible with your Protocol Buffer headers. Please
|
||||
#error regenerate this file with a newer version of protoc.
|
||||
#endif
|
||||
|
||||
#include <google/protobuf/generated_message_util.h>
|
||||
#include <google/protobuf/message.h>
|
||||
#include <google/protobuf/repeated_field.h>
|
||||
#include <google/protobuf/extension_set.h>
|
||||
#include <google/protobuf/unknown_field_set.h>
|
||||
// @@protoc_insertion_point(includes)
|
||||
|
||||
namespace gazebo {
|
||||
namespace msgs {
|
||||
|
||||
// Internal implementation detail -- do not call these.
|
||||
void protobuf_AddDesc_msgs_2ffloat64_2eproto();
|
||||
void protobuf_AssignDesc_msgs_2ffloat64_2eproto();
|
||||
void protobuf_ShutdownFile_msgs_2ffloat64_2eproto();
|
||||
|
||||
class Float64;
|
||||
|
||||
// ===================================================================
|
||||
|
||||
class Float64 : public ::google::protobuf::Message {
|
||||
public:
|
||||
Float64();
|
||||
virtual ~Float64();
|
||||
|
||||
Float64(const Float64& from);
|
||||
|
||||
inline Float64& operator=(const Float64& from) {
|
||||
CopyFrom(from);
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
|
||||
return _unknown_fields_;
|
||||
}
|
||||
|
||||
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
|
||||
return &_unknown_fields_;
|
||||
}
|
||||
|
||||
static const ::google::protobuf::Descriptor* descriptor();
|
||||
static const Float64& default_instance();
|
||||
|
||||
void Swap(Float64* other);
|
||||
|
||||
// implements Message ----------------------------------------------
|
||||
|
||||
Float64* New() const;
|
||||
void CopyFrom(const ::google::protobuf::Message& from);
|
||||
void MergeFrom(const ::google::protobuf::Message& from);
|
||||
void CopyFrom(const Float64& from);
|
||||
void MergeFrom(const Float64& from);
|
||||
void Clear();
|
||||
bool IsInitialized() const;
|
||||
|
||||
int ByteSize() const;
|
||||
bool MergePartialFromCodedStream(
|
||||
::google::protobuf::io::CodedInputStream* input);
|
||||
void SerializeWithCachedSizes(
|
||||
::google::protobuf::io::CodedOutputStream* output) const;
|
||||
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
|
||||
int GetCachedSize() const { return _cached_size_; }
|
||||
private:
|
||||
void SharedCtor();
|
||||
void SharedDtor();
|
||||
void SetCachedSize(int size) const;
|
||||
public:
|
||||
|
||||
::google::protobuf::Metadata GetMetadata() const;
|
||||
|
||||
// nested types ----------------------------------------------------
|
||||
|
||||
// accessors -------------------------------------------------------
|
||||
|
||||
// required double data = 1;
|
||||
inline bool has_data() const;
|
||||
inline void clear_data();
|
||||
static const int kDataFieldNumber = 1;
|
||||
inline double data() const;
|
||||
inline void set_data(double value);
|
||||
|
||||
// @@protoc_insertion_point(class_scope:gazebo.msgs.Float64)
|
||||
private:
|
||||
inline void set_has_data();
|
||||
inline void clear_has_data();
|
||||
|
||||
::google::protobuf::UnknownFieldSet _unknown_fields_;
|
||||
|
||||
double data_;
|
||||
|
||||
mutable int _cached_size_;
|
||||
::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
|
||||
|
||||
friend void protobuf_AddDesc_msgs_2ffloat64_2eproto();
|
||||
friend void protobuf_AssignDesc_msgs_2ffloat64_2eproto();
|
||||
friend void protobuf_ShutdownFile_msgs_2ffloat64_2eproto();
|
||||
|
||||
void InitAsDefaultInstance();
|
||||
static Float64* default_instance_;
|
||||
};
|
||||
// ===================================================================
|
||||
|
||||
|
||||
// ===================================================================
|
||||
|
||||
// Float64
|
||||
|
||||
// required double data = 1;
|
||||
inline bool Float64::has_data() const {
|
||||
return (_has_bits_[0] & 0x00000001u) != 0;
|
||||
}
|
||||
inline void Float64::set_has_data() {
|
||||
_has_bits_[0] |= 0x00000001u;
|
||||
}
|
||||
inline void Float64::clear_has_data() {
|
||||
_has_bits_[0] &= ~0x00000001u;
|
||||
}
|
||||
inline void Float64::clear_data() {
|
||||
data_ = 0;
|
||||
clear_has_data();
|
||||
}
|
||||
inline double Float64::data() const {
|
||||
return data_;
|
||||
}
|
||||
inline void Float64::set_data(double value) {
|
||||
set_has_data();
|
||||
data_ = value;
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
|
||||
} // namespace msgs
|
||||
} // namespace gazebo
|
||||
|
||||
#ifndef SWIG
|
||||
namespace google {
|
||||
namespace protobuf {
|
||||
|
||||
|
||||
} // namespace google
|
||||
} // namespace protobuf
|
||||
#endif // SWIG
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
||||
|
||||
#endif // PROTOBUF_msgs_2ffloat64_2eproto__INCLUDED
|
||||
30
simulation/frc_gazebo_plugins/msgs/src/msgs/msgs.h
Normal file
30
simulation/frc_gazebo_plugins/msgs/src/msgs/msgs.h
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
#include "msgs/float64.pb.h"
|
||||
#include "msgs/bool.pb.h"
|
||||
#include "msgs/driver-station.pb.h"
|
||||
|
||||
#include <gazebo/msgs/msgs.hh>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#ifndef _FRC_MSGS_H_
|
||||
#define _FRC_MSGS_H_
|
||||
|
||||
namespace gazebo {
|
||||
namespace msgs {
|
||||
|
||||
typedef GzString String;
|
||||
typedef boost::shared_ptr< gazebo::msgs::String > StringPtr;
|
||||
typedef const boost::shared_ptr< const gazebo::msgs::String > ConstStringPtr;
|
||||
|
||||
typedef boost::shared_ptr< msgs::Float64 > Float64Ptr;
|
||||
typedef const boost::shared_ptr< const msgs::Float64 > ConstFloat64Ptr;
|
||||
|
||||
typedef boost::shared_ptr< msgs::Bool > BoolPtr;
|
||||
typedef const boost::shared_ptr< const msgs::Bool > ConstBoolPtr;
|
||||
|
||||
typedef boost::shared_ptr< msgs::DriverStation > DriverStationPtr;
|
||||
typedef const boost::shared_ptr< const msgs::DriverStation > ConstDriverStationPtr;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* _FRC_MSGS_H_ */
|
||||
Reference in New Issue
Block a user