From bf571777f08a433d87b34abf4b4961cf89cb0b6e Mon Sep 17 00:00:00 2001 From: alessandro <3762382+potaito@users.noreply.github.com> Date: Wed, 1 Feb 2023 15:24:57 +0100 Subject: [PATCH] Winch and Gripper plugins (#1958) Add winch and gripper plugins Co-authored-by: Jonas Vautherin --- proto | 2 +- src/mavsdk/core/system_impl.cpp | 2 + src/mavsdk/plugins/gripper/CMakeLists.txt | 15 + src/mavsdk/plugins/gripper/gripper.cpp | 75 + src/mavsdk/plugins/gripper/gripper_impl.cpp | 118 + src/mavsdk/plugins/gripper/gripper_impl.h | 35 + .../gripper/include/plugins/gripper/gripper.h | 152 + src/mavsdk/plugins/winch/CMakeLists.txt | 15 + .../winch/include/plugins/winch/winch.h | 395 ++ src/mavsdk/plugins/winch/winch.cpp | 256 + src/mavsdk/plugins/winch/winch_impl.cpp | 420 ++ src/mavsdk/plugins/winch/winch_impl.h | 79 + .../src/generated/gripper/gripper.grpc.pb.cc | 132 + .../src/generated/gripper/gripper.grpc.pb.h | 415 ++ .../src/generated/gripper/gripper.pb.cc | 1204 ++++ .../src/generated/gripper/gripper.pb.h | 1277 ++++ .../src/generated/winch/winch.grpc.pb.cc | 503 ++ .../src/generated/winch/winch.grpc.pb.h | 1885 +++++ .../src/generated/winch/winch.pb.cc | 5924 ++++++++++++++++ .../src/generated/winch/winch.pb.h | 6203 +++++++++++++++++ src/mavsdk_server/src/grpc_server.cpp | 16 + src/mavsdk_server/src/grpc_server.h | 36 +- .../plugins/gripper/gripper_service_impl.h | 220 + .../src/plugins/winch/winch_service_impl.h | 635 ++ src/plugins.txt | 2 + 25 files changed, 20014 insertions(+), 2 deletions(-) create mode 100644 src/mavsdk/plugins/gripper/CMakeLists.txt create mode 100644 src/mavsdk/plugins/gripper/gripper.cpp create mode 100644 src/mavsdk/plugins/gripper/gripper_impl.cpp create mode 100644 src/mavsdk/plugins/gripper/gripper_impl.h create mode 100644 src/mavsdk/plugins/gripper/include/plugins/gripper/gripper.h create mode 100644 src/mavsdk/plugins/winch/CMakeLists.txt create mode 100644 src/mavsdk/plugins/winch/include/plugins/winch/winch.h create mode 100644 src/mavsdk/plugins/winch/winch.cpp create mode 100644 src/mavsdk/plugins/winch/winch_impl.cpp create mode 100644 src/mavsdk/plugins/winch/winch_impl.h create mode 100644 src/mavsdk_server/src/generated/gripper/gripper.grpc.pb.cc create mode 100644 src/mavsdk_server/src/generated/gripper/gripper.grpc.pb.h create mode 100644 src/mavsdk_server/src/generated/gripper/gripper.pb.cc create mode 100644 src/mavsdk_server/src/generated/gripper/gripper.pb.h create mode 100644 src/mavsdk_server/src/generated/winch/winch.grpc.pb.cc create mode 100644 src/mavsdk_server/src/generated/winch/winch.grpc.pb.h create mode 100644 src/mavsdk_server/src/generated/winch/winch.pb.cc create mode 100644 src/mavsdk_server/src/generated/winch/winch.pb.h create mode 100644 src/mavsdk_server/src/plugins/gripper/gripper_service_impl.h create mode 100644 src/mavsdk_server/src/plugins/winch/winch_service_impl.h diff --git a/proto b/proto index 8f26afc1f6..328778a763 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit 8f26afc1f6ba1e9de28cc17a16c36968184d9577 +Subproject commit 328778a763e1a961183cf4d5d5e158bcb0729611 diff --git a/src/mavsdk/core/system_impl.cpp b/src/mavsdk/core/system_impl.cpp index 496b739d58..63e1cbc74e 100644 --- a/src/mavsdk/core/system_impl.cpp +++ b/src/mavsdk/core/system_impl.cpp @@ -340,6 +340,8 @@ std::string SystemImpl::component_name(uint8_t component_id) return "Gimbal"; case MAV_COMP_ID_MISSIONPLANNER: return "Ground station"; + case MAV_COMP_ID_WINCH: + return "Winch"; default: return "Unsupported component"; } diff --git a/src/mavsdk/plugins/gripper/CMakeLists.txt b/src/mavsdk/plugins/gripper/CMakeLists.txt new file mode 100644 index 0000000000..2d83feee24 --- /dev/null +++ b/src/mavsdk/plugins/gripper/CMakeLists.txt @@ -0,0 +1,15 @@ +target_sources(mavsdk + PRIVATE + gripper.cpp + gripper_impl.cpp +) + +target_include_directories(mavsdk PUBLIC + $ + $ + ) + +install(FILES + include/plugins/gripper/gripper.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mavsdk/plugins/gripper +) diff --git a/src/mavsdk/plugins/gripper/gripper.cpp b/src/mavsdk/plugins/gripper/gripper.cpp new file mode 100644 index 0000000000..47a95178c6 --- /dev/null +++ b/src/mavsdk/plugins/gripper/gripper.cpp @@ -0,0 +1,75 @@ +// WARNING: THIS FILE IS AUTOGENERATED! As such, it should not be edited. +// Edits need to be made to the proto files +// (see https://github.com/mavlink/MAVSDK-Proto/blob/master/protos/gripper/gripper.proto) + +#include + +#include "gripper_impl.h" +#include "plugins/gripper/gripper.h" + +namespace mavsdk { + +Gripper::Gripper(System& system) : PluginBase(), _impl{std::make_unique(system)} {} + +Gripper::Gripper(std::shared_ptr system) : + PluginBase(), + _impl{std::make_unique(system)} +{} + +Gripper::~Gripper() {} + +void Gripper::grab_async(uint32_t instance, const ResultCallback callback) +{ + _impl->grab_async(instance, callback); +} + +Gripper::Result Gripper::grab(uint32_t instance) const +{ + return _impl->grab(instance); +} + +void Gripper::release_async(uint32_t instance, const ResultCallback callback) +{ + _impl->release_async(instance, callback); +} + +Gripper::Result Gripper::release(uint32_t instance) const +{ + return _impl->release(instance); +} + +std::ostream& operator<<(std::ostream& str, Gripper::Result const& result) +{ + switch (result) { + case Gripper::Result::Unknown: + return str << "Unknown"; + case Gripper::Result::Success: + return str << "Success"; + case Gripper::Result::NoSystem: + return str << "No System"; + case Gripper::Result::Busy: + return str << "Busy"; + case Gripper::Result::Timeout: + return str << "Timeout"; + case Gripper::Result::Unsupported: + return str << "Unsupported"; + case Gripper::Result::Failed: + return str << "Failed"; + default: + return str << "Unknown"; + } +} + +std::ostream& operator<<(std::ostream& str, Gripper::GripperAction const& gripper_action) +{ + switch (gripper_action) { + case Gripper::GripperAction::Release: + return str << "Release"; + case Gripper::GripperAction::Grab: + return str << "Grab"; + default: + return str << "Unknown"; + } +} + +} // namespace mavsdk \ No newline at end of file diff --git a/src/mavsdk/plugins/gripper/gripper_impl.cpp b/src/mavsdk/plugins/gripper/gripper_impl.cpp new file mode 100644 index 0000000000..9122dae3b2 --- /dev/null +++ b/src/mavsdk/plugins/gripper/gripper_impl.cpp @@ -0,0 +1,118 @@ +#include "gripper_impl.h" + +namespace mavsdk { + +GripperImpl::GripperImpl(System& system) : PluginImplBase(system) +{ + _parent->register_plugin(this); +} + +GripperImpl::GripperImpl(std::shared_ptr system) : PluginImplBase(std::move(system)) +{ + _parent->register_plugin(this); +} + +GripperImpl::~GripperImpl() +{ + _parent->unregister_plugin(this); +} + +void GripperImpl::init() {} + +void GripperImpl::deinit() {} + +void GripperImpl::enable() {} + +void GripperImpl::disable() {} + +void GripperImpl::grab_async(uint32_t instance, const Gripper::ResultCallback callback) +{ + MavlinkCommandSender::CommandLong command{}; + + command.command = MAV_CMD_DO_GRIPPER; + command.params.maybe_param1 = static_cast(instance); + command.params.maybe_param2 = static_cast(Gripper::GripperAction::Grab); + + command.target_component_id = MAV_COMPONENT::MAV_COMP_ID_WINCH; // TODO + + _parent->send_command_async( + command, [this, callback](MavlinkCommandSender::Result result, float) { + command_result_callback(result, callback); + }); +} + +Gripper::Result GripperImpl::grab(uint32_t instance) +{ + auto prom = std::promise(); + auto fut = prom.get_future(); + + grab_async(instance, [&prom](Gripper::Result result) { prom.set_value(result); }); + + return fut.get(); +} + +void GripperImpl::release_async(uint32_t instance, const Gripper::ResultCallback callback) +{ + MavlinkCommandSender::CommandLong command{}; + + command.command = MAV_CMD_DO_GRIPPER; + command.params.maybe_param1 = static_cast(instance); + command.params.maybe_param2 = static_cast(Gripper::GripperAction::Release); + + command.target_component_id = MAV_COMPONENT::MAV_COMP_ID_WINCH; // TODO + + _parent->send_command_async( + command, [this, callback](MavlinkCommandSender::Result result, float) { + command_result_callback(result, callback); + }); +} + +Gripper::Result GripperImpl::release(uint32_t instance) +{ + auto prom = std::promise(); + auto fut = prom.get_future(); + + release_async(instance, [&prom](Gripper::Result result) { prom.set_value(result); }); + + return fut.get(); +} + +Gripper::Result GripperImpl::gripper_result_from_command_result(MavlinkCommandSender::Result result) +{ + switch (result) { + case MavlinkCommandSender::Result::Success: + return Gripper::Result::Success; + case MavlinkCommandSender::Result::NoSystem: + return Gripper::Result::NoSystem; + case MavlinkCommandSender::Result::ConnectionError: + // Fallthrough + case MavlinkCommandSender::Result::Timeout: + return Gripper::Result::Timeout; + case MavlinkCommandSender::Result::Busy: + return Gripper::Result::Busy; + case MavlinkCommandSender::Result::Denied: + // Fallthrough + case MavlinkCommandSender::Result::TemporarilyRejected: + // Fallthrough + case MavlinkCommandSender::Result::Failed: + return Gripper::Result::Failed; + case MavlinkCommandSender::Result::Unsupported: + return Gripper::Result::Unsupported; + default: + return Gripper::Result::Unknown; + } +} + +void GripperImpl::command_result_callback( + MavlinkCommandSender::Result command_result, const Gripper::ResultCallback& callback) const +{ + Gripper::Result action_result = gripper_result_from_command_result(command_result); + + if (callback) { + auto temp_callback = callback; + _parent->call_user_callback( + [temp_callback, action_result]() { temp_callback(action_result); }); + } +} + +} // namespace mavsdk diff --git a/src/mavsdk/plugins/gripper/gripper_impl.h b/src/mavsdk/plugins/gripper/gripper_impl.h new file mode 100644 index 0000000000..80077a89ad --- /dev/null +++ b/src/mavsdk/plugins/gripper/gripper_impl.h @@ -0,0 +1,35 @@ +#pragma once + +#include "plugins/gripper/gripper.h" + +#include "plugin_impl_base.h" + +namespace mavsdk { + +class GripperImpl : public PluginImplBase { +public: + explicit GripperImpl(System& system); + explicit GripperImpl(std::shared_ptr system); + + ~GripperImpl() override; + + void init() override; + void deinit() override; + + void enable() override; + void disable() override; + + void grab_async(uint32_t instance, const Gripper::ResultCallback callback); + Gripper::Result grab(uint32_t instance); + + void release_async(uint32_t instance, const Gripper::ResultCallback callback); + Gripper::Result release(uint32_t instance); + +private: + static Gripper::Result gripper_result_from_command_result(MavlinkCommandSender::Result result); + + void command_result_callback( + MavlinkCommandSender::Result command_result, const Gripper::ResultCallback& callback) const; +}; + +} // namespace mavsdk diff --git a/src/mavsdk/plugins/gripper/include/plugins/gripper/gripper.h b/src/mavsdk/plugins/gripper/include/plugins/gripper/gripper.h new file mode 100644 index 0000000000..bd05937c25 --- /dev/null +++ b/src/mavsdk/plugins/gripper/include/plugins/gripper/gripper.h @@ -0,0 +1,152 @@ +// WARNING: THIS FILE IS AUTOGENERATED! As such, it should not be edited. +// Edits need to be made to the proto files +// (see https://github.com/mavlink/MAVSDK-Proto/blob/main/protos/gripper/gripper.proto) + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "plugin_base.h" + +#include "handle.h" + +namespace mavsdk { + +class System; +class GripperImpl; + +/** + * @brief Allows users to send gripper actions. + */ +class Gripper : public PluginBase { +public: + /** + * @brief Constructor. Creates the plugin for a specific System. + * + * The plugin is typically created as shown below: + * + * ```cpp + * auto gripper = Gripper(system); + * ``` + * + * @param system The specific system associated with this plugin. + */ + explicit Gripper(System& system); // deprecated + + /** + * @brief Constructor. Creates the plugin for a specific System. + * + * The plugin is typically created as shown below: + * + * ```cpp + * auto gripper = Gripper(system); + * ``` + * + * @param system The specific system associated with this plugin. + */ + explicit Gripper(std::shared_ptr system); // new + + /** + * @brief Destructor (internal use only). + */ + ~Gripper() override; + + /** + * @brief Gripper Actions. + * + * Available gripper actions are defined in mavlink under + * https://mavlink.io/en/messages/common.html#GRIPPER_ACTIONS + */ + enum class GripperAction { + Release, /**< @brief Open the gripper to release the cargo. */ + Grab, /**< @brief Close the gripper and grab onto cargo. */ + }; + + /** + * @brief Stream operator to print information about a `Gripper::GripperAction`. + * + * @return A reference to the stream. + */ + friend std::ostream& + operator<<(std::ostream& str, Gripper::GripperAction const& gripper_action); + + /** + * @brief Possible results returned for gripper action requests. + */ + enum class Result { + Unknown, /**< @brief Unknown result. */ + Success, /**< @brief Request was successful. */ + NoSystem, /**< @brief No system is connected. */ + Busy, /**< @brief Temporarily rejected. */ + Timeout, /**< @brief Request timed out. */ + Unsupported, /**< @brief Action not supported. */ + Failed, /**< @brief Action failed. */ + }; + + /** + * @brief Stream operator to print information about a `Gripper::Result`. + * + * @return A reference to the stream. + */ + friend std::ostream& operator<<(std::ostream& str, Gripper::Result const& result); + + /** + * @brief Callback type for asynchronous Gripper calls. + */ + using ResultCallback = std::function; + + /** + * @brief Gripper grab cargo. + * + * This function is non-blocking. See 'grab' for the blocking counterpart. + */ + void grab_async(uint32_t instance, const ResultCallback callback); + + /** + * @brief Gripper grab cargo. + * + * This function is blocking. See 'grab_async' for the non-blocking counterpart. + * + * @return Result of request. + */ + Result grab(uint32_t instance) const; + + /** + * @brief Gripper release cargo. + * + * This function is non-blocking. See 'release' for the blocking counterpart. + */ + void release_async(uint32_t instance, const ResultCallback callback); + + /** + * @brief Gripper release cargo. + * + * This function is blocking. See 'release_async' for the non-blocking counterpart. + * + * @return Result of request. + */ + Result release(uint32_t instance) const; + + /** + * @brief Copy constructor. + */ + Gripper(const Gripper& other); + + /** + * @brief Equality operator (object is not copyable). + */ + const Gripper& operator=(const Gripper&) = delete; + +private: + /** @private Underlying implementation, set at instantiation */ + std::unique_ptr _impl; +}; + +} // namespace mavsdk \ No newline at end of file diff --git a/src/mavsdk/plugins/winch/CMakeLists.txt b/src/mavsdk/plugins/winch/CMakeLists.txt new file mode 100644 index 0000000000..ed0942c603 --- /dev/null +++ b/src/mavsdk/plugins/winch/CMakeLists.txt @@ -0,0 +1,15 @@ +target_sources(mavsdk + PRIVATE + winch.cpp + winch_impl.cpp +) + +target_include_directories(mavsdk PUBLIC + $ + $ + ) + +install(FILES + include/plugins/winch/winch.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mavsdk/plugins/winch +) \ No newline at end of file diff --git a/src/mavsdk/plugins/winch/include/plugins/winch/winch.h b/src/mavsdk/plugins/winch/include/plugins/winch/winch.h new file mode 100644 index 0000000000..2191127bf3 --- /dev/null +++ b/src/mavsdk/plugins/winch/include/plugins/winch/winch.h @@ -0,0 +1,395 @@ +// WARNING: THIS FILE IS AUTOGENERATED! As such, it should not be edited. +// Edits need to be made to the proto files +// (see https://github.com/mavlink/MAVSDK-Proto/blob/main/protos/winch/winch.proto) + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "plugin_base.h" + +#include "handle.h" + +namespace mavsdk { + +class System; +class WinchImpl; + +/** + * @brief Allows users to send winch actions, as well as receive status information from winch + * systems. + */ +class Winch : public PluginBase { +public: + /** + * @brief Constructor. Creates the plugin for a specific System. + * + * The plugin is typically created as shown below: + * + * ```cpp + * auto winch = Winch(system); + * ``` + * + * @param system The specific system associated with this plugin. + */ + explicit Winch(System& system); // deprecated + + /** + * @brief Constructor. Creates the plugin for a specific System. + * + * The plugin is typically created as shown below: + * + * ```cpp + * auto winch = Winch(system); + * ``` + * + * @param system The specific system associated with this plugin. + */ + explicit Winch(std::shared_ptr system); // new + + /** + * @brief Destructor (internal use only). + */ + ~Winch() override; + + /** + * @brief Winch Action type. + */ + enum class WinchAction { + Relaxed, /**< @brief Allow motor to freewheel. */ + RelativeLengthControl, /**< @brief Wind or unwind specified length of line, optionally using + specified rate. */ + RateControl, /**< @brief Wind or unwind line at specified rate. */ + Lock, /**< @brief Perform the locking sequence to relieve motor while in the fully retracted + position. */ + Deliver, /**< @brief Sequence of drop, slow down, touch down, reel up, lock. */ + Hold, /**< @brief Engage motor and hold current position. */ + Retract, /**< @brief Return the reel to the fully retracted position. */ + LoadLine, /**< @brief Load the reel with line. The winch will calculate the total loaded + length and stop when the tension exceeds a threshold. */ + AbandonLine, /**< @brief Spool out the entire length of the line. */ + LoadPayload, /**< @brief Spools out just enough to present the hook to the user to load the + payload. */ + }; + + /** + * @brief Stream operator to print information about a `Winch::WinchAction`. + * + * @return A reference to the stream. + */ + friend std::ostream& operator<<(std::ostream& str, Winch::WinchAction const& winch_action); + + /** + * @brief Winch Status Flags. + * + * The status flags are defined in mavlink + * https://mavlink.io/en/messages/common.html#MAV_WINCH_STATUS_FLAG. + * + * Multiple status fields can be set simultaneously. Mavlink does + * not specify which states are mutually exclusive. + */ + struct StatusFlags { + bool healthy{}; /**< @brief Winch is healthy */ + bool fully_retracted{}; /**< @brief Winch line is fully retracted */ + bool moving{}; /**< @brief Winch motor is moving */ + bool clutch_engaged{}; /**< @brief Winch clutch is engaged allowing motor to move freely */ + bool locked{}; /**< @brief Winch is locked by locking mechanism */ + bool dropping{}; /**< @brief Winch is gravity dropping payload */ + bool arresting{}; /**< @brief Winch is arresting payload descent */ + bool ground_sense{}; /**< @brief Winch is using torque measurements to sense the ground */ + bool retracting{}; /**< @brief Winch is returning to the fully retracted position */ + bool redeliver{}; /**< @brief Winch is redelivering the payload. This is a failover state if + the line tension goes above a threshold during RETRACTING. */ + bool abandon_line{}; /**< @brief Winch is abandoning the line and possibly payload. Winch + unspools the entire calculated line length. This is a failover state + from REDELIVER if the number of attempts exceeds a threshold. */ + bool locking{}; /**< @brief Winch is engaging the locking mechanism */ + bool load_line{}; /**< @brief Winch is spooling on line */ + bool load_payload{}; /**< @brief Winch is loading a payload */ + }; + + /** + * @brief Equal operator to compare two `Winch::StatusFlags` objects. + * + * @return `true` if items are equal. + */ + friend bool operator==(const Winch::StatusFlags& lhs, const Winch::StatusFlags& rhs); + + /** + * @brief Stream operator to print information about a `Winch::StatusFlags`. + * + * @return A reference to the stream. + */ + friend std::ostream& operator<<(std::ostream& str, Winch::StatusFlags const& status_flags); + + /** + * @brief Status type. + */ + struct Status { + uint64_t time_usec{}; /**< @brief Time in usec */ + float line_length_m{}; /**< @brief Length of the line in meters */ + float speed_m_s{}; /**< @brief Speed in meters per second */ + float tension_kg{}; /**< @brief Tension in kilograms */ + float voltage_v{}; /**< @brief Voltage in volts */ + float current_a{}; /**< @brief Current in amperes */ + int32_t temperature_c{}; /**< @brief Temperature in Celsius */ + StatusFlags status_flags{}; /**< @brief Status flags */ + }; + + /** + * @brief Equal operator to compare two `Winch::Status` objects. + * + * @return `true` if items are equal. + */ + friend bool operator==(const Winch::Status& lhs, const Winch::Status& rhs); + + /** + * @brief Stream operator to print information about a `Winch::Status`. + * + * @return A reference to the stream. + */ + friend std::ostream& operator<<(std::ostream& str, Winch::Status const& status); + + /** + * @brief Possible results returned for winch action requests. + */ + enum class Result { + Unknown, /**< @brief Unknown result. */ + Success, /**< @brief Request was successful. */ + NoSystem, /**< @brief No system is connected. */ + Busy, /**< @brief Temporarily rejected. */ + Timeout, /**< @brief Request timed out. */ + Unsupported, /**< @brief Action not supported. */ + Failed, /**< @brief Action failed. */ + }; + + /** + * @brief Stream operator to print information about a `Winch::Result`. + * + * @return A reference to the stream. + */ + friend std::ostream& operator<<(std::ostream& str, Winch::Result const& result); + + /** + * @brief Callback type for asynchronous Winch calls. + */ + using ResultCallback = std::function; + + /** + * @brief Callback type for subscribe_status. + */ + using StatusCallback = std::function; + + /** + * @brief Handle type for subscribe_status. + */ + using StatusHandle = Handle; + + /** + * @brief Subscribe to 'winch status' updates. + */ + StatusHandle subscribe_status(const StatusCallback& callback); + + /** + * @brief Unsubscribe from subscribe_status + */ + void unsubscribe_status(StatusHandle handle); + + /** + * @brief Poll for 'Status' (blocking). + * + * @return One Status update. + */ + Status status() const; + + /** + * @brief Allow motor to freewheel. + * + * This function is non-blocking. See 'relax' for the blocking counterpart. + */ + void relax_async(uint32_t instance, const ResultCallback callback); + + /** + * @brief Allow motor to freewheel. + * + * This function is blocking. See 'relax_async' for the non-blocking counterpart. + * + * @return Result of request. + */ + Result relax(uint32_t instance) const; + + /** + * @brief Wind or unwind specified length of line, optionally using specified rate. + * + * This function is non-blocking. See 'relative_length_control' for the blocking counterpart. + */ + void relative_length_control_async( + uint32_t instance, float length_m, float rate_m_s, const ResultCallback callback); + + /** + * @brief Wind or unwind specified length of line, optionally using specified rate. + * + * This function is blocking. See 'relative_length_control_async' for the non-blocking + * counterpart. + * + * @return Result of request. + */ + Result relative_length_control(uint32_t instance, float length_m, float rate_m_s) const; + + /** + * @brief Wind or unwind line at specified rate. + * + * This function is non-blocking. See 'rate_control' for the blocking counterpart. + */ + void rate_control_async(uint32_t instance, float rate_m_s, const ResultCallback callback); + + /** + * @brief Wind or unwind line at specified rate. + * + * This function is blocking. See 'rate_control_async' for the non-blocking counterpart. + * + * @return Result of request. + */ + Result rate_control(uint32_t instance, float rate_m_s) const; + + /** + * @brief Perform the locking sequence to relieve motor while in the fully retracted position. + * + * This function is non-blocking. See 'lock' for the blocking counterpart. + */ + void lock_async(uint32_t instance, const ResultCallback callback); + + /** + * @brief Perform the locking sequence to relieve motor while in the fully retracted position. + * + * This function is blocking. See 'lock_async' for the non-blocking counterpart. + * + * @return Result of request. + */ + Result lock(uint32_t instance) const; + + /** + * @brief Sequence of drop, slow down, touch down, reel up, lock. + * + * This function is non-blocking. See 'deliver' for the blocking counterpart. + */ + void deliver_async(uint32_t instance, const ResultCallback callback); + + /** + * @brief Sequence of drop, slow down, touch down, reel up, lock. + * + * This function is blocking. See 'deliver_async' for the non-blocking counterpart. + * + * @return Result of request. + */ + Result deliver(uint32_t instance) const; + + /** + * @brief Engage motor and hold current position. + * + * This function is non-blocking. See 'hold' for the blocking counterpart. + */ + void hold_async(uint32_t instance, const ResultCallback callback); + + /** + * @brief Engage motor and hold current position. + * + * This function is blocking. See 'hold_async' for the non-blocking counterpart. + * + * @return Result of request. + */ + Result hold(uint32_t instance) const; + + /** + * @brief Return the reel to the fully retracted position. + * + * This function is non-blocking. See 'retract' for the blocking counterpart. + */ + void retract_async(uint32_t instance, const ResultCallback callback); + + /** + * @brief Return the reel to the fully retracted position. + * + * This function is blocking. See 'retract_async' for the non-blocking counterpart. + * + * @return Result of request. + */ + Result retract(uint32_t instance) const; + + /** + * @brief Load the reel with line. + * + * The winch will calculate the total loaded length and stop when the tension exceeds a + * threshold. + * + * This function is non-blocking. See 'load_line' for the blocking counterpart. + */ + void load_line_async(uint32_t instance, const ResultCallback callback); + + /** + * @brief Load the reel with line. + * + * The winch will calculate the total loaded length and stop when the tension exceeds a + * threshold. + * + * This function is blocking. See 'load_line_async' for the non-blocking counterpart. + * + * @return Result of request. + */ + Result load_line(uint32_t instance) const; + + /** + * @brief Spool out the entire length of the line. + * + * This function is non-blocking. See 'abandon_line' for the blocking counterpart. + */ + void abandon_line_async(uint32_t instance, const ResultCallback callback); + + /** + * @brief Spool out the entire length of the line. + * + * This function is blocking. See 'abandon_line_async' for the non-blocking counterpart. + * + * @return Result of request. + */ + Result abandon_line(uint32_t instance) const; + + /** + * @brief Spools out just enough to present the hook to the user to load the payload. + * + * This function is non-blocking. See 'load_payload' for the blocking counterpart. + */ + void load_payload_async(uint32_t instance, const ResultCallback callback); + + /** + * @brief Spools out just enough to present the hook to the user to load the payload. + * + * This function is blocking. See 'load_payload_async' for the non-blocking counterpart. + * + * @return Result of request. + */ + Result load_payload(uint32_t instance) const; + + /** + * @brief Copy constructor. + */ + Winch(const Winch& other); + + /** + * @brief Equality operator (object is not copyable). + */ + const Winch& operator=(const Winch&) = delete; + +private: + /** @private Underlying implementation, set at instantiation */ + std::unique_ptr _impl; +}; + +} // namespace mavsdk \ No newline at end of file diff --git a/src/mavsdk/plugins/winch/winch.cpp b/src/mavsdk/plugins/winch/winch.cpp new file mode 100644 index 0000000000..bd48085964 --- /dev/null +++ b/src/mavsdk/plugins/winch/winch.cpp @@ -0,0 +1,256 @@ +// WARNING: THIS FILE IS AUTOGENERATED! As such, it should not be edited. +// Edits need to be made to the proto files +// (see https://github.com/mavlink/MAVSDK-Proto/blob/master/protos/winch/winch.proto) + +#include + +#include "winch_impl.h" +#include "plugins/winch/winch.h" + +namespace mavsdk { + +using StatusFlags = Winch::StatusFlags; +using Status = Winch::Status; + +Winch::Winch(System& system) : PluginBase(), _impl{std::make_unique(system)} {} + +Winch::Winch(std::shared_ptr system) : + PluginBase(), + _impl{std::make_unique(system)} +{} + +Winch::~Winch() {} + +Winch::StatusHandle Winch::subscribe_status(const StatusCallback& callback) +{ + return _impl->subscribe_status(callback); +} + +void Winch::unsubscribe_status(StatusHandle handle) +{ + _impl->unsubscribe_status(handle); +} + +Winch::Status Winch::status() const +{ + return _impl->status(); +} + +void Winch::relax_async(uint32_t instance, const ResultCallback callback) +{ + _impl->relax_async(instance, callback); +} + +Winch::Result Winch::relax(uint32_t instance) const +{ + return _impl->relax(instance); +} + +void Winch::relative_length_control_async( + uint32_t instance, float length_m, float rate_m_s, const ResultCallback callback) +{ + _impl->relative_length_control_async(instance, length_m, rate_m_s, callback); +} + +Winch::Result +Winch::relative_length_control(uint32_t instance, float length_m, float rate_m_s) const +{ + return _impl->relative_length_control(instance, length_m, rate_m_s); +} + +void Winch::rate_control_async(uint32_t instance, float rate_m_s, const ResultCallback callback) +{ + _impl->rate_control_async(instance, rate_m_s, callback); +} + +Winch::Result Winch::rate_control(uint32_t instance, float rate_m_s) const +{ + return _impl->rate_control(instance, rate_m_s); +} + +void Winch::lock_async(uint32_t instance, const ResultCallback callback) +{ + _impl->lock_async(instance, callback); +} + +Winch::Result Winch::lock(uint32_t instance) const +{ + return _impl->lock(instance); +} + +void Winch::deliver_async(uint32_t instance, const ResultCallback callback) +{ + _impl->deliver_async(instance, callback); +} + +Winch::Result Winch::deliver(uint32_t instance) const +{ + return _impl->deliver(instance); +} + +void Winch::hold_async(uint32_t instance, const ResultCallback callback) +{ + _impl->hold_async(instance, callback); +} + +Winch::Result Winch::hold(uint32_t instance) const +{ + return _impl->hold(instance); +} + +void Winch::retract_async(uint32_t instance, const ResultCallback callback) +{ + _impl->retract_async(instance, callback); +} + +Winch::Result Winch::retract(uint32_t instance) const +{ + return _impl->retract(instance); +} + +void Winch::load_line_async(uint32_t instance, const ResultCallback callback) +{ + _impl->load_line_async(instance, callback); +} + +Winch::Result Winch::load_line(uint32_t instance) const +{ + return _impl->load_line(instance); +} + +void Winch::abandon_line_async(uint32_t instance, const ResultCallback callback) +{ + _impl->abandon_line_async(instance, callback); +} + +Winch::Result Winch::abandon_line(uint32_t instance) const +{ + return _impl->abandon_line(instance); +} + +void Winch::load_payload_async(uint32_t instance, const ResultCallback callback) +{ + _impl->load_payload_async(instance, callback); +} + +Winch::Result Winch::load_payload(uint32_t instance) const +{ + return _impl->load_payload(instance); +} + +bool operator==(const Winch::StatusFlags& lhs, const Winch::StatusFlags& rhs) +{ + return (rhs.healthy == lhs.healthy) && (rhs.fully_retracted == lhs.fully_retracted) && + (rhs.moving == lhs.moving) && (rhs.clutch_engaged == lhs.clutch_engaged) && + (rhs.locked == lhs.locked) && (rhs.dropping == lhs.dropping) && + (rhs.arresting == lhs.arresting) && (rhs.ground_sense == lhs.ground_sense) && + (rhs.retracting == lhs.retracting) && (rhs.redeliver == lhs.redeliver) && + (rhs.abandon_line == lhs.abandon_line) && (rhs.locking == lhs.locking) && + (rhs.load_line == lhs.load_line) && (rhs.load_payload == lhs.load_payload); +} + +std::ostream& operator<<(std::ostream& str, Winch::StatusFlags const& status_flags) +{ + str << std::setprecision(15); + str << "status_flags:" << '\n' << "{\n"; + str << " healthy: " << status_flags.healthy << '\n'; + str << " fully_retracted: " << status_flags.fully_retracted << '\n'; + str << " moving: " << status_flags.moving << '\n'; + str << " clutch_engaged: " << status_flags.clutch_engaged << '\n'; + str << " locked: " << status_flags.locked << '\n'; + str << " dropping: " << status_flags.dropping << '\n'; + str << " arresting: " << status_flags.arresting << '\n'; + str << " ground_sense: " << status_flags.ground_sense << '\n'; + str << " retracting: " << status_flags.retracting << '\n'; + str << " redeliver: " << status_flags.redeliver << '\n'; + str << " abandon_line: " << status_flags.abandon_line << '\n'; + str << " locking: " << status_flags.locking << '\n'; + str << " load_line: " << status_flags.load_line << '\n'; + str << " load_payload: " << status_flags.load_payload << '\n'; + str << '}'; + return str; +} + +bool operator==(const Winch::Status& lhs, const Winch::Status& rhs) +{ + return (rhs.time_usec == lhs.time_usec) && + ((std::isnan(rhs.line_length_m) && std::isnan(lhs.line_length_m)) || + rhs.line_length_m == lhs.line_length_m) && + ((std::isnan(rhs.speed_m_s) && std::isnan(lhs.speed_m_s)) || + rhs.speed_m_s == lhs.speed_m_s) && + ((std::isnan(rhs.tension_kg) && std::isnan(lhs.tension_kg)) || + rhs.tension_kg == lhs.tension_kg) && + ((std::isnan(rhs.voltage_v) && std::isnan(lhs.voltage_v)) || + rhs.voltage_v == lhs.voltage_v) && + ((std::isnan(rhs.current_a) && std::isnan(lhs.current_a)) || + rhs.current_a == lhs.current_a) && + (rhs.temperature_c == lhs.temperature_c) && (rhs.status_flags == lhs.status_flags); +} + +std::ostream& operator<<(std::ostream& str, Winch::Status const& status) +{ + str << std::setprecision(15); + str << "status:" << '\n' << "{\n"; + str << " time_usec: " << status.time_usec << '\n'; + str << " line_length_m: " << status.line_length_m << '\n'; + str << " speed_m_s: " << status.speed_m_s << '\n'; + str << " tension_kg: " << status.tension_kg << '\n'; + str << " voltage_v: " << status.voltage_v << '\n'; + str << " current_a: " << status.current_a << '\n'; + str << " temperature_c: " << status.temperature_c << '\n'; + str << " status_flags: " << status.status_flags << '\n'; + str << '}'; + return str; +} + +std::ostream& operator<<(std::ostream& str, Winch::Result const& result) +{ + switch (result) { + case Winch::Result::Unknown: + return str << "Unknown"; + case Winch::Result::Success: + return str << "Success"; + case Winch::Result::NoSystem: + return str << "No System"; + case Winch::Result::Busy: + return str << "Busy"; + case Winch::Result::Timeout: + return str << "Timeout"; + case Winch::Result::Unsupported: + return str << "Unsupported"; + case Winch::Result::Failed: + return str << "Failed"; + default: + return str << "Unknown"; + } +} + +std::ostream& operator<<(std::ostream& str, Winch::WinchAction const& winch_action) +{ + switch (winch_action) { + case Winch::WinchAction::Relaxed: + return str << "Relaxed"; + case Winch::WinchAction::RelativeLengthControl: + return str << "Relative Length Control"; + case Winch::WinchAction::RateControl: + return str << "Rate Control"; + case Winch::WinchAction::Lock: + return str << "Lock"; + case Winch::WinchAction::Deliver: + return str << "Deliver"; + case Winch::WinchAction::Hold: + return str << "Hold"; + case Winch::WinchAction::Retract: + return str << "Retract"; + case Winch::WinchAction::LoadLine: + return str << "Load Line"; + case Winch::WinchAction::AbandonLine: + return str << "Abandon Line"; + case Winch::WinchAction::LoadPayload: + return str << "Load Payload"; + default: + return str << "Unknown"; + } +} + +} // namespace mavsdk \ No newline at end of file diff --git a/src/mavsdk/plugins/winch/winch_impl.cpp b/src/mavsdk/plugins/winch/winch_impl.cpp new file mode 100644 index 0000000000..df20674439 --- /dev/null +++ b/src/mavsdk/plugins/winch/winch_impl.cpp @@ -0,0 +1,420 @@ +#include "winch_impl.h" +#include "system.h" +#include "callback_list.tpp" + +namespace mavsdk { + +template class CallbackList; + +WinchImpl::WinchImpl(System& system) : PluginImplBase(system) +{ + _parent->register_plugin(this); +} + +WinchImpl::WinchImpl(std::shared_ptr system) : PluginImplBase(std::move(system)) +{ + _parent->register_plugin(this); +} + +WinchImpl::~WinchImpl() +{ + _parent->unregister_plugin(this); +} + +void WinchImpl::init() +{ + _parent->register_mavlink_message_handler( + MAVLINK_MSG_ID_WINCH_STATUS, + [this](const mavlink_message_t& message) { process_status(message); }, + this); +} + +Winch::StatusHandle WinchImpl::subscribe_status(const Winch::StatusCallback& callback) +{ + std::lock_guard lock(_subscription_mutex); + return _status_subscriptions.subscribe(callback); +} + +void WinchImpl::unsubscribe_status(Winch::StatusHandle handle) +{ + std::lock_guard lock(_subscription_mutex); + _status_subscriptions.unsubscribe(handle); +} + +void WinchImpl::set_status(Winch::Status status) +{ + std::lock_guard lock(_status_mutex); + _status = status; +} + +Winch::Status WinchImpl::status() const +{ + std::lock_guard lock(_status_mutex); + return _status; +} + +void WinchImpl::process_status(const mavlink_message_t& message) +{ + mavlink_winch_status_t mavlink_winch_status; + mavlink_msg_winch_status_decode(&message, &mavlink_winch_status); + + Winch::StatusFlags status_flags; + status_flags.healthy = + mavlink_winch_status.status & MAV_WINCH_STATUS_FLAG::MAV_WINCH_STATUS_HEALTHY; + status_flags.fully_retracted = + mavlink_winch_status.status & MAV_WINCH_STATUS_FLAG::MAV_WINCH_STATUS_FULLY_RETRACTED; + status_flags.moving = + mavlink_winch_status.status & MAV_WINCH_STATUS_FLAG::MAV_WINCH_STATUS_MOVING; + status_flags.clutch_engaged = + mavlink_winch_status.status & MAV_WINCH_STATUS_FLAG::MAV_WINCH_STATUS_CLUTCH_ENGAGED; + status_flags.locked = + mavlink_winch_status.status & MAV_WINCH_STATUS_FLAG::MAV_WINCH_STATUS_LOCKED; + status_flags.dropping = + mavlink_winch_status.status & MAV_WINCH_STATUS_FLAG::MAV_WINCH_STATUS_DROPPING; + status_flags.arresting = + mavlink_winch_status.status & MAV_WINCH_STATUS_FLAG::MAV_WINCH_STATUS_ARRESTING; + status_flags.ground_sense = + mavlink_winch_status.status & MAV_WINCH_STATUS_FLAG::MAV_WINCH_STATUS_GROUND_SENSE; + status_flags.retracting = + mavlink_winch_status.status & MAV_WINCH_STATUS_FLAG::MAV_WINCH_STATUS_RETRACTING; + status_flags.redeliver = + mavlink_winch_status.status & MAV_WINCH_STATUS_FLAG::MAV_WINCH_STATUS_REDELIVER; + status_flags.abandon_line = + mavlink_winch_status.status & MAV_WINCH_STATUS_FLAG::MAV_WINCH_STATUS_ABANDON_LINE; + status_flags.locking = + mavlink_winch_status.status & MAV_WINCH_STATUS_FLAG::MAV_WINCH_STATUS_LOCKING; + status_flags.load_line = + mavlink_winch_status.status & MAV_WINCH_STATUS_FLAG::MAV_WINCH_STATUS_LOAD_LINE; + status_flags.load_payload = + mavlink_winch_status.status & MAV_WINCH_STATUS_FLAG::MAV_WINCH_STATUS_LOAD_PAYLOAD; + + Winch::Status new_status; + new_status.time_usec = mavlink_winch_status.time_usec; + new_status.line_length_m = mavlink_winch_status.line_length; + new_status.speed_m_s = mavlink_winch_status.speed; + new_status.tension_kg = mavlink_winch_status.tension; + new_status.voltage_v = mavlink_winch_status.voltage; + new_status.current_a = mavlink_winch_status.current; + new_status.temperature_c = mavlink_winch_status.temperature; + new_status.status_flags = status_flags; + + set_status(new_status); + + { + std::lock_guard lock(_subscription_mutex); + _status_subscriptions.queue( + status(), [this](const auto& func) { _parent->call_user_callback(func); }); + } +} + +void WinchImpl::deinit() {} + +void WinchImpl::enable() {} + +void WinchImpl::disable() {} + +void WinchImpl::relax_async(uint32_t instance, const Winch::ResultCallback callback) +{ + MavlinkCommandSender::CommandLong command{}; + + command.command = MAV_CMD_DO_WINCH; + command.params.maybe_param1 = static_cast(instance); + command.params.maybe_param2 = static_cast(Winch::WinchAction::Relaxed); + + command.target_component_id = MAV_COMPONENT::MAV_COMP_ID_WINCH; + + _parent->send_command_async( + command, [this, callback](MavlinkCommandSender::Result result, float) { + command_result_callback(result, callback); + }); +} + +Winch::Result WinchImpl::relax(uint32_t instance) +{ + auto prom = std::promise(); + auto fut = prom.get_future(); + + relax_async(instance, [&prom](Winch::Result result) { prom.set_value(result); }); + + return fut.get(); +} + +void WinchImpl::relative_length_control_async( + uint32_t instance, float length, float rate, const Winch::ResultCallback callback) +{ + MavlinkCommandSender::CommandLong command{}; + + command.command = MAV_CMD_DO_WINCH; + command.params.maybe_param1 = static_cast(instance); + command.params.maybe_param2 = static_cast(Winch::WinchAction::RelativeLengthControl); + command.params.maybe_param3 = length; + command.params.maybe_param4 = rate; + + command.target_component_id = MAV_COMPONENT::MAV_COMP_ID_WINCH; + + _parent->send_command_async( + command, [this, callback](MavlinkCommandSender::Result result, float) { + command_result_callback(result, callback); + }); +} + +Winch::Result WinchImpl::relative_length_control(uint32_t instance, float length, float rate) +{ + auto prom = std::promise(); + auto fut = prom.get_future(); + + relative_length_control_async( + instance, length, rate, [&prom](Winch::Result result) { prom.set_value(result); }); + + return fut.get(); +} + +void WinchImpl::rate_control_async( + uint32_t instance, float rate, const Winch::ResultCallback callback) +{ + MavlinkCommandSender::CommandLong command{}; + + command.command = MAV_CMD_DO_WINCH; + command.params.maybe_param1 = static_cast(instance); + command.params.maybe_param2 = static_cast(Winch::WinchAction::RateControl); + command.params.maybe_param4 = rate; + + command.target_component_id = MAV_COMPONENT::MAV_COMP_ID_WINCH; + + _parent->send_command_async( + command, [this, callback](MavlinkCommandSender::Result result, float) { + command_result_callback(result, callback); + }); +} + +Winch::Result WinchImpl::rate_control(uint32_t instance, float rate) +{ + auto prom = std::promise(); + auto fut = prom.get_future(); + + rate_control_async(instance, rate, [&prom](Winch::Result result) { prom.set_value(result); }); + + return fut.get(); +} + +void WinchImpl::lock_async(uint32_t instance, const Winch::ResultCallback callback) +{ + MavlinkCommandSender::CommandLong command{}; + + command.command = MAV_CMD_DO_WINCH; + command.params.maybe_param1 = static_cast(instance); + command.params.maybe_param2 = static_cast(Winch::WinchAction::Lock); + + command.target_component_id = MAV_COMPONENT::MAV_COMP_ID_WINCH; + + _parent->send_command_async( + command, [this, callback](MavlinkCommandSender::Result result, float) { + command_result_callback(result, callback); + }); +} + +Winch::Result WinchImpl::lock(uint32_t instance) +{ + auto prom = std::promise(); + auto fut = prom.get_future(); + + lock_async(instance, [&prom](Winch::Result result) { prom.set_value(result); }); + + return fut.get(); +} + +void WinchImpl::deliver_async(uint32_t instance, const Winch::ResultCallback callback) +{ + MavlinkCommandSender::CommandLong command{}; + + command.command = MAV_CMD_DO_WINCH; + command.params.maybe_param1 = static_cast(instance); + command.params.maybe_param2 = static_cast(Winch::WinchAction::Deliver); + + command.target_component_id = MAV_COMPONENT::MAV_COMP_ID_WINCH; + + _parent->send_command_async( + command, [this, callback](MavlinkCommandSender::Result result, float) { + command_result_callback(result, callback); + }); +} + +Winch::Result WinchImpl::deliver(uint32_t instance) +{ + auto prom = std::promise(); + auto fut = prom.get_future(); + + deliver_async(instance, [&prom](Winch::Result result) { prom.set_value(result); }); + + return fut.get(); +} + +void WinchImpl::hold_async(uint32_t instance, const Winch::ResultCallback callback) +{ + MavlinkCommandSender::CommandLong command{}; + + command.command = MAV_CMD_DO_WINCH; + command.params.maybe_param1 = static_cast(instance); + command.params.maybe_param2 = static_cast(Winch::WinchAction::Hold); + + command.target_component_id = MAV_COMPONENT::MAV_COMP_ID_WINCH; + + _parent->send_command_async( + command, [this, callback](MavlinkCommandSender::Result result, float) { + command_result_callback(result, callback); + }); +} + +Winch::Result WinchImpl::hold(uint32_t instance) +{ + auto prom = std::promise(); + auto fut = prom.get_future(); + + hold_async(instance, [&prom](Winch::Result result) { prom.set_value(result); }); + + return fut.get(); +} + +void WinchImpl::retract_async(uint32_t instance, const Winch::ResultCallback callback) +{ + MavlinkCommandSender::CommandLong command{}; + + command.command = MAV_CMD_DO_WINCH; + command.params.maybe_param1 = static_cast(instance); + command.params.maybe_param2 = static_cast(Winch::WinchAction::Retract); + + command.target_component_id = MAV_COMPONENT::MAV_COMP_ID_WINCH; + + _parent->send_command_async( + command, [this, callback](MavlinkCommandSender::Result result, float) { + command_result_callback(result, callback); + }); +} + +Winch::Result WinchImpl::retract(uint32_t instance) +{ + auto prom = std::promise(); + auto fut = prom.get_future(); + + retract_async(instance, [&prom](Winch::Result result) { prom.set_value(result); }); + + return fut.get(); +} + +void WinchImpl::load_line_async(uint32_t instance, const Winch::ResultCallback callback) +{ + MavlinkCommandSender::CommandLong command{}; + + command.command = MAV_CMD_DO_WINCH; + command.params.maybe_param1 = static_cast(instance); + command.params.maybe_param2 = static_cast(Winch::WinchAction::LoadLine); + + command.target_component_id = MAV_COMPONENT::MAV_COMP_ID_WINCH; + + _parent->send_command_async( + command, [this, callback](MavlinkCommandSender::Result result, float) { + command_result_callback(result, callback); + }); +} + +Winch::Result WinchImpl::load_line(uint32_t instance) +{ + auto prom = std::promise(); + auto fut = prom.get_future(); + + load_line_async(instance, [&prom](Winch::Result result) { prom.set_value(result); }); + + return fut.get(); +} + +void WinchImpl::abandon_line_async(uint32_t instance, const Winch::ResultCallback callback) +{ + MavlinkCommandSender::CommandLong command{}; + + command.command = MAV_CMD_DO_WINCH; + command.params.maybe_param1 = static_cast(instance); + command.params.maybe_param2 = static_cast(Winch::WinchAction::AbandonLine); + + command.target_component_id = MAV_COMPONENT::MAV_COMP_ID_WINCH; + + _parent->send_command_async( + command, [this, callback](MavlinkCommandSender::Result result, float) { + command_result_callback(result, callback); + }); +} + +Winch::Result WinchImpl::abandon_line(uint32_t instance) +{ + auto prom = std::promise(); + auto fut = prom.get_future(); + + abandon_line_async(instance, [&prom](Winch::Result result) { prom.set_value(result); }); + + return fut.get(); +} + +void WinchImpl::load_payload_async(uint32_t instance, const Winch::ResultCallback callback) +{ + MavlinkCommandSender::CommandLong command{}; + + command.command = MAV_CMD_DO_WINCH; + command.params.maybe_param1 = static_cast(instance); + command.params.maybe_param2 = static_cast(Winch::WinchAction::LoadPayload); + + command.target_component_id = MAV_COMPONENT::MAV_COMP_ID_WINCH; + + _parent->send_command_async( + command, [this, callback](MavlinkCommandSender::Result result, float) { + command_result_callback(result, callback); + }); +} + +Winch::Result WinchImpl::load_payload(uint32_t instance) +{ + auto prom = std::promise(); + auto fut = prom.get_future(); + + load_payload_async(instance, [&prom](Winch::Result result) { prom.set_value(result); }); + + return fut.get(); +} + +Winch::Result WinchImpl::winch_result_from_command_result(MavlinkCommandSender::Result result) +{ + switch (result) { + case MavlinkCommandSender::Result::Success: + return Winch::Result::Success; + case MavlinkCommandSender::Result::NoSystem: + return Winch::Result::NoSystem; + case MavlinkCommandSender::Result::ConnectionError: + // Fallthrough + case MavlinkCommandSender::Result::Timeout: + return Winch::Result::Timeout; + case MavlinkCommandSender::Result::Busy: + return Winch::Result::Busy; + case MavlinkCommandSender::Result::Denied: + // Fallthrough + case MavlinkCommandSender::Result::TemporarilyRejected: + // Fallthrough + case MavlinkCommandSender::Result::Failed: + return Winch::Result::Failed; + case MavlinkCommandSender::Result::Unsupported: + return Winch::Result::Unsupported; + default: + return Winch::Result::Unknown; + } +} + +void WinchImpl::command_result_callback( + MavlinkCommandSender::Result command_result, const Winch::ResultCallback& callback) const +{ + Winch::Result action_result = winch_result_from_command_result(command_result); + + if (callback) { + auto temp_callback = callback; + _parent->call_user_callback( + [temp_callback, action_result]() { temp_callback(action_result); }); + } +} + +} // namespace mavsdk \ No newline at end of file diff --git a/src/mavsdk/plugins/winch/winch_impl.h b/src/mavsdk/plugins/winch/winch_impl.h new file mode 100644 index 0000000000..d4fbc6ca82 --- /dev/null +++ b/src/mavsdk/plugins/winch/winch_impl.h @@ -0,0 +1,79 @@ +#pragma once + +#include + +#include "plugins/winch/winch.h" +#include "mavlink_include.h" +#include "plugin_impl_base.h" +#include "callback_list.h" + +namespace mavsdk { + +class WinchImpl : public PluginImplBase { +public: + explicit WinchImpl(System& system); + explicit WinchImpl(std::shared_ptr system); + + ~WinchImpl() override; + + void init() override; + void deinit() override; + + void enable() override; + void disable() override; + + void relax_async(uint32_t instance, const Winch::ResultCallback callback); + Winch::Result relax(uint32_t instance); + + void relative_length_control_async( + uint32_t instance, float length, float rate, const Winch::ResultCallback callback); + Winch::Result relative_length_control(uint32_t instance, float length, float rate); + + void rate_control_async(uint32_t instance, float rate, const Winch::ResultCallback callback); + Winch::Result rate_control(uint32_t instance, float rate); + + void lock_async(uint32_t instance, const Winch::ResultCallback callback); + Winch::Result lock(uint32_t instance); + + void deliver_async(uint32_t instance, const Winch::ResultCallback callback); + Winch::Result deliver(uint32_t instance); + + void hold_async(uint32_t instance, const Winch::ResultCallback callback); + Winch::Result hold(uint32_t instance); + + void retract_async(uint32_t instance, const Winch::ResultCallback callback); + Winch::Result retract(uint32_t instance); + + void load_line_async(uint32_t instance, const Winch::ResultCallback callback); + Winch::Result load_line(uint32_t instance); + + void abandon_line_async(uint32_t instance, const Winch::ResultCallback callback); + Winch::Result abandon_line(uint32_t instance); + + void load_payload_async(uint32_t instance, const Winch::ResultCallback callback); + Winch::Result load_payload(uint32_t instance); + + Winch::Status status() const; + + Winch::StatusHandle subscribe_status(const Winch::StatusCallback& callback); + void unsubscribe_status(Winch::StatusHandle handle); + +private: + static Winch::Result winch_result_from_command_result(MavlinkCommandSender::Result result); + + void command_result_callback( + MavlinkCommandSender::Result command_result, const Winch::ResultCallback& callback) const; + + void set_status(Winch::Status status); + + void process_status(const mavlink_message_t& message); + + mutable std::mutex _status_mutex{}; + Winch::Status _status{}; + + std::mutex _subscription_mutex{}; + + CallbackList _status_subscriptions{}; +}; + +} // namespace mavsdk \ No newline at end of file diff --git a/src/mavsdk_server/src/generated/gripper/gripper.grpc.pb.cc b/src/mavsdk_server/src/generated/gripper/gripper.grpc.pb.cc new file mode 100644 index 0000000000..e7e5abc865 --- /dev/null +++ b/src/mavsdk_server/src/generated/gripper/gripper.grpc.pb.cc @@ -0,0 +1,132 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: gripper/gripper.proto + +#include "gripper/gripper.pb.h" +#include "gripper/gripper.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace mavsdk { +namespace rpc { +namespace gripper { + +static const char* GripperService_method_names[] = { + "/mavsdk.rpc.gripper.GripperService/Grab", + "/mavsdk.rpc.gripper.GripperService/Release", +}; + +std::unique_ptr< GripperService::Stub> GripperService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< GripperService::Stub> stub(new GripperService::Stub(channel, options)); + return stub; +} + +GripperService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) + : channel_(channel), rpcmethod_Grab_(GripperService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_Release_(GripperService_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status GripperService::Stub::Grab(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::GrabRequest& request, ::mavsdk::rpc::gripper::GrabResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::mavsdk::rpc::gripper::GrabRequest, ::mavsdk::rpc::gripper::GrabResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Grab_, context, request, response); +} + +void GripperService::Stub::async::Grab(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::GrabRequest* request, ::mavsdk::rpc::gripper::GrabResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::mavsdk::rpc::gripper::GrabRequest, ::mavsdk::rpc::gripper::GrabResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Grab_, context, request, response, std::move(f)); +} + +void GripperService::Stub::async::Grab(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::GrabRequest* request, ::mavsdk::rpc::gripper::GrabResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Grab_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::gripper::GrabResponse>* GripperService::Stub::PrepareAsyncGrabRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::GrabRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::mavsdk::rpc::gripper::GrabResponse, ::mavsdk::rpc::gripper::GrabRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Grab_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::gripper::GrabResponse>* GripperService::Stub::AsyncGrabRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::GrabRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncGrabRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status GripperService::Stub::Release(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::ReleaseRequest& request, ::mavsdk::rpc::gripper::ReleaseResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::mavsdk::rpc::gripper::ReleaseRequest, ::mavsdk::rpc::gripper::ReleaseResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Release_, context, request, response); +} + +void GripperService::Stub::async::Release(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::ReleaseRequest* request, ::mavsdk::rpc::gripper::ReleaseResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::mavsdk::rpc::gripper::ReleaseRequest, ::mavsdk::rpc::gripper::ReleaseResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Release_, context, request, response, std::move(f)); +} + +void GripperService::Stub::async::Release(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::ReleaseRequest* request, ::mavsdk::rpc::gripper::ReleaseResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Release_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::gripper::ReleaseResponse>* GripperService::Stub::PrepareAsyncReleaseRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::ReleaseRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::mavsdk::rpc::gripper::ReleaseResponse, ::mavsdk::rpc::gripper::ReleaseRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Release_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::gripper::ReleaseResponse>* GripperService::Stub::AsyncReleaseRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::ReleaseRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncReleaseRaw(context, request, cq); + result->StartCall(); + return result; +} + +GripperService::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + GripperService_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< GripperService::Service, ::mavsdk::rpc::gripper::GrabRequest, ::mavsdk::rpc::gripper::GrabResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](GripperService::Service* service, + ::grpc::ServerContext* ctx, + const ::mavsdk::rpc::gripper::GrabRequest* req, + ::mavsdk::rpc::gripper::GrabResponse* resp) { + return service->Grab(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + GripperService_method_names[1], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< GripperService::Service, ::mavsdk::rpc::gripper::ReleaseRequest, ::mavsdk::rpc::gripper::ReleaseResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](GripperService::Service* service, + ::grpc::ServerContext* ctx, + const ::mavsdk::rpc::gripper::ReleaseRequest* req, + ::mavsdk::rpc::gripper::ReleaseResponse* resp) { + return service->Release(ctx, req, resp); + }, this))); +} + +GripperService::Service::~Service() { +} + +::grpc::Status GripperService::Service::Grab(::grpc::ServerContext* context, const ::mavsdk::rpc::gripper::GrabRequest* request, ::mavsdk::rpc::gripper::GrabResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status GripperService::Service::Release(::grpc::ServerContext* context, const ::mavsdk::rpc::gripper::ReleaseRequest* request, ::mavsdk::rpc::gripper::ReleaseResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +} // namespace mavsdk +} // namespace rpc +} // namespace gripper + diff --git a/src/mavsdk_server/src/generated/gripper/gripper.grpc.pb.h b/src/mavsdk_server/src/generated/gripper/gripper.grpc.pb.h new file mode 100644 index 0000000000..5446e5e87e --- /dev/null +++ b/src/mavsdk_server/src/generated/gripper/gripper.grpc.pb.h @@ -0,0 +1,415 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: gripper/gripper.proto +#ifndef GRPC_gripper_2fgripper_2eproto__INCLUDED +#define GRPC_gripper_2fgripper_2eproto__INCLUDED + +#include "gripper/gripper.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace mavsdk { +namespace rpc { +namespace gripper { + +// +// Allows users to send gripper actions. +class GripperService final { + public: + static constexpr char const* service_full_name() { + return "mavsdk.rpc.gripper.GripperService"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + // + // Gripper grab cargo. + virtual ::grpc::Status Grab(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::GrabRequest& request, ::mavsdk::rpc::gripper::GrabResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::gripper::GrabResponse>> AsyncGrab(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::GrabRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::gripper::GrabResponse>>(AsyncGrabRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::gripper::GrabResponse>> PrepareAsyncGrab(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::GrabRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::gripper::GrabResponse>>(PrepareAsyncGrabRaw(context, request, cq)); + } + // + // Gripper release cargo. + virtual ::grpc::Status Release(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::ReleaseRequest& request, ::mavsdk::rpc::gripper::ReleaseResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::gripper::ReleaseResponse>> AsyncRelease(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::ReleaseRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::gripper::ReleaseResponse>>(AsyncReleaseRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::gripper::ReleaseResponse>> PrepareAsyncRelease(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::ReleaseRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::gripper::ReleaseResponse>>(PrepareAsyncReleaseRaw(context, request, cq)); + } + class async_interface { + public: + virtual ~async_interface() {} + // + // Gripper grab cargo. + virtual void Grab(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::GrabRequest* request, ::mavsdk::rpc::gripper::GrabResponse* response, std::function) = 0; + virtual void Grab(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::GrabRequest* request, ::mavsdk::rpc::gripper::GrabResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + // + // Gripper release cargo. + virtual void Release(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::ReleaseRequest* request, ::mavsdk::rpc::gripper::ReleaseResponse* response, std::function) = 0; + virtual void Release(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::ReleaseRequest* request, ::mavsdk::rpc::gripper::ReleaseResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + }; + typedef class async_interface experimental_async_interface; + virtual class async_interface* async() { return nullptr; } + class async_interface* experimental_async() { return async(); } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::gripper::GrabResponse>* AsyncGrabRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::GrabRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::gripper::GrabResponse>* PrepareAsyncGrabRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::GrabRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::gripper::ReleaseResponse>* AsyncReleaseRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::ReleaseRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::gripper::ReleaseResponse>* PrepareAsyncReleaseRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::ReleaseRequest& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + ::grpc::Status Grab(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::GrabRequest& request, ::mavsdk::rpc::gripper::GrabResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::gripper::GrabResponse>> AsyncGrab(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::GrabRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::gripper::GrabResponse>>(AsyncGrabRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::gripper::GrabResponse>> PrepareAsyncGrab(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::GrabRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::gripper::GrabResponse>>(PrepareAsyncGrabRaw(context, request, cq)); + } + ::grpc::Status Release(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::ReleaseRequest& request, ::mavsdk::rpc::gripper::ReleaseResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::gripper::ReleaseResponse>> AsyncRelease(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::ReleaseRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::gripper::ReleaseResponse>>(AsyncReleaseRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::gripper::ReleaseResponse>> PrepareAsyncRelease(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::ReleaseRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::gripper::ReleaseResponse>>(PrepareAsyncReleaseRaw(context, request, cq)); + } + class async final : + public StubInterface::async_interface { + public: + void Grab(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::GrabRequest* request, ::mavsdk::rpc::gripper::GrabResponse* response, std::function) override; + void Grab(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::GrabRequest* request, ::mavsdk::rpc::gripper::GrabResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void Release(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::ReleaseRequest* request, ::mavsdk::rpc::gripper::ReleaseResponse* response, std::function) override; + void Release(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::ReleaseRequest* request, ::mavsdk::rpc::gripper::ReleaseResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + private: + friend class Stub; + explicit async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class async* async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class async async_stub_{this}; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::gripper::GrabResponse>* AsyncGrabRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::GrabRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::gripper::GrabResponse>* PrepareAsyncGrabRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::GrabRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::gripper::ReleaseResponse>* AsyncReleaseRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::ReleaseRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::gripper::ReleaseResponse>* PrepareAsyncReleaseRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::gripper::ReleaseRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_Grab_; + const ::grpc::internal::RpcMethod rpcmethod_Release_; + }; + static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + + class Service : public ::grpc::Service { + public: + Service(); + virtual ~Service(); + // + // Gripper grab cargo. + virtual ::grpc::Status Grab(::grpc::ServerContext* context, const ::mavsdk::rpc::gripper::GrabRequest* request, ::mavsdk::rpc::gripper::GrabResponse* response); + // + // Gripper release cargo. + virtual ::grpc::Status Release(::grpc::ServerContext* context, const ::mavsdk::rpc::gripper::ReleaseRequest* request, ::mavsdk::rpc::gripper::ReleaseResponse* response); + }; + template + class WithAsyncMethod_Grab : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_Grab() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_Grab() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Grab(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::gripper::GrabRequest* /*request*/, ::mavsdk::rpc::gripper::GrabResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGrab(::grpc::ServerContext* context, ::mavsdk::rpc::gripper::GrabRequest* request, ::grpc::ServerAsyncResponseWriter< ::mavsdk::rpc::gripper::GrabResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_Release : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_Release() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_Release() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Release(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::gripper::ReleaseRequest* /*request*/, ::mavsdk::rpc::gripper::ReleaseResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRelease(::grpc::ServerContext* context, ::mavsdk::rpc::gripper::ReleaseRequest* request, ::grpc::ServerAsyncResponseWriter< ::mavsdk::rpc::gripper::ReleaseResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_Grab > AsyncService; + template + class WithCallbackMethod_Grab : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_Grab() { + ::grpc::Service::MarkMethodCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::gripper::GrabRequest, ::mavsdk::rpc::gripper::GrabResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::mavsdk::rpc::gripper::GrabRequest* request, ::mavsdk::rpc::gripper::GrabResponse* response) { return this->Grab(context, request, response); }));} + void SetMessageAllocatorFor_Grab( + ::grpc::MessageAllocator< ::mavsdk::rpc::gripper::GrabRequest, ::mavsdk::rpc::gripper::GrabResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); + static_cast<::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::gripper::GrabRequest, ::mavsdk::rpc::gripper::GrabResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_Grab() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Grab(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::gripper::GrabRequest* /*request*/, ::mavsdk::rpc::gripper::GrabResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* Grab( + ::grpc::CallbackServerContext* /*context*/, const ::mavsdk::rpc::gripper::GrabRequest* /*request*/, ::mavsdk::rpc::gripper::GrabResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_Release : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_Release() { + ::grpc::Service::MarkMethodCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::gripper::ReleaseRequest, ::mavsdk::rpc::gripper::ReleaseResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::mavsdk::rpc::gripper::ReleaseRequest* request, ::mavsdk::rpc::gripper::ReleaseResponse* response) { return this->Release(context, request, response); }));} + void SetMessageAllocatorFor_Release( + ::grpc::MessageAllocator< ::mavsdk::rpc::gripper::ReleaseRequest, ::mavsdk::rpc::gripper::ReleaseResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); + static_cast<::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::gripper::ReleaseRequest, ::mavsdk::rpc::gripper::ReleaseResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_Release() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Release(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::gripper::ReleaseRequest* /*request*/, ::mavsdk::rpc::gripper::ReleaseResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* Release( + ::grpc::CallbackServerContext* /*context*/, const ::mavsdk::rpc::gripper::ReleaseRequest* /*request*/, ::mavsdk::rpc::gripper::ReleaseResponse* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_Grab > CallbackService; + typedef CallbackService ExperimentalCallbackService; + template + class WithGenericMethod_Grab : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_Grab() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_Grab() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Grab(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::gripper::GrabRequest* /*request*/, ::mavsdk::rpc::gripper::GrabResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_Release : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_Release() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_Release() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Release(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::gripper::ReleaseRequest* /*request*/, ::mavsdk::rpc::gripper::ReleaseResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_Grab : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_Grab() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_Grab() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Grab(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::gripper::GrabRequest* /*request*/, ::mavsdk::rpc::gripper::GrabResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGrab(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_Release : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_Release() { + ::grpc::Service::MarkMethodRaw(1); + } + ~WithRawMethod_Release() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Release(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::gripper::ReleaseRequest* /*request*/, ::mavsdk::rpc::gripper::ReleaseResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRelease(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawCallbackMethod_Grab : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_Grab() { + ::grpc::Service::MarkMethodRawCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Grab(context, request, response); })); + } + ~WithRawCallbackMethod_Grab() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Grab(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::gripper::GrabRequest* /*request*/, ::mavsdk::rpc::gripper::GrabResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* Grab( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_Release : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_Release() { + ::grpc::Service::MarkMethodRawCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Release(context, request, response); })); + } + ~WithRawCallbackMethod_Release() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Release(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::gripper::ReleaseRequest* /*request*/, ::mavsdk::rpc::gripper::ReleaseResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* Release( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithStreamedUnaryMethod_Grab : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_Grab() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< + ::mavsdk::rpc::gripper::GrabRequest, ::mavsdk::rpc::gripper::GrabResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::mavsdk::rpc::gripper::GrabRequest, ::mavsdk::rpc::gripper::GrabResponse>* streamer) { + return this->StreamedGrab(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_Grab() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status Grab(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::gripper::GrabRequest* /*request*/, ::mavsdk::rpc::gripper::GrabResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedGrab(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::mavsdk::rpc::gripper::GrabRequest,::mavsdk::rpc::gripper::GrabResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_Release : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_Release() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::StreamedUnaryHandler< + ::mavsdk::rpc::gripper::ReleaseRequest, ::mavsdk::rpc::gripper::ReleaseResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::mavsdk::rpc::gripper::ReleaseRequest, ::mavsdk::rpc::gripper::ReleaseResponse>* streamer) { + return this->StreamedRelease(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_Release() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status Release(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::gripper::ReleaseRequest* /*request*/, ::mavsdk::rpc::gripper::ReleaseResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedRelease(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::mavsdk::rpc::gripper::ReleaseRequest,::mavsdk::rpc::gripper::ReleaseResponse>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_Grab > StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_Grab > StreamedService; +}; + +} // namespace gripper +} // namespace rpc +} // namespace mavsdk + + +#endif // GRPC_gripper_2fgripper_2eproto__INCLUDED diff --git a/src/mavsdk_server/src/generated/gripper/gripper.pb.cc b/src/mavsdk_server/src/generated/gripper/gripper.pb.cc new file mode 100644 index 0000000000..8c5a54e88e --- /dev/null +++ b/src/mavsdk_server/src/generated/gripper/gripper.pb.cc @@ -0,0 +1,1204 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: gripper/gripper.proto + +#include "gripper/gripper.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace mavsdk { +namespace rpc { +namespace gripper { +PROTOBUF_CONSTEXPR GrabRequest::GrabRequest( + ::_pbi::ConstantInitialized) + : instance_(0u){} +struct GrabRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR GrabRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~GrabRequestDefaultTypeInternal() {} + union { + GrabRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GrabRequestDefaultTypeInternal _GrabRequest_default_instance_; +PROTOBUF_CONSTEXPR GrabResponse::GrabResponse( + ::_pbi::ConstantInitialized) + : gripper_result_(nullptr){} +struct GrabResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR GrabResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~GrabResponseDefaultTypeInternal() {} + union { + GrabResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GrabResponseDefaultTypeInternal _GrabResponse_default_instance_; +PROTOBUF_CONSTEXPR ReleaseRequest::ReleaseRequest( + ::_pbi::ConstantInitialized) + : instance_(0u){} +struct ReleaseRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR ReleaseRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ReleaseRequestDefaultTypeInternal() {} + union { + ReleaseRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ReleaseRequestDefaultTypeInternal _ReleaseRequest_default_instance_; +PROTOBUF_CONSTEXPR ReleaseResponse::ReleaseResponse( + ::_pbi::ConstantInitialized) + : gripper_result_(nullptr){} +struct ReleaseResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR ReleaseResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ReleaseResponseDefaultTypeInternal() {} + union { + ReleaseResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ReleaseResponseDefaultTypeInternal _ReleaseResponse_default_instance_; +PROTOBUF_CONSTEXPR GripperResult::GripperResult( + ::_pbi::ConstantInitialized) + : result_str_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) + , result_(0) +{} +struct GripperResultDefaultTypeInternal { + PROTOBUF_CONSTEXPR GripperResultDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~GripperResultDefaultTypeInternal() {} + union { + GripperResult _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GripperResultDefaultTypeInternal _GripperResult_default_instance_; +} // namespace gripper +} // namespace rpc +} // namespace mavsdk +static ::_pb::Metadata file_level_metadata_gripper_2fgripper_2eproto[5]; +static const ::_pb::EnumDescriptor* file_level_enum_descriptors_gripper_2fgripper_2eproto[2]; +static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_gripper_2fgripper_2eproto = nullptr; + +const uint32_t TableStruct_gripper_2fgripper_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::gripper::GrabRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::gripper::GrabRequest, instance_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::gripper::GrabResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::gripper::GrabResponse, gripper_result_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::gripper::ReleaseRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::gripper::ReleaseRequest, instance_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::gripper::ReleaseResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::gripper::ReleaseResponse, gripper_result_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::gripper::GripperResult, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::gripper::GripperResult, result_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::gripper::GripperResult, result_str_), +}; +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, -1, sizeof(::mavsdk::rpc::gripper::GrabRequest)}, + { 7, -1, -1, sizeof(::mavsdk::rpc::gripper::GrabResponse)}, + { 14, -1, -1, sizeof(::mavsdk::rpc::gripper::ReleaseRequest)}, + { 21, -1, -1, sizeof(::mavsdk::rpc::gripper::ReleaseResponse)}, + { 28, -1, -1, sizeof(::mavsdk::rpc::gripper::GripperResult)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::mavsdk::rpc::gripper::_GrabRequest_default_instance_._instance, + &::mavsdk::rpc::gripper::_GrabResponse_default_instance_._instance, + &::mavsdk::rpc::gripper::_ReleaseRequest_default_instance_._instance, + &::mavsdk::rpc::gripper::_ReleaseResponse_default_instance_._instance, + &::mavsdk::rpc::gripper::_GripperResult_default_instance_._instance, +}; + +const char descriptor_table_protodef_gripper_2fgripper_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\025gripper/gripper.proto\022\022mavsdk.rpc.grip" + "per\"\037\n\013GrabRequest\022\020\n\010instance\030\001 \001(\r\"I\n\014" + "GrabResponse\0229\n\016gripper_result\030\001 \001(\0132!.m" + "avsdk.rpc.gripper.GripperResult\"\"\n\016Relea" + "seRequest\022\020\n\010instance\030\001 \001(\r\"L\n\017ReleaseRe" + "sponse\0229\n\016gripper_result\030\001 \001(\0132!.mavsdk." + "rpc.gripper.GripperResult\"\366\001\n\rGripperRes" + "ult\0228\n\006result\030\001 \001(\0162(.mavsdk.rpc.gripper" + ".GripperResult.Result\022\022\n\nresult_str\030\002 \001(" + "\t\"\226\001\n\006Result\022\022\n\016RESULT_UNKNOWN\020\000\022\022\n\016RESU" + "LT_SUCCESS\020\001\022\024\n\020RESULT_NO_SYSTEM\020\002\022\017\n\013RE" + "SULT_BUSY\020\003\022\022\n\016RESULT_TIMEOUT\020\004\022\026\n\022RESUL" + "T_UNSUPPORTED\020\005\022\021\n\rRESULT_FAILED\020\006*D\n\rGr" + "ipperAction\022\032\n\026GRIPPER_ACTION_RELEASE\020\000\022" + "\027\n\023GRIPPER_ACTION_GRAB\020\0012\263\001\n\016GripperServ" + "ice\022K\n\004Grab\022\037.mavsdk.rpc.gripper.GrabReq" + "uest\032 .mavsdk.rpc.gripper.GrabResponse\"\000" + "\022T\n\007Release\022\".mavsdk.rpc.gripper.Release" + "Request\032#.mavsdk.rpc.gripper.ReleaseResp" + "onse\"\000B!\n\021io.mavsdk.gripperB\014GripperProt" + "ob\006proto3" + ; +static ::_pbi::once_flag descriptor_table_gripper_2fgripper_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_gripper_2fgripper_2eproto = { + false, false, 809, descriptor_table_protodef_gripper_2fgripper_2eproto, + "gripper/gripper.proto", + &descriptor_table_gripper_2fgripper_2eproto_once, nullptr, 0, 5, + schemas, file_default_instances, TableStruct_gripper_2fgripper_2eproto::offsets, + file_level_metadata_gripper_2fgripper_2eproto, file_level_enum_descriptors_gripper_2fgripper_2eproto, + file_level_service_descriptors_gripper_2fgripper_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_gripper_2fgripper_2eproto_getter() { + return &descriptor_table_gripper_2fgripper_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_gripper_2fgripper_2eproto(&descriptor_table_gripper_2fgripper_2eproto); +namespace mavsdk { +namespace rpc { +namespace gripper { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* GripperResult_Result_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_gripper_2fgripper_2eproto); + return file_level_enum_descriptors_gripper_2fgripper_2eproto[0]; +} +bool GripperResult_Result_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr GripperResult_Result GripperResult::RESULT_UNKNOWN; +constexpr GripperResult_Result GripperResult::RESULT_SUCCESS; +constexpr GripperResult_Result GripperResult::RESULT_NO_SYSTEM; +constexpr GripperResult_Result GripperResult::RESULT_BUSY; +constexpr GripperResult_Result GripperResult::RESULT_TIMEOUT; +constexpr GripperResult_Result GripperResult::RESULT_UNSUPPORTED; +constexpr GripperResult_Result GripperResult::RESULT_FAILED; +constexpr GripperResult_Result GripperResult::Result_MIN; +constexpr GripperResult_Result GripperResult::Result_MAX; +constexpr int GripperResult::Result_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* GripperAction_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_gripper_2fgripper_2eproto); + return file_level_enum_descriptors_gripper_2fgripper_2eproto[1]; +} +bool GripperAction_IsValid(int value) { + switch (value) { + case 0: + case 1: + return true; + default: + return false; + } +} + + +// =================================================================== + +class GrabRequest::_Internal { + public: +}; + +GrabRequest::GrabRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.gripper.GrabRequest) +} +GrabRequest::GrabRequest(const GrabRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + instance_ = from.instance_; + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.gripper.GrabRequest) +} + +inline void GrabRequest::SharedCtor() { +instance_ = 0u; +} + +GrabRequest::~GrabRequest() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.gripper.GrabRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void GrabRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void GrabRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void GrabRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.gripper.GrabRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + instance_ = 0u; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GrabRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // uint32 instance = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + instance_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* GrabRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.gripper.GrabRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_instance(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.gripper.GrabRequest) + return target; +} + +size_t GrabRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.gripper.GrabRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_instance()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GrabRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + GrabRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GrabRequest::GetClassData() const { return &_class_data_; } + +void GrabRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void GrabRequest::MergeFrom(const GrabRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.gripper.GrabRequest) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_instance() != 0) { + _internal_set_instance(from._internal_instance()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GrabRequest::CopyFrom(const GrabRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.gripper.GrabRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GrabRequest::IsInitialized() const { + return true; +} + +void GrabRequest::InternalSwap(GrabRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(instance_, other->instance_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GrabRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_gripper_2fgripper_2eproto_getter, &descriptor_table_gripper_2fgripper_2eproto_once, + file_level_metadata_gripper_2fgripper_2eproto[0]); +} + +// =================================================================== + +class GrabResponse::_Internal { + public: + static const ::mavsdk::rpc::gripper::GripperResult& gripper_result(const GrabResponse* msg); +}; + +const ::mavsdk::rpc::gripper::GripperResult& +GrabResponse::_Internal::gripper_result(const GrabResponse* msg) { + return *msg->gripper_result_; +} +GrabResponse::GrabResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.gripper.GrabResponse) +} +GrabResponse::GrabResponse(const GrabResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_gripper_result()) { + gripper_result_ = new ::mavsdk::rpc::gripper::GripperResult(*from.gripper_result_); + } else { + gripper_result_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.gripper.GrabResponse) +} + +inline void GrabResponse::SharedCtor() { +gripper_result_ = nullptr; +} + +GrabResponse::~GrabResponse() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.gripper.GrabResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void GrabResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete gripper_result_; +} + +void GrabResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void GrabResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.gripper.GrabResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && gripper_result_ != nullptr) { + delete gripper_result_; + } + gripper_result_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GrabResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .mavsdk.rpc.gripper.GripperResult gripper_result = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_gripper_result(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* GrabResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.gripper.GrabResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .mavsdk.rpc.gripper.GripperResult gripper_result = 1; + if (this->_internal_has_gripper_result()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::gripper_result(this), + _Internal::gripper_result(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.gripper.GrabResponse) + return target; +} + +size_t GrabResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.gripper.GrabResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .mavsdk.rpc.gripper.GripperResult gripper_result = 1; + if (this->_internal_has_gripper_result()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *gripper_result_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GrabResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + GrabResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GrabResponse::GetClassData() const { return &_class_data_; } + +void GrabResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void GrabResponse::MergeFrom(const GrabResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.gripper.GrabResponse) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_gripper_result()) { + _internal_mutable_gripper_result()->::mavsdk::rpc::gripper::GripperResult::MergeFrom(from._internal_gripper_result()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GrabResponse::CopyFrom(const GrabResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.gripper.GrabResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GrabResponse::IsInitialized() const { + return true; +} + +void GrabResponse::InternalSwap(GrabResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(gripper_result_, other->gripper_result_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GrabResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_gripper_2fgripper_2eproto_getter, &descriptor_table_gripper_2fgripper_2eproto_once, + file_level_metadata_gripper_2fgripper_2eproto[1]); +} + +// =================================================================== + +class ReleaseRequest::_Internal { + public: +}; + +ReleaseRequest::ReleaseRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.gripper.ReleaseRequest) +} +ReleaseRequest::ReleaseRequest(const ReleaseRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + instance_ = from.instance_; + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.gripper.ReleaseRequest) +} + +inline void ReleaseRequest::SharedCtor() { +instance_ = 0u; +} + +ReleaseRequest::~ReleaseRequest() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.gripper.ReleaseRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ReleaseRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void ReleaseRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ReleaseRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.gripper.ReleaseRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + instance_ = 0u; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ReleaseRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // uint32 instance = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + instance_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ReleaseRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.gripper.ReleaseRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_instance(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.gripper.ReleaseRequest) + return target; +} + +size_t ReleaseRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.gripper.ReleaseRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_instance()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ReleaseRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + ReleaseRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ReleaseRequest::GetClassData() const { return &_class_data_; } + +void ReleaseRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void ReleaseRequest::MergeFrom(const ReleaseRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.gripper.ReleaseRequest) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_instance() != 0) { + _internal_set_instance(from._internal_instance()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ReleaseRequest::CopyFrom(const ReleaseRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.gripper.ReleaseRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ReleaseRequest::IsInitialized() const { + return true; +} + +void ReleaseRequest::InternalSwap(ReleaseRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(instance_, other->instance_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ReleaseRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_gripper_2fgripper_2eproto_getter, &descriptor_table_gripper_2fgripper_2eproto_once, + file_level_metadata_gripper_2fgripper_2eproto[2]); +} + +// =================================================================== + +class ReleaseResponse::_Internal { + public: + static const ::mavsdk::rpc::gripper::GripperResult& gripper_result(const ReleaseResponse* msg); +}; + +const ::mavsdk::rpc::gripper::GripperResult& +ReleaseResponse::_Internal::gripper_result(const ReleaseResponse* msg) { + return *msg->gripper_result_; +} +ReleaseResponse::ReleaseResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.gripper.ReleaseResponse) +} +ReleaseResponse::ReleaseResponse(const ReleaseResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_gripper_result()) { + gripper_result_ = new ::mavsdk::rpc::gripper::GripperResult(*from.gripper_result_); + } else { + gripper_result_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.gripper.ReleaseResponse) +} + +inline void ReleaseResponse::SharedCtor() { +gripper_result_ = nullptr; +} + +ReleaseResponse::~ReleaseResponse() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.gripper.ReleaseResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ReleaseResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete gripper_result_; +} + +void ReleaseResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ReleaseResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.gripper.ReleaseResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && gripper_result_ != nullptr) { + delete gripper_result_; + } + gripper_result_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ReleaseResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .mavsdk.rpc.gripper.GripperResult gripper_result = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_gripper_result(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ReleaseResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.gripper.ReleaseResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .mavsdk.rpc.gripper.GripperResult gripper_result = 1; + if (this->_internal_has_gripper_result()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::gripper_result(this), + _Internal::gripper_result(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.gripper.ReleaseResponse) + return target; +} + +size_t ReleaseResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.gripper.ReleaseResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .mavsdk.rpc.gripper.GripperResult gripper_result = 1; + if (this->_internal_has_gripper_result()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *gripper_result_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ReleaseResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + ReleaseResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ReleaseResponse::GetClassData() const { return &_class_data_; } + +void ReleaseResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void ReleaseResponse::MergeFrom(const ReleaseResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.gripper.ReleaseResponse) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_gripper_result()) { + _internal_mutable_gripper_result()->::mavsdk::rpc::gripper::GripperResult::MergeFrom(from._internal_gripper_result()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ReleaseResponse::CopyFrom(const ReleaseResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.gripper.ReleaseResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ReleaseResponse::IsInitialized() const { + return true; +} + +void ReleaseResponse::InternalSwap(ReleaseResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(gripper_result_, other->gripper_result_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ReleaseResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_gripper_2fgripper_2eproto_getter, &descriptor_table_gripper_2fgripper_2eproto_once, + file_level_metadata_gripper_2fgripper_2eproto[3]); +} + +// =================================================================== + +class GripperResult::_Internal { + public: +}; + +GripperResult::GripperResult(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.gripper.GripperResult) +} +GripperResult::GripperResult(const GripperResult& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + result_str_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + result_str_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_result_str().empty()) { + result_str_.Set(from._internal_result_str(), + GetArenaForAllocation()); + } + result_ = from.result_; + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.gripper.GripperResult) +} + +inline void GripperResult::SharedCtor() { +result_str_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + result_str_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +result_ = 0; +} + +GripperResult::~GripperResult() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.gripper.GripperResult) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void GripperResult::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + result_str_.Destroy(); +} + +void GripperResult::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void GripperResult::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.gripper.GripperResult) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + result_str_.ClearToEmpty(); + result_ = 0; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GripperResult::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .mavsdk.rpc.gripper.GripperResult.Result result = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_result(static_cast<::mavsdk::rpc::gripper::GripperResult_Result>(val)); + } else + goto handle_unusual; + continue; + // string result_str = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_result_str(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "mavsdk.rpc.gripper.GripperResult.result_str")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* GripperResult::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.gripper.GripperResult) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .mavsdk.rpc.gripper.GripperResult.Result result = 1; + if (this->_internal_result() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_result(), target); + } + + // string result_str = 2; + if (!this->_internal_result_str().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_result_str().data(), static_cast(this->_internal_result_str().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "mavsdk.rpc.gripper.GripperResult.result_str"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_result_str(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.gripper.GripperResult) + return target; +} + +size_t GripperResult::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.gripper.GripperResult) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string result_str = 2; + if (!this->_internal_result_str().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_result_str()); + } + + // .mavsdk.rpc.gripper.GripperResult.Result result = 1; + if (this->_internal_result() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_result()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GripperResult::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + GripperResult::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GripperResult::GetClassData() const { return &_class_data_; } + +void GripperResult::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void GripperResult::MergeFrom(const GripperResult& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.gripper.GripperResult) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_result_str().empty()) { + _internal_set_result_str(from._internal_result_str()); + } + if (from._internal_result() != 0) { + _internal_set_result(from._internal_result()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GripperResult::CopyFrom(const GripperResult& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.gripper.GripperResult) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GripperResult::IsInitialized() const { + return true; +} + +void GripperResult::InternalSwap(GripperResult* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &result_str_, lhs_arena, + &other->result_str_, rhs_arena + ); + swap(result_, other->result_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GripperResult::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_gripper_2fgripper_2eproto_getter, &descriptor_table_gripper_2fgripper_2eproto_once, + file_level_metadata_gripper_2fgripper_2eproto[4]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace gripper +} // namespace rpc +} // namespace mavsdk +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::gripper::GrabRequest* +Arena::CreateMaybeMessage< ::mavsdk::rpc::gripper::GrabRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::gripper::GrabRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::gripper::GrabResponse* +Arena::CreateMaybeMessage< ::mavsdk::rpc::gripper::GrabResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::gripper::GrabResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::gripper::ReleaseRequest* +Arena::CreateMaybeMessage< ::mavsdk::rpc::gripper::ReleaseRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::gripper::ReleaseRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::gripper::ReleaseResponse* +Arena::CreateMaybeMessage< ::mavsdk::rpc::gripper::ReleaseResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::gripper::ReleaseResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::gripper::GripperResult* +Arena::CreateMaybeMessage< ::mavsdk::rpc::gripper::GripperResult >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::gripper::GripperResult >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/src/mavsdk_server/src/generated/gripper/gripper.pb.h b/src/mavsdk_server/src/generated/gripper/gripper.pb.h new file mode 100644 index 0000000000..7411ff314f --- /dev/null +++ b/src/mavsdk_server/src/generated/gripper/gripper.pb.h @@ -0,0 +1,1277 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: gripper/gripper.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_gripper_2fgripper_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_gripper_2fgripper_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3020000 +#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 3020001 < 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 +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_gripper_2fgripper_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_gripper_2fgripper_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_gripper_2fgripper_2eproto; +namespace mavsdk { +namespace rpc { +namespace gripper { +class GrabRequest; +struct GrabRequestDefaultTypeInternal; +extern GrabRequestDefaultTypeInternal _GrabRequest_default_instance_; +class GrabResponse; +struct GrabResponseDefaultTypeInternal; +extern GrabResponseDefaultTypeInternal _GrabResponse_default_instance_; +class GripperResult; +struct GripperResultDefaultTypeInternal; +extern GripperResultDefaultTypeInternal _GripperResult_default_instance_; +class ReleaseRequest; +struct ReleaseRequestDefaultTypeInternal; +extern ReleaseRequestDefaultTypeInternal _ReleaseRequest_default_instance_; +class ReleaseResponse; +struct ReleaseResponseDefaultTypeInternal; +extern ReleaseResponseDefaultTypeInternal _ReleaseResponse_default_instance_; +} // namespace gripper +} // namespace rpc +} // namespace mavsdk +PROTOBUF_NAMESPACE_OPEN +template<> ::mavsdk::rpc::gripper::GrabRequest* Arena::CreateMaybeMessage<::mavsdk::rpc::gripper::GrabRequest>(Arena*); +template<> ::mavsdk::rpc::gripper::GrabResponse* Arena::CreateMaybeMessage<::mavsdk::rpc::gripper::GrabResponse>(Arena*); +template<> ::mavsdk::rpc::gripper::GripperResult* Arena::CreateMaybeMessage<::mavsdk::rpc::gripper::GripperResult>(Arena*); +template<> ::mavsdk::rpc::gripper::ReleaseRequest* Arena::CreateMaybeMessage<::mavsdk::rpc::gripper::ReleaseRequest>(Arena*); +template<> ::mavsdk::rpc::gripper::ReleaseResponse* Arena::CreateMaybeMessage<::mavsdk::rpc::gripper::ReleaseResponse>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace mavsdk { +namespace rpc { +namespace gripper { + +enum GripperResult_Result : int { + GripperResult_Result_RESULT_UNKNOWN = 0, + GripperResult_Result_RESULT_SUCCESS = 1, + GripperResult_Result_RESULT_NO_SYSTEM = 2, + GripperResult_Result_RESULT_BUSY = 3, + GripperResult_Result_RESULT_TIMEOUT = 4, + GripperResult_Result_RESULT_UNSUPPORTED = 5, + GripperResult_Result_RESULT_FAILED = 6, + GripperResult_Result_GripperResult_Result_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + GripperResult_Result_GripperResult_Result_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool GripperResult_Result_IsValid(int value); +constexpr GripperResult_Result GripperResult_Result_Result_MIN = GripperResult_Result_RESULT_UNKNOWN; +constexpr GripperResult_Result GripperResult_Result_Result_MAX = GripperResult_Result_RESULT_FAILED; +constexpr int GripperResult_Result_Result_ARRAYSIZE = GripperResult_Result_Result_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* GripperResult_Result_descriptor(); +template +inline const std::string& GripperResult_Result_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function GripperResult_Result_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + GripperResult_Result_descriptor(), enum_t_value); +} +inline bool GripperResult_Result_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, GripperResult_Result* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + GripperResult_Result_descriptor(), name, value); +} +enum GripperAction : int { + GRIPPER_ACTION_RELEASE = 0, + GRIPPER_ACTION_GRAB = 1, + GripperAction_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + GripperAction_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool GripperAction_IsValid(int value); +constexpr GripperAction GripperAction_MIN = GRIPPER_ACTION_RELEASE; +constexpr GripperAction GripperAction_MAX = GRIPPER_ACTION_GRAB; +constexpr int GripperAction_ARRAYSIZE = GripperAction_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* GripperAction_descriptor(); +template +inline const std::string& GripperAction_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function GripperAction_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + GripperAction_descriptor(), enum_t_value); +} +inline bool GripperAction_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, GripperAction* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + GripperAction_descriptor(), name, value); +} +// =================================================================== + +class GrabRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.gripper.GrabRequest) */ { + public: + inline GrabRequest() : GrabRequest(nullptr) {} + ~GrabRequest() override; + explicit PROTOBUF_CONSTEXPR GrabRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GrabRequest(const GrabRequest& from); + GrabRequest(GrabRequest&& from) noexcept + : GrabRequest() { + *this = ::std::move(from); + } + + inline GrabRequest& operator=(const GrabRequest& from) { + CopyFrom(from); + return *this; + } + inline GrabRequest& operator=(GrabRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GrabRequest& default_instance() { + return *internal_default_instance(); + } + static inline const GrabRequest* internal_default_instance() { + return reinterpret_cast( + &_GrabRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(GrabRequest& a, GrabRequest& b) { + a.Swap(&b); + } + inline void Swap(GrabRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GrabRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GrabRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GrabRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const GrabRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GrabRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.gripper.GrabRequest"; + } + protected: + explicit GrabRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInstanceFieldNumber = 1, + }; + // uint32 instance = 1; + void clear_instance(); + uint32_t instance() const; + void set_instance(uint32_t value); + private: + uint32_t _internal_instance() const; + void _internal_set_instance(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.gripper.GrabRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + uint32_t instance_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_gripper_2fgripper_2eproto; +}; +// ------------------------------------------------------------------- + +class GrabResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.gripper.GrabResponse) */ { + public: + inline GrabResponse() : GrabResponse(nullptr) {} + ~GrabResponse() override; + explicit PROTOBUF_CONSTEXPR GrabResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GrabResponse(const GrabResponse& from); + GrabResponse(GrabResponse&& from) noexcept + : GrabResponse() { + *this = ::std::move(from); + } + + inline GrabResponse& operator=(const GrabResponse& from) { + CopyFrom(from); + return *this; + } + inline GrabResponse& operator=(GrabResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GrabResponse& default_instance() { + return *internal_default_instance(); + } + static inline const GrabResponse* internal_default_instance() { + return reinterpret_cast( + &_GrabResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(GrabResponse& a, GrabResponse& b) { + a.Swap(&b); + } + inline void Swap(GrabResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GrabResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GrabResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GrabResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const GrabResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GrabResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.gripper.GrabResponse"; + } + protected: + explicit GrabResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kGripperResultFieldNumber = 1, + }; + // .mavsdk.rpc.gripper.GripperResult gripper_result = 1; + bool has_gripper_result() const; + private: + bool _internal_has_gripper_result() const; + public: + void clear_gripper_result(); + const ::mavsdk::rpc::gripper::GripperResult& gripper_result() const; + PROTOBUF_NODISCARD ::mavsdk::rpc::gripper::GripperResult* release_gripper_result(); + ::mavsdk::rpc::gripper::GripperResult* mutable_gripper_result(); + void set_allocated_gripper_result(::mavsdk::rpc::gripper::GripperResult* gripper_result); + private: + const ::mavsdk::rpc::gripper::GripperResult& _internal_gripper_result() const; + ::mavsdk::rpc::gripper::GripperResult* _internal_mutable_gripper_result(); + public: + void unsafe_arena_set_allocated_gripper_result( + ::mavsdk::rpc::gripper::GripperResult* gripper_result); + ::mavsdk::rpc::gripper::GripperResult* unsafe_arena_release_gripper_result(); + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.gripper.GrabResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::mavsdk::rpc::gripper::GripperResult* gripper_result_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_gripper_2fgripper_2eproto; +}; +// ------------------------------------------------------------------- + +class ReleaseRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.gripper.ReleaseRequest) */ { + public: + inline ReleaseRequest() : ReleaseRequest(nullptr) {} + ~ReleaseRequest() override; + explicit PROTOBUF_CONSTEXPR ReleaseRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ReleaseRequest(const ReleaseRequest& from); + ReleaseRequest(ReleaseRequest&& from) noexcept + : ReleaseRequest() { + *this = ::std::move(from); + } + + inline ReleaseRequest& operator=(const ReleaseRequest& from) { + CopyFrom(from); + return *this; + } + inline ReleaseRequest& operator=(ReleaseRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ReleaseRequest& default_instance() { + return *internal_default_instance(); + } + static inline const ReleaseRequest* internal_default_instance() { + return reinterpret_cast( + &_ReleaseRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(ReleaseRequest& a, ReleaseRequest& b) { + a.Swap(&b); + } + inline void Swap(ReleaseRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ReleaseRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ReleaseRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ReleaseRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const ReleaseRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ReleaseRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.gripper.ReleaseRequest"; + } + protected: + explicit ReleaseRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInstanceFieldNumber = 1, + }; + // uint32 instance = 1; + void clear_instance(); + uint32_t instance() const; + void set_instance(uint32_t value); + private: + uint32_t _internal_instance() const; + void _internal_set_instance(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.gripper.ReleaseRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + uint32_t instance_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_gripper_2fgripper_2eproto; +}; +// ------------------------------------------------------------------- + +class ReleaseResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.gripper.ReleaseResponse) */ { + public: + inline ReleaseResponse() : ReleaseResponse(nullptr) {} + ~ReleaseResponse() override; + explicit PROTOBUF_CONSTEXPR ReleaseResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ReleaseResponse(const ReleaseResponse& from); + ReleaseResponse(ReleaseResponse&& from) noexcept + : ReleaseResponse() { + *this = ::std::move(from); + } + + inline ReleaseResponse& operator=(const ReleaseResponse& from) { + CopyFrom(from); + return *this; + } + inline ReleaseResponse& operator=(ReleaseResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ReleaseResponse& default_instance() { + return *internal_default_instance(); + } + static inline const ReleaseResponse* internal_default_instance() { + return reinterpret_cast( + &_ReleaseResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(ReleaseResponse& a, ReleaseResponse& b) { + a.Swap(&b); + } + inline void Swap(ReleaseResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ReleaseResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ReleaseResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ReleaseResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const ReleaseResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ReleaseResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.gripper.ReleaseResponse"; + } + protected: + explicit ReleaseResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kGripperResultFieldNumber = 1, + }; + // .mavsdk.rpc.gripper.GripperResult gripper_result = 1; + bool has_gripper_result() const; + private: + bool _internal_has_gripper_result() const; + public: + void clear_gripper_result(); + const ::mavsdk::rpc::gripper::GripperResult& gripper_result() const; + PROTOBUF_NODISCARD ::mavsdk::rpc::gripper::GripperResult* release_gripper_result(); + ::mavsdk::rpc::gripper::GripperResult* mutable_gripper_result(); + void set_allocated_gripper_result(::mavsdk::rpc::gripper::GripperResult* gripper_result); + private: + const ::mavsdk::rpc::gripper::GripperResult& _internal_gripper_result() const; + ::mavsdk::rpc::gripper::GripperResult* _internal_mutable_gripper_result(); + public: + void unsafe_arena_set_allocated_gripper_result( + ::mavsdk::rpc::gripper::GripperResult* gripper_result); + ::mavsdk::rpc::gripper::GripperResult* unsafe_arena_release_gripper_result(); + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.gripper.ReleaseResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::mavsdk::rpc::gripper::GripperResult* gripper_result_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_gripper_2fgripper_2eproto; +}; +// ------------------------------------------------------------------- + +class GripperResult final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.gripper.GripperResult) */ { + public: + inline GripperResult() : GripperResult(nullptr) {} + ~GripperResult() override; + explicit PROTOBUF_CONSTEXPR GripperResult(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GripperResult(const GripperResult& from); + GripperResult(GripperResult&& from) noexcept + : GripperResult() { + *this = ::std::move(from); + } + + inline GripperResult& operator=(const GripperResult& from) { + CopyFrom(from); + return *this; + } + inline GripperResult& operator=(GripperResult&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GripperResult& default_instance() { + return *internal_default_instance(); + } + static inline const GripperResult* internal_default_instance() { + return reinterpret_cast( + &_GripperResult_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(GripperResult& a, GripperResult& b) { + a.Swap(&b); + } + inline void Swap(GripperResult* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GripperResult* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GripperResult* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GripperResult& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const GripperResult& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GripperResult* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.gripper.GripperResult"; + } + protected: + explicit GripperResult(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef GripperResult_Result Result; + static constexpr Result RESULT_UNKNOWN = + GripperResult_Result_RESULT_UNKNOWN; + static constexpr Result RESULT_SUCCESS = + GripperResult_Result_RESULT_SUCCESS; + static constexpr Result RESULT_NO_SYSTEM = + GripperResult_Result_RESULT_NO_SYSTEM; + static constexpr Result RESULT_BUSY = + GripperResult_Result_RESULT_BUSY; + static constexpr Result RESULT_TIMEOUT = + GripperResult_Result_RESULT_TIMEOUT; + static constexpr Result RESULT_UNSUPPORTED = + GripperResult_Result_RESULT_UNSUPPORTED; + static constexpr Result RESULT_FAILED = + GripperResult_Result_RESULT_FAILED; + static inline bool Result_IsValid(int value) { + return GripperResult_Result_IsValid(value); + } + static constexpr Result Result_MIN = + GripperResult_Result_Result_MIN; + static constexpr Result Result_MAX = + GripperResult_Result_Result_MAX; + static constexpr int Result_ARRAYSIZE = + GripperResult_Result_Result_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + Result_descriptor() { + return GripperResult_Result_descriptor(); + } + template + static inline const std::string& Result_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Result_Name."); + return GripperResult_Result_Name(enum_t_value); + } + static inline bool Result_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Result* value) { + return GripperResult_Result_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kResultStrFieldNumber = 2, + kResultFieldNumber = 1, + }; + // string result_str = 2; + void clear_result_str(); + const std::string& result_str() const; + template + void set_result_str(ArgT0&& arg0, ArgT... args); + std::string* mutable_result_str(); + PROTOBUF_NODISCARD std::string* release_result_str(); + void set_allocated_result_str(std::string* result_str); + private: + const std::string& _internal_result_str() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_result_str(const std::string& value); + std::string* _internal_mutable_result_str(); + public: + + // .mavsdk.rpc.gripper.GripperResult.Result result = 1; + void clear_result(); + ::mavsdk::rpc::gripper::GripperResult_Result result() const; + void set_result(::mavsdk::rpc::gripper::GripperResult_Result value); + private: + ::mavsdk::rpc::gripper::GripperResult_Result _internal_result() const; + void _internal_set_result(::mavsdk::rpc::gripper::GripperResult_Result value); + public: + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.gripper.GripperResult) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr result_str_; + int result_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_gripper_2fgripper_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// GrabRequest + +// uint32 instance = 1; +inline void GrabRequest::clear_instance() { + instance_ = 0u; +} +inline uint32_t GrabRequest::_internal_instance() const { + return instance_; +} +inline uint32_t GrabRequest::instance() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.gripper.GrabRequest.instance) + return _internal_instance(); +} +inline void GrabRequest::_internal_set_instance(uint32_t value) { + + instance_ = value; +} +inline void GrabRequest::set_instance(uint32_t value) { + _internal_set_instance(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.gripper.GrabRequest.instance) +} + +// ------------------------------------------------------------------- + +// GrabResponse + +// .mavsdk.rpc.gripper.GripperResult gripper_result = 1; +inline bool GrabResponse::_internal_has_gripper_result() const { + return this != internal_default_instance() && gripper_result_ != nullptr; +} +inline bool GrabResponse::has_gripper_result() const { + return _internal_has_gripper_result(); +} +inline void GrabResponse::clear_gripper_result() { + if (GetArenaForAllocation() == nullptr && gripper_result_ != nullptr) { + delete gripper_result_; + } + gripper_result_ = nullptr; +} +inline const ::mavsdk::rpc::gripper::GripperResult& GrabResponse::_internal_gripper_result() const { + const ::mavsdk::rpc::gripper::GripperResult* p = gripper_result_; + return p != nullptr ? *p : reinterpret_cast( + ::mavsdk::rpc::gripper::_GripperResult_default_instance_); +} +inline const ::mavsdk::rpc::gripper::GripperResult& GrabResponse::gripper_result() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.gripper.GrabResponse.gripper_result) + return _internal_gripper_result(); +} +inline void GrabResponse::unsafe_arena_set_allocated_gripper_result( + ::mavsdk::rpc::gripper::GripperResult* gripper_result) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(gripper_result_); + } + gripper_result_ = gripper_result; + if (gripper_result) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mavsdk.rpc.gripper.GrabResponse.gripper_result) +} +inline ::mavsdk::rpc::gripper::GripperResult* GrabResponse::release_gripper_result() { + + ::mavsdk::rpc::gripper::GripperResult* temp = gripper_result_; + gripper_result_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mavsdk::rpc::gripper::GripperResult* GrabResponse::unsafe_arena_release_gripper_result() { + // @@protoc_insertion_point(field_release:mavsdk.rpc.gripper.GrabResponse.gripper_result) + + ::mavsdk::rpc::gripper::GripperResult* temp = gripper_result_; + gripper_result_ = nullptr; + return temp; +} +inline ::mavsdk::rpc::gripper::GripperResult* GrabResponse::_internal_mutable_gripper_result() { + + if (gripper_result_ == nullptr) { + auto* p = CreateMaybeMessage<::mavsdk::rpc::gripper::GripperResult>(GetArenaForAllocation()); + gripper_result_ = p; + } + return gripper_result_; +} +inline ::mavsdk::rpc::gripper::GripperResult* GrabResponse::mutable_gripper_result() { + ::mavsdk::rpc::gripper::GripperResult* _msg = _internal_mutable_gripper_result(); + // @@protoc_insertion_point(field_mutable:mavsdk.rpc.gripper.GrabResponse.gripper_result) + return _msg; +} +inline void GrabResponse::set_allocated_gripper_result(::mavsdk::rpc::gripper::GripperResult* gripper_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete gripper_result_; + } + if (gripper_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(gripper_result); + if (message_arena != submessage_arena) { + gripper_result = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, gripper_result, submessage_arena); + } + + } else { + + } + gripper_result_ = gripper_result; + // @@protoc_insertion_point(field_set_allocated:mavsdk.rpc.gripper.GrabResponse.gripper_result) +} + +// ------------------------------------------------------------------- + +// ReleaseRequest + +// uint32 instance = 1; +inline void ReleaseRequest::clear_instance() { + instance_ = 0u; +} +inline uint32_t ReleaseRequest::_internal_instance() const { + return instance_; +} +inline uint32_t ReleaseRequest::instance() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.gripper.ReleaseRequest.instance) + return _internal_instance(); +} +inline void ReleaseRequest::_internal_set_instance(uint32_t value) { + + instance_ = value; +} +inline void ReleaseRequest::set_instance(uint32_t value) { + _internal_set_instance(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.gripper.ReleaseRequest.instance) +} + +// ------------------------------------------------------------------- + +// ReleaseResponse + +// .mavsdk.rpc.gripper.GripperResult gripper_result = 1; +inline bool ReleaseResponse::_internal_has_gripper_result() const { + return this != internal_default_instance() && gripper_result_ != nullptr; +} +inline bool ReleaseResponse::has_gripper_result() const { + return _internal_has_gripper_result(); +} +inline void ReleaseResponse::clear_gripper_result() { + if (GetArenaForAllocation() == nullptr && gripper_result_ != nullptr) { + delete gripper_result_; + } + gripper_result_ = nullptr; +} +inline const ::mavsdk::rpc::gripper::GripperResult& ReleaseResponse::_internal_gripper_result() const { + const ::mavsdk::rpc::gripper::GripperResult* p = gripper_result_; + return p != nullptr ? *p : reinterpret_cast( + ::mavsdk::rpc::gripper::_GripperResult_default_instance_); +} +inline const ::mavsdk::rpc::gripper::GripperResult& ReleaseResponse::gripper_result() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.gripper.ReleaseResponse.gripper_result) + return _internal_gripper_result(); +} +inline void ReleaseResponse::unsafe_arena_set_allocated_gripper_result( + ::mavsdk::rpc::gripper::GripperResult* gripper_result) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(gripper_result_); + } + gripper_result_ = gripper_result; + if (gripper_result) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mavsdk.rpc.gripper.ReleaseResponse.gripper_result) +} +inline ::mavsdk::rpc::gripper::GripperResult* ReleaseResponse::release_gripper_result() { + + ::mavsdk::rpc::gripper::GripperResult* temp = gripper_result_; + gripper_result_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mavsdk::rpc::gripper::GripperResult* ReleaseResponse::unsafe_arena_release_gripper_result() { + // @@protoc_insertion_point(field_release:mavsdk.rpc.gripper.ReleaseResponse.gripper_result) + + ::mavsdk::rpc::gripper::GripperResult* temp = gripper_result_; + gripper_result_ = nullptr; + return temp; +} +inline ::mavsdk::rpc::gripper::GripperResult* ReleaseResponse::_internal_mutable_gripper_result() { + + if (gripper_result_ == nullptr) { + auto* p = CreateMaybeMessage<::mavsdk::rpc::gripper::GripperResult>(GetArenaForAllocation()); + gripper_result_ = p; + } + return gripper_result_; +} +inline ::mavsdk::rpc::gripper::GripperResult* ReleaseResponse::mutable_gripper_result() { + ::mavsdk::rpc::gripper::GripperResult* _msg = _internal_mutable_gripper_result(); + // @@protoc_insertion_point(field_mutable:mavsdk.rpc.gripper.ReleaseResponse.gripper_result) + return _msg; +} +inline void ReleaseResponse::set_allocated_gripper_result(::mavsdk::rpc::gripper::GripperResult* gripper_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete gripper_result_; + } + if (gripper_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(gripper_result); + if (message_arena != submessage_arena) { + gripper_result = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, gripper_result, submessage_arena); + } + + } else { + + } + gripper_result_ = gripper_result; + // @@protoc_insertion_point(field_set_allocated:mavsdk.rpc.gripper.ReleaseResponse.gripper_result) +} + +// ------------------------------------------------------------------- + +// GripperResult + +// .mavsdk.rpc.gripper.GripperResult.Result result = 1; +inline void GripperResult::clear_result() { + result_ = 0; +} +inline ::mavsdk::rpc::gripper::GripperResult_Result GripperResult::_internal_result() const { + return static_cast< ::mavsdk::rpc::gripper::GripperResult_Result >(result_); +} +inline ::mavsdk::rpc::gripper::GripperResult_Result GripperResult::result() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.gripper.GripperResult.result) + return _internal_result(); +} +inline void GripperResult::_internal_set_result(::mavsdk::rpc::gripper::GripperResult_Result value) { + + result_ = value; +} +inline void GripperResult::set_result(::mavsdk::rpc::gripper::GripperResult_Result value) { + _internal_set_result(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.gripper.GripperResult.result) +} + +// string result_str = 2; +inline void GripperResult::clear_result_str() { + result_str_.ClearToEmpty(); +} +inline const std::string& GripperResult::result_str() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.gripper.GripperResult.result_str) + return _internal_result_str(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GripperResult::set_result_str(ArgT0&& arg0, ArgT... args) { + + result_str_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:mavsdk.rpc.gripper.GripperResult.result_str) +} +inline std::string* GripperResult::mutable_result_str() { + std::string* _s = _internal_mutable_result_str(); + // @@protoc_insertion_point(field_mutable:mavsdk.rpc.gripper.GripperResult.result_str) + return _s; +} +inline const std::string& GripperResult::_internal_result_str() const { + return result_str_.Get(); +} +inline void GripperResult::_internal_set_result_str(const std::string& value) { + + result_str_.Set(value, GetArenaForAllocation()); +} +inline std::string* GripperResult::_internal_mutable_result_str() { + + return result_str_.Mutable(GetArenaForAllocation()); +} +inline std::string* GripperResult::release_result_str() { + // @@protoc_insertion_point(field_release:mavsdk.rpc.gripper.GripperResult.result_str) + return result_str_.Release(); +} +inline void GripperResult::set_allocated_result_str(std::string* result_str) { + if (result_str != nullptr) { + + } else { + + } + result_str_.SetAllocated(result_str, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (result_str_.IsDefault()) { + result_str_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:mavsdk.rpc.gripper.GripperResult.result_str) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace gripper +} // namespace rpc +} // namespace mavsdk + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::mavsdk::rpc::gripper::GripperResult_Result> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::mavsdk::rpc::gripper::GripperResult_Result>() { + return ::mavsdk::rpc::gripper::GripperResult_Result_descriptor(); +} +template <> struct is_proto_enum< ::mavsdk::rpc::gripper::GripperAction> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::mavsdk::rpc::gripper::GripperAction>() { + return ::mavsdk::rpc::gripper::GripperAction_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_gripper_2fgripper_2eproto diff --git a/src/mavsdk_server/src/generated/winch/winch.grpc.pb.cc b/src/mavsdk_server/src/generated/winch/winch.grpc.pb.cc new file mode 100644 index 0000000000..b7505c2942 --- /dev/null +++ b/src/mavsdk_server/src/generated/winch/winch.grpc.pb.cc @@ -0,0 +1,503 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: winch/winch.proto + +#include "winch/winch.pb.h" +#include "winch/winch.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace mavsdk { +namespace rpc { +namespace winch { + +static const char* WinchService_method_names[] = { + "/mavsdk.rpc.winch.WinchService/SubscribeStatus", + "/mavsdk.rpc.winch.WinchService/Relax", + "/mavsdk.rpc.winch.WinchService/RelativeLengthControl", + "/mavsdk.rpc.winch.WinchService/RateControl", + "/mavsdk.rpc.winch.WinchService/Lock", + "/mavsdk.rpc.winch.WinchService/Deliver", + "/mavsdk.rpc.winch.WinchService/Hold", + "/mavsdk.rpc.winch.WinchService/Retract", + "/mavsdk.rpc.winch.WinchService/LoadLine", + "/mavsdk.rpc.winch.WinchService/AbandonLine", + "/mavsdk.rpc.winch.WinchService/LoadPayload", +}; + +std::unique_ptr< WinchService::Stub> WinchService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< WinchService::Stub> stub(new WinchService::Stub(channel, options)); + return stub; +} + +WinchService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) + : channel_(channel), rpcmethod_SubscribeStatus_(WinchService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel) + , rpcmethod_Relax_(WinchService_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_RelativeLengthControl_(WinchService_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_RateControl_(WinchService_method_names[3], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_Lock_(WinchService_method_names[4], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_Deliver_(WinchService_method_names[5], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_Hold_(WinchService_method_names[6], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_Retract_(WinchService_method_names[7], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_LoadLine_(WinchService_method_names[8], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_AbandonLine_(WinchService_method_names[9], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_LoadPayload_(WinchService_method_names[10], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::ClientReader< ::mavsdk::rpc::winch::StatusResponse>* WinchService::Stub::SubscribeStatusRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::SubscribeStatusRequest& request) { + return ::grpc::internal::ClientReaderFactory< ::mavsdk::rpc::winch::StatusResponse>::Create(channel_.get(), rpcmethod_SubscribeStatus_, context, request); +} + +void WinchService::Stub::async::SubscribeStatus(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::SubscribeStatusRequest* request, ::grpc::ClientReadReactor< ::mavsdk::rpc::winch::StatusResponse>* reactor) { + ::grpc::internal::ClientCallbackReaderFactory< ::mavsdk::rpc::winch::StatusResponse>::Create(stub_->channel_.get(), stub_->rpcmethod_SubscribeStatus_, context, request, reactor); +} + +::grpc::ClientAsyncReader< ::mavsdk::rpc::winch::StatusResponse>* WinchService::Stub::AsyncSubscribeStatusRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::SubscribeStatusRequest& request, ::grpc::CompletionQueue* cq, void* tag) { + return ::grpc::internal::ClientAsyncReaderFactory< ::mavsdk::rpc::winch::StatusResponse>::Create(channel_.get(), cq, rpcmethod_SubscribeStatus_, context, request, true, tag); +} + +::grpc::ClientAsyncReader< ::mavsdk::rpc::winch::StatusResponse>* WinchService::Stub::PrepareAsyncSubscribeStatusRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::SubscribeStatusRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncReaderFactory< ::mavsdk::rpc::winch::StatusResponse>::Create(channel_.get(), cq, rpcmethod_SubscribeStatus_, context, request, false, nullptr); +} + +::grpc::Status WinchService::Stub::Relax(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelaxRequest& request, ::mavsdk::rpc::winch::RelaxResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::mavsdk::rpc::winch::RelaxRequest, ::mavsdk::rpc::winch::RelaxResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Relax_, context, request, response); +} + +void WinchService::Stub::async::Relax(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelaxRequest* request, ::mavsdk::rpc::winch::RelaxResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::mavsdk::rpc::winch::RelaxRequest, ::mavsdk::rpc::winch::RelaxResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Relax_, context, request, response, std::move(f)); +} + +void WinchService::Stub::async::Relax(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelaxRequest* request, ::mavsdk::rpc::winch::RelaxResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Relax_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RelaxResponse>* WinchService::Stub::PrepareAsyncRelaxRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelaxRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::mavsdk::rpc::winch::RelaxResponse, ::mavsdk::rpc::winch::RelaxRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Relax_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RelaxResponse>* WinchService::Stub::AsyncRelaxRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelaxRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncRelaxRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status WinchService::Stub::RelativeLengthControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelativeLengthControlRequest& request, ::mavsdk::rpc::winch::RelativeLengthControlResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::mavsdk::rpc::winch::RelativeLengthControlRequest, ::mavsdk::rpc::winch::RelativeLengthControlResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_RelativeLengthControl_, context, request, response); +} + +void WinchService::Stub::async::RelativeLengthControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelativeLengthControlRequest* request, ::mavsdk::rpc::winch::RelativeLengthControlResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::mavsdk::rpc::winch::RelativeLengthControlRequest, ::mavsdk::rpc::winch::RelativeLengthControlResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_RelativeLengthControl_, context, request, response, std::move(f)); +} + +void WinchService::Stub::async::RelativeLengthControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelativeLengthControlRequest* request, ::mavsdk::rpc::winch::RelativeLengthControlResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_RelativeLengthControl_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RelativeLengthControlResponse>* WinchService::Stub::PrepareAsyncRelativeLengthControlRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelativeLengthControlRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::mavsdk::rpc::winch::RelativeLengthControlResponse, ::mavsdk::rpc::winch::RelativeLengthControlRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_RelativeLengthControl_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RelativeLengthControlResponse>* WinchService::Stub::AsyncRelativeLengthControlRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelativeLengthControlRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncRelativeLengthControlRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status WinchService::Stub::RateControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RateControlRequest& request, ::mavsdk::rpc::winch::RateControlResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::mavsdk::rpc::winch::RateControlRequest, ::mavsdk::rpc::winch::RateControlResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_RateControl_, context, request, response); +} + +void WinchService::Stub::async::RateControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RateControlRequest* request, ::mavsdk::rpc::winch::RateControlResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::mavsdk::rpc::winch::RateControlRequest, ::mavsdk::rpc::winch::RateControlResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_RateControl_, context, request, response, std::move(f)); +} + +void WinchService::Stub::async::RateControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RateControlRequest* request, ::mavsdk::rpc::winch::RateControlResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_RateControl_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RateControlResponse>* WinchService::Stub::PrepareAsyncRateControlRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RateControlRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::mavsdk::rpc::winch::RateControlResponse, ::mavsdk::rpc::winch::RateControlRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_RateControl_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RateControlResponse>* WinchService::Stub::AsyncRateControlRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RateControlRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncRateControlRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status WinchService::Stub::Lock(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LockRequest& request, ::mavsdk::rpc::winch::LockResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::mavsdk::rpc::winch::LockRequest, ::mavsdk::rpc::winch::LockResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Lock_, context, request, response); +} + +void WinchService::Stub::async::Lock(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LockRequest* request, ::mavsdk::rpc::winch::LockResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::mavsdk::rpc::winch::LockRequest, ::mavsdk::rpc::winch::LockResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Lock_, context, request, response, std::move(f)); +} + +void WinchService::Stub::async::Lock(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LockRequest* request, ::mavsdk::rpc::winch::LockResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Lock_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LockResponse>* WinchService::Stub::PrepareAsyncLockRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LockRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::mavsdk::rpc::winch::LockResponse, ::mavsdk::rpc::winch::LockRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Lock_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LockResponse>* WinchService::Stub::AsyncLockRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LockRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncLockRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status WinchService::Stub::Deliver(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::DeliverRequest& request, ::mavsdk::rpc::winch::DeliverResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::mavsdk::rpc::winch::DeliverRequest, ::mavsdk::rpc::winch::DeliverResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Deliver_, context, request, response); +} + +void WinchService::Stub::async::Deliver(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::DeliverRequest* request, ::mavsdk::rpc::winch::DeliverResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::mavsdk::rpc::winch::DeliverRequest, ::mavsdk::rpc::winch::DeliverResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Deliver_, context, request, response, std::move(f)); +} + +void WinchService::Stub::async::Deliver(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::DeliverRequest* request, ::mavsdk::rpc::winch::DeliverResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Deliver_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::DeliverResponse>* WinchService::Stub::PrepareAsyncDeliverRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::DeliverRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::mavsdk::rpc::winch::DeliverResponse, ::mavsdk::rpc::winch::DeliverRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Deliver_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::DeliverResponse>* WinchService::Stub::AsyncDeliverRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::DeliverRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncDeliverRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status WinchService::Stub::Hold(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::HoldRequest& request, ::mavsdk::rpc::winch::HoldResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::mavsdk::rpc::winch::HoldRequest, ::mavsdk::rpc::winch::HoldResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Hold_, context, request, response); +} + +void WinchService::Stub::async::Hold(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::HoldRequest* request, ::mavsdk::rpc::winch::HoldResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::mavsdk::rpc::winch::HoldRequest, ::mavsdk::rpc::winch::HoldResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Hold_, context, request, response, std::move(f)); +} + +void WinchService::Stub::async::Hold(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::HoldRequest* request, ::mavsdk::rpc::winch::HoldResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Hold_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::HoldResponse>* WinchService::Stub::PrepareAsyncHoldRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::HoldRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::mavsdk::rpc::winch::HoldResponse, ::mavsdk::rpc::winch::HoldRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Hold_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::HoldResponse>* WinchService::Stub::AsyncHoldRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::HoldRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncHoldRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status WinchService::Stub::Retract(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RetractRequest& request, ::mavsdk::rpc::winch::RetractResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::mavsdk::rpc::winch::RetractRequest, ::mavsdk::rpc::winch::RetractResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_Retract_, context, request, response); +} + +void WinchService::Stub::async::Retract(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RetractRequest* request, ::mavsdk::rpc::winch::RetractResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::mavsdk::rpc::winch::RetractRequest, ::mavsdk::rpc::winch::RetractResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Retract_, context, request, response, std::move(f)); +} + +void WinchService::Stub::async::Retract(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RetractRequest* request, ::mavsdk::rpc::winch::RetractResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_Retract_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RetractResponse>* WinchService::Stub::PrepareAsyncRetractRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RetractRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::mavsdk::rpc::winch::RetractResponse, ::mavsdk::rpc::winch::RetractRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_Retract_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RetractResponse>* WinchService::Stub::AsyncRetractRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RetractRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncRetractRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status WinchService::Stub::LoadLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadLineRequest& request, ::mavsdk::rpc::winch::LoadLineResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::mavsdk::rpc::winch::LoadLineRequest, ::mavsdk::rpc::winch::LoadLineResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_LoadLine_, context, request, response); +} + +void WinchService::Stub::async::LoadLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadLineRequest* request, ::mavsdk::rpc::winch::LoadLineResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::mavsdk::rpc::winch::LoadLineRequest, ::mavsdk::rpc::winch::LoadLineResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_LoadLine_, context, request, response, std::move(f)); +} + +void WinchService::Stub::async::LoadLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadLineRequest* request, ::mavsdk::rpc::winch::LoadLineResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_LoadLine_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LoadLineResponse>* WinchService::Stub::PrepareAsyncLoadLineRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadLineRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::mavsdk::rpc::winch::LoadLineResponse, ::mavsdk::rpc::winch::LoadLineRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_LoadLine_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LoadLineResponse>* WinchService::Stub::AsyncLoadLineRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadLineRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncLoadLineRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status WinchService::Stub::AbandonLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::AbandonLineRequest& request, ::mavsdk::rpc::winch::AbandonLineResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::mavsdk::rpc::winch::AbandonLineRequest, ::mavsdk::rpc::winch::AbandonLineResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_AbandonLine_, context, request, response); +} + +void WinchService::Stub::async::AbandonLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::AbandonLineRequest* request, ::mavsdk::rpc::winch::AbandonLineResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::mavsdk::rpc::winch::AbandonLineRequest, ::mavsdk::rpc::winch::AbandonLineResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_AbandonLine_, context, request, response, std::move(f)); +} + +void WinchService::Stub::async::AbandonLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::AbandonLineRequest* request, ::mavsdk::rpc::winch::AbandonLineResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_AbandonLine_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::AbandonLineResponse>* WinchService::Stub::PrepareAsyncAbandonLineRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::AbandonLineRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::mavsdk::rpc::winch::AbandonLineResponse, ::mavsdk::rpc::winch::AbandonLineRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_AbandonLine_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::AbandonLineResponse>* WinchService::Stub::AsyncAbandonLineRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::AbandonLineRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncAbandonLineRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status WinchService::Stub::LoadPayload(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadPayloadRequest& request, ::mavsdk::rpc::winch::LoadPayloadResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::mavsdk::rpc::winch::LoadPayloadRequest, ::mavsdk::rpc::winch::LoadPayloadResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_LoadPayload_, context, request, response); +} + +void WinchService::Stub::async::LoadPayload(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadPayloadRequest* request, ::mavsdk::rpc::winch::LoadPayloadResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::mavsdk::rpc::winch::LoadPayloadRequest, ::mavsdk::rpc::winch::LoadPayloadResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_LoadPayload_, context, request, response, std::move(f)); +} + +void WinchService::Stub::async::LoadPayload(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadPayloadRequest* request, ::mavsdk::rpc::winch::LoadPayloadResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_LoadPayload_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LoadPayloadResponse>* WinchService::Stub::PrepareAsyncLoadPayloadRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadPayloadRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::mavsdk::rpc::winch::LoadPayloadResponse, ::mavsdk::rpc::winch::LoadPayloadRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_LoadPayload_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LoadPayloadResponse>* WinchService::Stub::AsyncLoadPayloadRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadPayloadRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncLoadPayloadRaw(context, request, cq); + result->StartCall(); + return result; +} + +WinchService::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + WinchService_method_names[0], + ::grpc::internal::RpcMethod::SERVER_STREAMING, + new ::grpc::internal::ServerStreamingHandler< WinchService::Service, ::mavsdk::rpc::winch::SubscribeStatusRequest, ::mavsdk::rpc::winch::StatusResponse>( + [](WinchService::Service* service, + ::grpc::ServerContext* ctx, + const ::mavsdk::rpc::winch::SubscribeStatusRequest* req, + ::grpc::ServerWriter<::mavsdk::rpc::winch::StatusResponse>* writer) { + return service->SubscribeStatus(ctx, req, writer); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + WinchService_method_names[1], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< WinchService::Service, ::mavsdk::rpc::winch::RelaxRequest, ::mavsdk::rpc::winch::RelaxResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](WinchService::Service* service, + ::grpc::ServerContext* ctx, + const ::mavsdk::rpc::winch::RelaxRequest* req, + ::mavsdk::rpc::winch::RelaxResponse* resp) { + return service->Relax(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + WinchService_method_names[2], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< WinchService::Service, ::mavsdk::rpc::winch::RelativeLengthControlRequest, ::mavsdk::rpc::winch::RelativeLengthControlResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](WinchService::Service* service, + ::grpc::ServerContext* ctx, + const ::mavsdk::rpc::winch::RelativeLengthControlRequest* req, + ::mavsdk::rpc::winch::RelativeLengthControlResponse* resp) { + return service->RelativeLengthControl(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + WinchService_method_names[3], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< WinchService::Service, ::mavsdk::rpc::winch::RateControlRequest, ::mavsdk::rpc::winch::RateControlResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](WinchService::Service* service, + ::grpc::ServerContext* ctx, + const ::mavsdk::rpc::winch::RateControlRequest* req, + ::mavsdk::rpc::winch::RateControlResponse* resp) { + return service->RateControl(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + WinchService_method_names[4], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< WinchService::Service, ::mavsdk::rpc::winch::LockRequest, ::mavsdk::rpc::winch::LockResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](WinchService::Service* service, + ::grpc::ServerContext* ctx, + const ::mavsdk::rpc::winch::LockRequest* req, + ::mavsdk::rpc::winch::LockResponse* resp) { + return service->Lock(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + WinchService_method_names[5], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< WinchService::Service, ::mavsdk::rpc::winch::DeliverRequest, ::mavsdk::rpc::winch::DeliverResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](WinchService::Service* service, + ::grpc::ServerContext* ctx, + const ::mavsdk::rpc::winch::DeliverRequest* req, + ::mavsdk::rpc::winch::DeliverResponse* resp) { + return service->Deliver(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + WinchService_method_names[6], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< WinchService::Service, ::mavsdk::rpc::winch::HoldRequest, ::mavsdk::rpc::winch::HoldResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](WinchService::Service* service, + ::grpc::ServerContext* ctx, + const ::mavsdk::rpc::winch::HoldRequest* req, + ::mavsdk::rpc::winch::HoldResponse* resp) { + return service->Hold(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + WinchService_method_names[7], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< WinchService::Service, ::mavsdk::rpc::winch::RetractRequest, ::mavsdk::rpc::winch::RetractResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](WinchService::Service* service, + ::grpc::ServerContext* ctx, + const ::mavsdk::rpc::winch::RetractRequest* req, + ::mavsdk::rpc::winch::RetractResponse* resp) { + return service->Retract(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + WinchService_method_names[8], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< WinchService::Service, ::mavsdk::rpc::winch::LoadLineRequest, ::mavsdk::rpc::winch::LoadLineResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](WinchService::Service* service, + ::grpc::ServerContext* ctx, + const ::mavsdk::rpc::winch::LoadLineRequest* req, + ::mavsdk::rpc::winch::LoadLineResponse* resp) { + return service->LoadLine(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + WinchService_method_names[9], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< WinchService::Service, ::mavsdk::rpc::winch::AbandonLineRequest, ::mavsdk::rpc::winch::AbandonLineResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](WinchService::Service* service, + ::grpc::ServerContext* ctx, + const ::mavsdk::rpc::winch::AbandonLineRequest* req, + ::mavsdk::rpc::winch::AbandonLineResponse* resp) { + return service->AbandonLine(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + WinchService_method_names[10], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< WinchService::Service, ::mavsdk::rpc::winch::LoadPayloadRequest, ::mavsdk::rpc::winch::LoadPayloadResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](WinchService::Service* service, + ::grpc::ServerContext* ctx, + const ::mavsdk::rpc::winch::LoadPayloadRequest* req, + ::mavsdk::rpc::winch::LoadPayloadResponse* resp) { + return service->LoadPayload(ctx, req, resp); + }, this))); +} + +WinchService::Service::~Service() { +} + +::grpc::Status WinchService::Service::SubscribeStatus(::grpc::ServerContext* context, const ::mavsdk::rpc::winch::SubscribeStatusRequest* request, ::grpc::ServerWriter< ::mavsdk::rpc::winch::StatusResponse>* writer) { + (void) context; + (void) request; + (void) writer; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status WinchService::Service::Relax(::grpc::ServerContext* context, const ::mavsdk::rpc::winch::RelaxRequest* request, ::mavsdk::rpc::winch::RelaxResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status WinchService::Service::RelativeLengthControl(::grpc::ServerContext* context, const ::mavsdk::rpc::winch::RelativeLengthControlRequest* request, ::mavsdk::rpc::winch::RelativeLengthControlResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status WinchService::Service::RateControl(::grpc::ServerContext* context, const ::mavsdk::rpc::winch::RateControlRequest* request, ::mavsdk::rpc::winch::RateControlResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status WinchService::Service::Lock(::grpc::ServerContext* context, const ::mavsdk::rpc::winch::LockRequest* request, ::mavsdk::rpc::winch::LockResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status WinchService::Service::Deliver(::grpc::ServerContext* context, const ::mavsdk::rpc::winch::DeliverRequest* request, ::mavsdk::rpc::winch::DeliverResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status WinchService::Service::Hold(::grpc::ServerContext* context, const ::mavsdk::rpc::winch::HoldRequest* request, ::mavsdk::rpc::winch::HoldResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status WinchService::Service::Retract(::grpc::ServerContext* context, const ::mavsdk::rpc::winch::RetractRequest* request, ::mavsdk::rpc::winch::RetractResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status WinchService::Service::LoadLine(::grpc::ServerContext* context, const ::mavsdk::rpc::winch::LoadLineRequest* request, ::mavsdk::rpc::winch::LoadLineResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status WinchService::Service::AbandonLine(::grpc::ServerContext* context, const ::mavsdk::rpc::winch::AbandonLineRequest* request, ::mavsdk::rpc::winch::AbandonLineResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status WinchService::Service::LoadPayload(::grpc::ServerContext* context, const ::mavsdk::rpc::winch::LoadPayloadRequest* request, ::mavsdk::rpc::winch::LoadPayloadResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +} // namespace mavsdk +} // namespace rpc +} // namespace winch + diff --git a/src/mavsdk_server/src/generated/winch/winch.grpc.pb.h b/src/mavsdk_server/src/generated/winch/winch.grpc.pb.h new file mode 100644 index 0000000000..e75d02f87b --- /dev/null +++ b/src/mavsdk_server/src/generated/winch/winch.grpc.pb.h @@ -0,0 +1,1885 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: winch/winch.proto +#ifndef GRPC_winch_2fwinch_2eproto__INCLUDED +#define GRPC_winch_2fwinch_2eproto__INCLUDED + +#include "winch/winch.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace mavsdk { +namespace rpc { +namespace winch { + +// +// Allows users to send winch actions, as well as receive status information from winch systems. +// +class WinchService final { + public: + static constexpr char const* service_full_name() { + return "mavsdk.rpc.winch.WinchService"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + // Subscribe to 'winch status' updates. + std::unique_ptr< ::grpc::ClientReaderInterface< ::mavsdk::rpc::winch::StatusResponse>> SubscribeStatus(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::SubscribeStatusRequest& request) { + return std::unique_ptr< ::grpc::ClientReaderInterface< ::mavsdk::rpc::winch::StatusResponse>>(SubscribeStatusRaw(context, request)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::mavsdk::rpc::winch::StatusResponse>> AsyncSubscribeStatus(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::SubscribeStatusRequest& request, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::mavsdk::rpc::winch::StatusResponse>>(AsyncSubscribeStatusRaw(context, request, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::mavsdk::rpc::winch::StatusResponse>> PrepareAsyncSubscribeStatus(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::SubscribeStatusRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::mavsdk::rpc::winch::StatusResponse>>(PrepareAsyncSubscribeStatusRaw(context, request, cq)); + } + // + // Allow motor to freewheel. + virtual ::grpc::Status Relax(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelaxRequest& request, ::mavsdk::rpc::winch::RelaxResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RelaxResponse>> AsyncRelax(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelaxRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RelaxResponse>>(AsyncRelaxRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RelaxResponse>> PrepareAsyncRelax(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelaxRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RelaxResponse>>(PrepareAsyncRelaxRaw(context, request, cq)); + } + // + // Wind or unwind specified length of line, optionally using specified rate. + virtual ::grpc::Status RelativeLengthControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelativeLengthControlRequest& request, ::mavsdk::rpc::winch::RelativeLengthControlResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RelativeLengthControlResponse>> AsyncRelativeLengthControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelativeLengthControlRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RelativeLengthControlResponse>>(AsyncRelativeLengthControlRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RelativeLengthControlResponse>> PrepareAsyncRelativeLengthControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelativeLengthControlRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RelativeLengthControlResponse>>(PrepareAsyncRelativeLengthControlRaw(context, request, cq)); + } + // + // Wind or unwind line at specified rate. + virtual ::grpc::Status RateControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RateControlRequest& request, ::mavsdk::rpc::winch::RateControlResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RateControlResponse>> AsyncRateControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RateControlRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RateControlResponse>>(AsyncRateControlRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RateControlResponse>> PrepareAsyncRateControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RateControlRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RateControlResponse>>(PrepareAsyncRateControlRaw(context, request, cq)); + } + // + // Perform the locking sequence to relieve motor while in the fully retracted position. + virtual ::grpc::Status Lock(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LockRequest& request, ::mavsdk::rpc::winch::LockResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::LockResponse>> AsyncLock(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LockRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::LockResponse>>(AsyncLockRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::LockResponse>> PrepareAsyncLock(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LockRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::LockResponse>>(PrepareAsyncLockRaw(context, request, cq)); + } + // + // Sequence of drop, slow down, touch down, reel up, lock. + virtual ::grpc::Status Deliver(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::DeliverRequest& request, ::mavsdk::rpc::winch::DeliverResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::DeliverResponse>> AsyncDeliver(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::DeliverRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::DeliverResponse>>(AsyncDeliverRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::DeliverResponse>> PrepareAsyncDeliver(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::DeliverRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::DeliverResponse>>(PrepareAsyncDeliverRaw(context, request, cq)); + } + // + // Engage motor and hold current position. + virtual ::grpc::Status Hold(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::HoldRequest& request, ::mavsdk::rpc::winch::HoldResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::HoldResponse>> AsyncHold(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::HoldRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::HoldResponse>>(AsyncHoldRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::HoldResponse>> PrepareAsyncHold(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::HoldRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::HoldResponse>>(PrepareAsyncHoldRaw(context, request, cq)); + } + // + // Return the reel to the fully retracted position. + virtual ::grpc::Status Retract(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RetractRequest& request, ::mavsdk::rpc::winch::RetractResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RetractResponse>> AsyncRetract(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RetractRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RetractResponse>>(AsyncRetractRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RetractResponse>> PrepareAsyncRetract(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RetractRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RetractResponse>>(PrepareAsyncRetractRaw(context, request, cq)); + } + // + // Load the reel with line. + // + // The winch will calculate the total loaded length and stop when the tension exceeds a threshold. + virtual ::grpc::Status LoadLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadLineRequest& request, ::mavsdk::rpc::winch::LoadLineResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::LoadLineResponse>> AsyncLoadLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadLineRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::LoadLineResponse>>(AsyncLoadLineRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::LoadLineResponse>> PrepareAsyncLoadLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadLineRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::LoadLineResponse>>(PrepareAsyncLoadLineRaw(context, request, cq)); + } + // + // Spool out the entire length of the line. + virtual ::grpc::Status AbandonLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::AbandonLineRequest& request, ::mavsdk::rpc::winch::AbandonLineResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::AbandonLineResponse>> AsyncAbandonLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::AbandonLineRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::AbandonLineResponse>>(AsyncAbandonLineRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::AbandonLineResponse>> PrepareAsyncAbandonLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::AbandonLineRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::AbandonLineResponse>>(PrepareAsyncAbandonLineRaw(context, request, cq)); + } + // + // Spools out just enough to present the hook to the user to load the payload. + virtual ::grpc::Status LoadPayload(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadPayloadRequest& request, ::mavsdk::rpc::winch::LoadPayloadResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::LoadPayloadResponse>> AsyncLoadPayload(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadPayloadRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::LoadPayloadResponse>>(AsyncLoadPayloadRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::LoadPayloadResponse>> PrepareAsyncLoadPayload(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadPayloadRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::LoadPayloadResponse>>(PrepareAsyncLoadPayloadRaw(context, request, cq)); + } + class async_interface { + public: + virtual ~async_interface() {} + // Subscribe to 'winch status' updates. + virtual void SubscribeStatus(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::SubscribeStatusRequest* request, ::grpc::ClientReadReactor< ::mavsdk::rpc::winch::StatusResponse>* reactor) = 0; + // + // Allow motor to freewheel. + virtual void Relax(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelaxRequest* request, ::mavsdk::rpc::winch::RelaxResponse* response, std::function) = 0; + virtual void Relax(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelaxRequest* request, ::mavsdk::rpc::winch::RelaxResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + // + // Wind or unwind specified length of line, optionally using specified rate. + virtual void RelativeLengthControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelativeLengthControlRequest* request, ::mavsdk::rpc::winch::RelativeLengthControlResponse* response, std::function) = 0; + virtual void RelativeLengthControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelativeLengthControlRequest* request, ::mavsdk::rpc::winch::RelativeLengthControlResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + // + // Wind or unwind line at specified rate. + virtual void RateControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RateControlRequest* request, ::mavsdk::rpc::winch::RateControlResponse* response, std::function) = 0; + virtual void RateControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RateControlRequest* request, ::mavsdk::rpc::winch::RateControlResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + // + // Perform the locking sequence to relieve motor while in the fully retracted position. + virtual void Lock(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LockRequest* request, ::mavsdk::rpc::winch::LockResponse* response, std::function) = 0; + virtual void Lock(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LockRequest* request, ::mavsdk::rpc::winch::LockResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + // + // Sequence of drop, slow down, touch down, reel up, lock. + virtual void Deliver(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::DeliverRequest* request, ::mavsdk::rpc::winch::DeliverResponse* response, std::function) = 0; + virtual void Deliver(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::DeliverRequest* request, ::mavsdk::rpc::winch::DeliverResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + // + // Engage motor and hold current position. + virtual void Hold(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::HoldRequest* request, ::mavsdk::rpc::winch::HoldResponse* response, std::function) = 0; + virtual void Hold(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::HoldRequest* request, ::mavsdk::rpc::winch::HoldResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + // + // Return the reel to the fully retracted position. + virtual void Retract(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RetractRequest* request, ::mavsdk::rpc::winch::RetractResponse* response, std::function) = 0; + virtual void Retract(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RetractRequest* request, ::mavsdk::rpc::winch::RetractResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + // + // Load the reel with line. + // + // The winch will calculate the total loaded length and stop when the tension exceeds a threshold. + virtual void LoadLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadLineRequest* request, ::mavsdk::rpc::winch::LoadLineResponse* response, std::function) = 0; + virtual void LoadLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadLineRequest* request, ::mavsdk::rpc::winch::LoadLineResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + // + // Spool out the entire length of the line. + virtual void AbandonLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::AbandonLineRequest* request, ::mavsdk::rpc::winch::AbandonLineResponse* response, std::function) = 0; + virtual void AbandonLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::AbandonLineRequest* request, ::mavsdk::rpc::winch::AbandonLineResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + // + // Spools out just enough to present the hook to the user to load the payload. + virtual void LoadPayload(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadPayloadRequest* request, ::mavsdk::rpc::winch::LoadPayloadResponse* response, std::function) = 0; + virtual void LoadPayload(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadPayloadRequest* request, ::mavsdk::rpc::winch::LoadPayloadResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + }; + typedef class async_interface experimental_async_interface; + virtual class async_interface* async() { return nullptr; } + class async_interface* experimental_async() { return async(); } + private: + virtual ::grpc::ClientReaderInterface< ::mavsdk::rpc::winch::StatusResponse>* SubscribeStatusRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::SubscribeStatusRequest& request) = 0; + virtual ::grpc::ClientAsyncReaderInterface< ::mavsdk::rpc::winch::StatusResponse>* AsyncSubscribeStatusRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::SubscribeStatusRequest& request, ::grpc::CompletionQueue* cq, void* tag) = 0; + virtual ::grpc::ClientAsyncReaderInterface< ::mavsdk::rpc::winch::StatusResponse>* PrepareAsyncSubscribeStatusRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::SubscribeStatusRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RelaxResponse>* AsyncRelaxRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelaxRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RelaxResponse>* PrepareAsyncRelaxRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelaxRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RelativeLengthControlResponse>* AsyncRelativeLengthControlRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelativeLengthControlRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RelativeLengthControlResponse>* PrepareAsyncRelativeLengthControlRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelativeLengthControlRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RateControlResponse>* AsyncRateControlRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RateControlRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RateControlResponse>* PrepareAsyncRateControlRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RateControlRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::LockResponse>* AsyncLockRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LockRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::LockResponse>* PrepareAsyncLockRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LockRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::DeliverResponse>* AsyncDeliverRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::DeliverRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::DeliverResponse>* PrepareAsyncDeliverRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::DeliverRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::HoldResponse>* AsyncHoldRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::HoldRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::HoldResponse>* PrepareAsyncHoldRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::HoldRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RetractResponse>* AsyncRetractRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RetractRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::RetractResponse>* PrepareAsyncRetractRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RetractRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::LoadLineResponse>* AsyncLoadLineRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadLineRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::LoadLineResponse>* PrepareAsyncLoadLineRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadLineRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::AbandonLineResponse>* AsyncAbandonLineRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::AbandonLineRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::AbandonLineResponse>* PrepareAsyncAbandonLineRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::AbandonLineRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::LoadPayloadResponse>* AsyncLoadPayloadRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadPayloadRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::mavsdk::rpc::winch::LoadPayloadResponse>* PrepareAsyncLoadPayloadRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadPayloadRequest& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + std::unique_ptr< ::grpc::ClientReader< ::mavsdk::rpc::winch::StatusResponse>> SubscribeStatus(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::SubscribeStatusRequest& request) { + return std::unique_ptr< ::grpc::ClientReader< ::mavsdk::rpc::winch::StatusResponse>>(SubscribeStatusRaw(context, request)); + } + std::unique_ptr< ::grpc::ClientAsyncReader< ::mavsdk::rpc::winch::StatusResponse>> AsyncSubscribeStatus(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::SubscribeStatusRequest& request, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReader< ::mavsdk::rpc::winch::StatusResponse>>(AsyncSubscribeStatusRaw(context, request, cq, tag)); + } + std::unique_ptr< ::grpc::ClientAsyncReader< ::mavsdk::rpc::winch::StatusResponse>> PrepareAsyncSubscribeStatus(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::SubscribeStatusRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncReader< ::mavsdk::rpc::winch::StatusResponse>>(PrepareAsyncSubscribeStatusRaw(context, request, cq)); + } + ::grpc::Status Relax(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelaxRequest& request, ::mavsdk::rpc::winch::RelaxResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RelaxResponse>> AsyncRelax(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelaxRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RelaxResponse>>(AsyncRelaxRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RelaxResponse>> PrepareAsyncRelax(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelaxRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RelaxResponse>>(PrepareAsyncRelaxRaw(context, request, cq)); + } + ::grpc::Status RelativeLengthControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelativeLengthControlRequest& request, ::mavsdk::rpc::winch::RelativeLengthControlResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RelativeLengthControlResponse>> AsyncRelativeLengthControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelativeLengthControlRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RelativeLengthControlResponse>>(AsyncRelativeLengthControlRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RelativeLengthControlResponse>> PrepareAsyncRelativeLengthControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelativeLengthControlRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RelativeLengthControlResponse>>(PrepareAsyncRelativeLengthControlRaw(context, request, cq)); + } + ::grpc::Status RateControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RateControlRequest& request, ::mavsdk::rpc::winch::RateControlResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RateControlResponse>> AsyncRateControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RateControlRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RateControlResponse>>(AsyncRateControlRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RateControlResponse>> PrepareAsyncRateControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RateControlRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RateControlResponse>>(PrepareAsyncRateControlRaw(context, request, cq)); + } + ::grpc::Status Lock(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LockRequest& request, ::mavsdk::rpc::winch::LockResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LockResponse>> AsyncLock(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LockRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LockResponse>>(AsyncLockRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LockResponse>> PrepareAsyncLock(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LockRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LockResponse>>(PrepareAsyncLockRaw(context, request, cq)); + } + ::grpc::Status Deliver(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::DeliverRequest& request, ::mavsdk::rpc::winch::DeliverResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::DeliverResponse>> AsyncDeliver(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::DeliverRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::DeliverResponse>>(AsyncDeliverRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::DeliverResponse>> PrepareAsyncDeliver(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::DeliverRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::DeliverResponse>>(PrepareAsyncDeliverRaw(context, request, cq)); + } + ::grpc::Status Hold(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::HoldRequest& request, ::mavsdk::rpc::winch::HoldResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::HoldResponse>> AsyncHold(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::HoldRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::HoldResponse>>(AsyncHoldRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::HoldResponse>> PrepareAsyncHold(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::HoldRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::HoldResponse>>(PrepareAsyncHoldRaw(context, request, cq)); + } + ::grpc::Status Retract(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RetractRequest& request, ::mavsdk::rpc::winch::RetractResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RetractResponse>> AsyncRetract(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RetractRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RetractResponse>>(AsyncRetractRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RetractResponse>> PrepareAsyncRetract(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RetractRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RetractResponse>>(PrepareAsyncRetractRaw(context, request, cq)); + } + ::grpc::Status LoadLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadLineRequest& request, ::mavsdk::rpc::winch::LoadLineResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LoadLineResponse>> AsyncLoadLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadLineRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LoadLineResponse>>(AsyncLoadLineRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LoadLineResponse>> PrepareAsyncLoadLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadLineRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LoadLineResponse>>(PrepareAsyncLoadLineRaw(context, request, cq)); + } + ::grpc::Status AbandonLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::AbandonLineRequest& request, ::mavsdk::rpc::winch::AbandonLineResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::AbandonLineResponse>> AsyncAbandonLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::AbandonLineRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::AbandonLineResponse>>(AsyncAbandonLineRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::AbandonLineResponse>> PrepareAsyncAbandonLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::AbandonLineRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::AbandonLineResponse>>(PrepareAsyncAbandonLineRaw(context, request, cq)); + } + ::grpc::Status LoadPayload(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadPayloadRequest& request, ::mavsdk::rpc::winch::LoadPayloadResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LoadPayloadResponse>> AsyncLoadPayload(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadPayloadRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LoadPayloadResponse>>(AsyncLoadPayloadRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LoadPayloadResponse>> PrepareAsyncLoadPayload(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadPayloadRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LoadPayloadResponse>>(PrepareAsyncLoadPayloadRaw(context, request, cq)); + } + class async final : + public StubInterface::async_interface { + public: + void SubscribeStatus(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::SubscribeStatusRequest* request, ::grpc::ClientReadReactor< ::mavsdk::rpc::winch::StatusResponse>* reactor) override; + void Relax(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelaxRequest* request, ::mavsdk::rpc::winch::RelaxResponse* response, std::function) override; + void Relax(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelaxRequest* request, ::mavsdk::rpc::winch::RelaxResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void RelativeLengthControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelativeLengthControlRequest* request, ::mavsdk::rpc::winch::RelativeLengthControlResponse* response, std::function) override; + void RelativeLengthControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelativeLengthControlRequest* request, ::mavsdk::rpc::winch::RelativeLengthControlResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void RateControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RateControlRequest* request, ::mavsdk::rpc::winch::RateControlResponse* response, std::function) override; + void RateControl(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RateControlRequest* request, ::mavsdk::rpc::winch::RateControlResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void Lock(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LockRequest* request, ::mavsdk::rpc::winch::LockResponse* response, std::function) override; + void Lock(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LockRequest* request, ::mavsdk::rpc::winch::LockResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void Deliver(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::DeliverRequest* request, ::mavsdk::rpc::winch::DeliverResponse* response, std::function) override; + void Deliver(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::DeliverRequest* request, ::mavsdk::rpc::winch::DeliverResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void Hold(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::HoldRequest* request, ::mavsdk::rpc::winch::HoldResponse* response, std::function) override; + void Hold(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::HoldRequest* request, ::mavsdk::rpc::winch::HoldResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void Retract(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RetractRequest* request, ::mavsdk::rpc::winch::RetractResponse* response, std::function) override; + void Retract(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RetractRequest* request, ::mavsdk::rpc::winch::RetractResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void LoadLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadLineRequest* request, ::mavsdk::rpc::winch::LoadLineResponse* response, std::function) override; + void LoadLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadLineRequest* request, ::mavsdk::rpc::winch::LoadLineResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void AbandonLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::AbandonLineRequest* request, ::mavsdk::rpc::winch::AbandonLineResponse* response, std::function) override; + void AbandonLine(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::AbandonLineRequest* request, ::mavsdk::rpc::winch::AbandonLineResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void LoadPayload(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadPayloadRequest* request, ::mavsdk::rpc::winch::LoadPayloadResponse* response, std::function) override; + void LoadPayload(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadPayloadRequest* request, ::mavsdk::rpc::winch::LoadPayloadResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + private: + friend class Stub; + explicit async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class async* async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class async async_stub_{this}; + ::grpc::ClientReader< ::mavsdk::rpc::winch::StatusResponse>* SubscribeStatusRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::SubscribeStatusRequest& request) override; + ::grpc::ClientAsyncReader< ::mavsdk::rpc::winch::StatusResponse>* AsyncSubscribeStatusRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::SubscribeStatusRequest& request, ::grpc::CompletionQueue* cq, void* tag) override; + ::grpc::ClientAsyncReader< ::mavsdk::rpc::winch::StatusResponse>* PrepareAsyncSubscribeStatusRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::SubscribeStatusRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RelaxResponse>* AsyncRelaxRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelaxRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RelaxResponse>* PrepareAsyncRelaxRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelaxRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RelativeLengthControlResponse>* AsyncRelativeLengthControlRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelativeLengthControlRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RelativeLengthControlResponse>* PrepareAsyncRelativeLengthControlRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RelativeLengthControlRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RateControlResponse>* AsyncRateControlRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RateControlRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RateControlResponse>* PrepareAsyncRateControlRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RateControlRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LockResponse>* AsyncLockRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LockRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LockResponse>* PrepareAsyncLockRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LockRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::DeliverResponse>* AsyncDeliverRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::DeliverRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::DeliverResponse>* PrepareAsyncDeliverRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::DeliverRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::HoldResponse>* AsyncHoldRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::HoldRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::HoldResponse>* PrepareAsyncHoldRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::HoldRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RetractResponse>* AsyncRetractRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RetractRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::RetractResponse>* PrepareAsyncRetractRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::RetractRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LoadLineResponse>* AsyncLoadLineRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadLineRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LoadLineResponse>* PrepareAsyncLoadLineRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadLineRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::AbandonLineResponse>* AsyncAbandonLineRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::AbandonLineRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::AbandonLineResponse>* PrepareAsyncAbandonLineRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::AbandonLineRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LoadPayloadResponse>* AsyncLoadPayloadRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadPayloadRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::mavsdk::rpc::winch::LoadPayloadResponse>* PrepareAsyncLoadPayloadRaw(::grpc::ClientContext* context, const ::mavsdk::rpc::winch::LoadPayloadRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_SubscribeStatus_; + const ::grpc::internal::RpcMethod rpcmethod_Relax_; + const ::grpc::internal::RpcMethod rpcmethod_RelativeLengthControl_; + const ::grpc::internal::RpcMethod rpcmethod_RateControl_; + const ::grpc::internal::RpcMethod rpcmethod_Lock_; + const ::grpc::internal::RpcMethod rpcmethod_Deliver_; + const ::grpc::internal::RpcMethod rpcmethod_Hold_; + const ::grpc::internal::RpcMethod rpcmethod_Retract_; + const ::grpc::internal::RpcMethod rpcmethod_LoadLine_; + const ::grpc::internal::RpcMethod rpcmethod_AbandonLine_; + const ::grpc::internal::RpcMethod rpcmethod_LoadPayload_; + }; + static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + + class Service : public ::grpc::Service { + public: + Service(); + virtual ~Service(); + // Subscribe to 'winch status' updates. + virtual ::grpc::Status SubscribeStatus(::grpc::ServerContext* context, const ::mavsdk::rpc::winch::SubscribeStatusRequest* request, ::grpc::ServerWriter< ::mavsdk::rpc::winch::StatusResponse>* writer); + // + // Allow motor to freewheel. + virtual ::grpc::Status Relax(::grpc::ServerContext* context, const ::mavsdk::rpc::winch::RelaxRequest* request, ::mavsdk::rpc::winch::RelaxResponse* response); + // + // Wind or unwind specified length of line, optionally using specified rate. + virtual ::grpc::Status RelativeLengthControl(::grpc::ServerContext* context, const ::mavsdk::rpc::winch::RelativeLengthControlRequest* request, ::mavsdk::rpc::winch::RelativeLengthControlResponse* response); + // + // Wind or unwind line at specified rate. + virtual ::grpc::Status RateControl(::grpc::ServerContext* context, const ::mavsdk::rpc::winch::RateControlRequest* request, ::mavsdk::rpc::winch::RateControlResponse* response); + // + // Perform the locking sequence to relieve motor while in the fully retracted position. + virtual ::grpc::Status Lock(::grpc::ServerContext* context, const ::mavsdk::rpc::winch::LockRequest* request, ::mavsdk::rpc::winch::LockResponse* response); + // + // Sequence of drop, slow down, touch down, reel up, lock. + virtual ::grpc::Status Deliver(::grpc::ServerContext* context, const ::mavsdk::rpc::winch::DeliverRequest* request, ::mavsdk::rpc::winch::DeliverResponse* response); + // + // Engage motor and hold current position. + virtual ::grpc::Status Hold(::grpc::ServerContext* context, const ::mavsdk::rpc::winch::HoldRequest* request, ::mavsdk::rpc::winch::HoldResponse* response); + // + // Return the reel to the fully retracted position. + virtual ::grpc::Status Retract(::grpc::ServerContext* context, const ::mavsdk::rpc::winch::RetractRequest* request, ::mavsdk::rpc::winch::RetractResponse* response); + // + // Load the reel with line. + // + // The winch will calculate the total loaded length and stop when the tension exceeds a threshold. + virtual ::grpc::Status LoadLine(::grpc::ServerContext* context, const ::mavsdk::rpc::winch::LoadLineRequest* request, ::mavsdk::rpc::winch::LoadLineResponse* response); + // + // Spool out the entire length of the line. + virtual ::grpc::Status AbandonLine(::grpc::ServerContext* context, const ::mavsdk::rpc::winch::AbandonLineRequest* request, ::mavsdk::rpc::winch::AbandonLineResponse* response); + // + // Spools out just enough to present the hook to the user to load the payload. + virtual ::grpc::Status LoadPayload(::grpc::ServerContext* context, const ::mavsdk::rpc::winch::LoadPayloadRequest* request, ::mavsdk::rpc::winch::LoadPayloadResponse* response); + }; + template + class WithAsyncMethod_SubscribeStatus : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_SubscribeStatus() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_SubscribeStatus() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SubscribeStatus(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::SubscribeStatusRequest* /*request*/, ::grpc::ServerWriter< ::mavsdk::rpc::winch::StatusResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestSubscribeStatus(::grpc::ServerContext* context, ::mavsdk::rpc::winch::SubscribeStatusRequest* request, ::grpc::ServerAsyncWriter< ::mavsdk::rpc::winch::StatusResponse>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncServerStreaming(0, context, request, writer, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_Relax : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_Relax() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_Relax() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Relax(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RelaxRequest* /*request*/, ::mavsdk::rpc::winch::RelaxResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRelax(::grpc::ServerContext* context, ::mavsdk::rpc::winch::RelaxRequest* request, ::grpc::ServerAsyncResponseWriter< ::mavsdk::rpc::winch::RelaxResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_RelativeLengthControl : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_RelativeLengthControl() { + ::grpc::Service::MarkMethodAsync(2); + } + ~WithAsyncMethod_RelativeLengthControl() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RelativeLengthControl(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RelativeLengthControlRequest* /*request*/, ::mavsdk::rpc::winch::RelativeLengthControlResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRelativeLengthControl(::grpc::ServerContext* context, ::mavsdk::rpc::winch::RelativeLengthControlRequest* request, ::grpc::ServerAsyncResponseWriter< ::mavsdk::rpc::winch::RelativeLengthControlResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_RateControl : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_RateControl() { + ::grpc::Service::MarkMethodAsync(3); + } + ~WithAsyncMethod_RateControl() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RateControl(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RateControlRequest* /*request*/, ::mavsdk::rpc::winch::RateControlResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRateControl(::grpc::ServerContext* context, ::mavsdk::rpc::winch::RateControlRequest* request, ::grpc::ServerAsyncResponseWriter< ::mavsdk::rpc::winch::RateControlResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(3, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_Lock : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_Lock() { + ::grpc::Service::MarkMethodAsync(4); + } + ~WithAsyncMethod_Lock() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Lock(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::LockRequest* /*request*/, ::mavsdk::rpc::winch::LockResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestLock(::grpc::ServerContext* context, ::mavsdk::rpc::winch::LockRequest* request, ::grpc::ServerAsyncResponseWriter< ::mavsdk::rpc::winch::LockResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(4, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_Deliver : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_Deliver() { + ::grpc::Service::MarkMethodAsync(5); + } + ~WithAsyncMethod_Deliver() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Deliver(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::DeliverRequest* /*request*/, ::mavsdk::rpc::winch::DeliverResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestDeliver(::grpc::ServerContext* context, ::mavsdk::rpc::winch::DeliverRequest* request, ::grpc::ServerAsyncResponseWriter< ::mavsdk::rpc::winch::DeliverResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(5, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_Hold : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_Hold() { + ::grpc::Service::MarkMethodAsync(6); + } + ~WithAsyncMethod_Hold() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Hold(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::HoldRequest* /*request*/, ::mavsdk::rpc::winch::HoldResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestHold(::grpc::ServerContext* context, ::mavsdk::rpc::winch::HoldRequest* request, ::grpc::ServerAsyncResponseWriter< ::mavsdk::rpc::winch::HoldResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(6, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_Retract : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_Retract() { + ::grpc::Service::MarkMethodAsync(7); + } + ~WithAsyncMethod_Retract() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Retract(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RetractRequest* /*request*/, ::mavsdk::rpc::winch::RetractResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRetract(::grpc::ServerContext* context, ::mavsdk::rpc::winch::RetractRequest* request, ::grpc::ServerAsyncResponseWriter< ::mavsdk::rpc::winch::RetractResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(7, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_LoadLine : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_LoadLine() { + ::grpc::Service::MarkMethodAsync(8); + } + ~WithAsyncMethod_LoadLine() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status LoadLine(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::LoadLineRequest* /*request*/, ::mavsdk::rpc::winch::LoadLineResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestLoadLine(::grpc::ServerContext* context, ::mavsdk::rpc::winch::LoadLineRequest* request, ::grpc::ServerAsyncResponseWriter< ::mavsdk::rpc::winch::LoadLineResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(8, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_AbandonLine : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_AbandonLine() { + ::grpc::Service::MarkMethodAsync(9); + } + ~WithAsyncMethod_AbandonLine() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AbandonLine(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::AbandonLineRequest* /*request*/, ::mavsdk::rpc::winch::AbandonLineResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestAbandonLine(::grpc::ServerContext* context, ::mavsdk::rpc::winch::AbandonLineRequest* request, ::grpc::ServerAsyncResponseWriter< ::mavsdk::rpc::winch::AbandonLineResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(9, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_LoadPayload : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_LoadPayload() { + ::grpc::Service::MarkMethodAsync(10); + } + ~WithAsyncMethod_LoadPayload() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status LoadPayload(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::LoadPayloadRequest* /*request*/, ::mavsdk::rpc::winch::LoadPayloadResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestLoadPayload(::grpc::ServerContext* context, ::mavsdk::rpc::winch::LoadPayloadRequest* request, ::grpc::ServerAsyncResponseWriter< ::mavsdk::rpc::winch::LoadPayloadResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(10, context, request, response, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_SubscribeStatus > > > > > > > > > > AsyncService; + template + class WithCallbackMethod_SubscribeStatus : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_SubscribeStatus() { + ::grpc::Service::MarkMethodCallback(0, + new ::grpc::internal::CallbackServerStreamingHandler< ::mavsdk::rpc::winch::SubscribeStatusRequest, ::mavsdk::rpc::winch::StatusResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::mavsdk::rpc::winch::SubscribeStatusRequest* request) { return this->SubscribeStatus(context, request); })); + } + ~WithCallbackMethod_SubscribeStatus() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SubscribeStatus(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::SubscribeStatusRequest* /*request*/, ::grpc::ServerWriter< ::mavsdk::rpc::winch::StatusResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerWriteReactor< ::mavsdk::rpc::winch::StatusResponse>* SubscribeStatus( + ::grpc::CallbackServerContext* /*context*/, const ::mavsdk::rpc::winch::SubscribeStatusRequest* /*request*/) { return nullptr; } + }; + template + class WithCallbackMethod_Relax : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_Relax() { + ::grpc::Service::MarkMethodCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::winch::RelaxRequest, ::mavsdk::rpc::winch::RelaxResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::mavsdk::rpc::winch::RelaxRequest* request, ::mavsdk::rpc::winch::RelaxResponse* response) { return this->Relax(context, request, response); }));} + void SetMessageAllocatorFor_Relax( + ::grpc::MessageAllocator< ::mavsdk::rpc::winch::RelaxRequest, ::mavsdk::rpc::winch::RelaxResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); + static_cast<::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::winch::RelaxRequest, ::mavsdk::rpc::winch::RelaxResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_Relax() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Relax(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RelaxRequest* /*request*/, ::mavsdk::rpc::winch::RelaxResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* Relax( + ::grpc::CallbackServerContext* /*context*/, const ::mavsdk::rpc::winch::RelaxRequest* /*request*/, ::mavsdk::rpc::winch::RelaxResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_RelativeLengthControl : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_RelativeLengthControl() { + ::grpc::Service::MarkMethodCallback(2, + new ::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::winch::RelativeLengthControlRequest, ::mavsdk::rpc::winch::RelativeLengthControlResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::mavsdk::rpc::winch::RelativeLengthControlRequest* request, ::mavsdk::rpc::winch::RelativeLengthControlResponse* response) { return this->RelativeLengthControl(context, request, response); }));} + void SetMessageAllocatorFor_RelativeLengthControl( + ::grpc::MessageAllocator< ::mavsdk::rpc::winch::RelativeLengthControlRequest, ::mavsdk::rpc::winch::RelativeLengthControlResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(2); + static_cast<::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::winch::RelativeLengthControlRequest, ::mavsdk::rpc::winch::RelativeLengthControlResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_RelativeLengthControl() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RelativeLengthControl(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RelativeLengthControlRequest* /*request*/, ::mavsdk::rpc::winch::RelativeLengthControlResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* RelativeLengthControl( + ::grpc::CallbackServerContext* /*context*/, const ::mavsdk::rpc::winch::RelativeLengthControlRequest* /*request*/, ::mavsdk::rpc::winch::RelativeLengthControlResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_RateControl : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_RateControl() { + ::grpc::Service::MarkMethodCallback(3, + new ::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::winch::RateControlRequest, ::mavsdk::rpc::winch::RateControlResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::mavsdk::rpc::winch::RateControlRequest* request, ::mavsdk::rpc::winch::RateControlResponse* response) { return this->RateControl(context, request, response); }));} + void SetMessageAllocatorFor_RateControl( + ::grpc::MessageAllocator< ::mavsdk::rpc::winch::RateControlRequest, ::mavsdk::rpc::winch::RateControlResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(3); + static_cast<::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::winch::RateControlRequest, ::mavsdk::rpc::winch::RateControlResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_RateControl() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RateControl(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RateControlRequest* /*request*/, ::mavsdk::rpc::winch::RateControlResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* RateControl( + ::grpc::CallbackServerContext* /*context*/, const ::mavsdk::rpc::winch::RateControlRequest* /*request*/, ::mavsdk::rpc::winch::RateControlResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_Lock : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_Lock() { + ::grpc::Service::MarkMethodCallback(4, + new ::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::winch::LockRequest, ::mavsdk::rpc::winch::LockResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::mavsdk::rpc::winch::LockRequest* request, ::mavsdk::rpc::winch::LockResponse* response) { return this->Lock(context, request, response); }));} + void SetMessageAllocatorFor_Lock( + ::grpc::MessageAllocator< ::mavsdk::rpc::winch::LockRequest, ::mavsdk::rpc::winch::LockResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(4); + static_cast<::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::winch::LockRequest, ::mavsdk::rpc::winch::LockResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_Lock() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Lock(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::LockRequest* /*request*/, ::mavsdk::rpc::winch::LockResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* Lock( + ::grpc::CallbackServerContext* /*context*/, const ::mavsdk::rpc::winch::LockRequest* /*request*/, ::mavsdk::rpc::winch::LockResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_Deliver : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_Deliver() { + ::grpc::Service::MarkMethodCallback(5, + new ::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::winch::DeliverRequest, ::mavsdk::rpc::winch::DeliverResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::mavsdk::rpc::winch::DeliverRequest* request, ::mavsdk::rpc::winch::DeliverResponse* response) { return this->Deliver(context, request, response); }));} + void SetMessageAllocatorFor_Deliver( + ::grpc::MessageAllocator< ::mavsdk::rpc::winch::DeliverRequest, ::mavsdk::rpc::winch::DeliverResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(5); + static_cast<::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::winch::DeliverRequest, ::mavsdk::rpc::winch::DeliverResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_Deliver() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Deliver(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::DeliverRequest* /*request*/, ::mavsdk::rpc::winch::DeliverResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* Deliver( + ::grpc::CallbackServerContext* /*context*/, const ::mavsdk::rpc::winch::DeliverRequest* /*request*/, ::mavsdk::rpc::winch::DeliverResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_Hold : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_Hold() { + ::grpc::Service::MarkMethodCallback(6, + new ::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::winch::HoldRequest, ::mavsdk::rpc::winch::HoldResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::mavsdk::rpc::winch::HoldRequest* request, ::mavsdk::rpc::winch::HoldResponse* response) { return this->Hold(context, request, response); }));} + void SetMessageAllocatorFor_Hold( + ::grpc::MessageAllocator< ::mavsdk::rpc::winch::HoldRequest, ::mavsdk::rpc::winch::HoldResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(6); + static_cast<::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::winch::HoldRequest, ::mavsdk::rpc::winch::HoldResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_Hold() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Hold(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::HoldRequest* /*request*/, ::mavsdk::rpc::winch::HoldResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* Hold( + ::grpc::CallbackServerContext* /*context*/, const ::mavsdk::rpc::winch::HoldRequest* /*request*/, ::mavsdk::rpc::winch::HoldResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_Retract : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_Retract() { + ::grpc::Service::MarkMethodCallback(7, + new ::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::winch::RetractRequest, ::mavsdk::rpc::winch::RetractResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::mavsdk::rpc::winch::RetractRequest* request, ::mavsdk::rpc::winch::RetractResponse* response) { return this->Retract(context, request, response); }));} + void SetMessageAllocatorFor_Retract( + ::grpc::MessageAllocator< ::mavsdk::rpc::winch::RetractRequest, ::mavsdk::rpc::winch::RetractResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(7); + static_cast<::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::winch::RetractRequest, ::mavsdk::rpc::winch::RetractResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_Retract() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Retract(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RetractRequest* /*request*/, ::mavsdk::rpc::winch::RetractResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* Retract( + ::grpc::CallbackServerContext* /*context*/, const ::mavsdk::rpc::winch::RetractRequest* /*request*/, ::mavsdk::rpc::winch::RetractResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_LoadLine : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_LoadLine() { + ::grpc::Service::MarkMethodCallback(8, + new ::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::winch::LoadLineRequest, ::mavsdk::rpc::winch::LoadLineResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::mavsdk::rpc::winch::LoadLineRequest* request, ::mavsdk::rpc::winch::LoadLineResponse* response) { return this->LoadLine(context, request, response); }));} + void SetMessageAllocatorFor_LoadLine( + ::grpc::MessageAllocator< ::mavsdk::rpc::winch::LoadLineRequest, ::mavsdk::rpc::winch::LoadLineResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(8); + static_cast<::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::winch::LoadLineRequest, ::mavsdk::rpc::winch::LoadLineResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_LoadLine() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status LoadLine(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::LoadLineRequest* /*request*/, ::mavsdk::rpc::winch::LoadLineResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* LoadLine( + ::grpc::CallbackServerContext* /*context*/, const ::mavsdk::rpc::winch::LoadLineRequest* /*request*/, ::mavsdk::rpc::winch::LoadLineResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_AbandonLine : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_AbandonLine() { + ::grpc::Service::MarkMethodCallback(9, + new ::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::winch::AbandonLineRequest, ::mavsdk::rpc::winch::AbandonLineResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::mavsdk::rpc::winch::AbandonLineRequest* request, ::mavsdk::rpc::winch::AbandonLineResponse* response) { return this->AbandonLine(context, request, response); }));} + void SetMessageAllocatorFor_AbandonLine( + ::grpc::MessageAllocator< ::mavsdk::rpc::winch::AbandonLineRequest, ::mavsdk::rpc::winch::AbandonLineResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(9); + static_cast<::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::winch::AbandonLineRequest, ::mavsdk::rpc::winch::AbandonLineResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_AbandonLine() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AbandonLine(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::AbandonLineRequest* /*request*/, ::mavsdk::rpc::winch::AbandonLineResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* AbandonLine( + ::grpc::CallbackServerContext* /*context*/, const ::mavsdk::rpc::winch::AbandonLineRequest* /*request*/, ::mavsdk::rpc::winch::AbandonLineResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_LoadPayload : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_LoadPayload() { + ::grpc::Service::MarkMethodCallback(10, + new ::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::winch::LoadPayloadRequest, ::mavsdk::rpc::winch::LoadPayloadResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::mavsdk::rpc::winch::LoadPayloadRequest* request, ::mavsdk::rpc::winch::LoadPayloadResponse* response) { return this->LoadPayload(context, request, response); }));} + void SetMessageAllocatorFor_LoadPayload( + ::grpc::MessageAllocator< ::mavsdk::rpc::winch::LoadPayloadRequest, ::mavsdk::rpc::winch::LoadPayloadResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(10); + static_cast<::grpc::internal::CallbackUnaryHandler< ::mavsdk::rpc::winch::LoadPayloadRequest, ::mavsdk::rpc::winch::LoadPayloadResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_LoadPayload() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status LoadPayload(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::LoadPayloadRequest* /*request*/, ::mavsdk::rpc::winch::LoadPayloadResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* LoadPayload( + ::grpc::CallbackServerContext* /*context*/, const ::mavsdk::rpc::winch::LoadPayloadRequest* /*request*/, ::mavsdk::rpc::winch::LoadPayloadResponse* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_SubscribeStatus > > > > > > > > > > CallbackService; + typedef CallbackService ExperimentalCallbackService; + template + class WithGenericMethod_SubscribeStatus : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_SubscribeStatus() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_SubscribeStatus() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SubscribeStatus(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::SubscribeStatusRequest* /*request*/, ::grpc::ServerWriter< ::mavsdk::rpc::winch::StatusResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_Relax : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_Relax() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_Relax() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Relax(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RelaxRequest* /*request*/, ::mavsdk::rpc::winch::RelaxResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_RelativeLengthControl : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_RelativeLengthControl() { + ::grpc::Service::MarkMethodGeneric(2); + } + ~WithGenericMethod_RelativeLengthControl() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RelativeLengthControl(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RelativeLengthControlRequest* /*request*/, ::mavsdk::rpc::winch::RelativeLengthControlResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_RateControl : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_RateControl() { + ::grpc::Service::MarkMethodGeneric(3); + } + ~WithGenericMethod_RateControl() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RateControl(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RateControlRequest* /*request*/, ::mavsdk::rpc::winch::RateControlResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_Lock : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_Lock() { + ::grpc::Service::MarkMethodGeneric(4); + } + ~WithGenericMethod_Lock() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Lock(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::LockRequest* /*request*/, ::mavsdk::rpc::winch::LockResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_Deliver : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_Deliver() { + ::grpc::Service::MarkMethodGeneric(5); + } + ~WithGenericMethod_Deliver() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Deliver(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::DeliverRequest* /*request*/, ::mavsdk::rpc::winch::DeliverResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_Hold : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_Hold() { + ::grpc::Service::MarkMethodGeneric(6); + } + ~WithGenericMethod_Hold() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Hold(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::HoldRequest* /*request*/, ::mavsdk::rpc::winch::HoldResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_Retract : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_Retract() { + ::grpc::Service::MarkMethodGeneric(7); + } + ~WithGenericMethod_Retract() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Retract(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RetractRequest* /*request*/, ::mavsdk::rpc::winch::RetractResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_LoadLine : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_LoadLine() { + ::grpc::Service::MarkMethodGeneric(8); + } + ~WithGenericMethod_LoadLine() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status LoadLine(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::LoadLineRequest* /*request*/, ::mavsdk::rpc::winch::LoadLineResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_AbandonLine : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_AbandonLine() { + ::grpc::Service::MarkMethodGeneric(9); + } + ~WithGenericMethod_AbandonLine() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AbandonLine(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::AbandonLineRequest* /*request*/, ::mavsdk::rpc::winch::AbandonLineResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_LoadPayload : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_LoadPayload() { + ::grpc::Service::MarkMethodGeneric(10); + } + ~WithGenericMethod_LoadPayload() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status LoadPayload(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::LoadPayloadRequest* /*request*/, ::mavsdk::rpc::winch::LoadPayloadResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_SubscribeStatus : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_SubscribeStatus() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_SubscribeStatus() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SubscribeStatus(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::SubscribeStatusRequest* /*request*/, ::grpc::ServerWriter< ::mavsdk::rpc::winch::StatusResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestSubscribeStatus(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncServerStreaming(0, context, request, writer, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_Relax : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_Relax() { + ::grpc::Service::MarkMethodRaw(1); + } + ~WithRawMethod_Relax() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Relax(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RelaxRequest* /*request*/, ::mavsdk::rpc::winch::RelaxResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRelax(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_RelativeLengthControl : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_RelativeLengthControl() { + ::grpc::Service::MarkMethodRaw(2); + } + ~WithRawMethod_RelativeLengthControl() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RelativeLengthControl(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RelativeLengthControlRequest* /*request*/, ::mavsdk::rpc::winch::RelativeLengthControlResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRelativeLengthControl(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_RateControl : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_RateControl() { + ::grpc::Service::MarkMethodRaw(3); + } + ~WithRawMethod_RateControl() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RateControl(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RateControlRequest* /*request*/, ::mavsdk::rpc::winch::RateControlResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRateControl(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(3, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_Lock : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_Lock() { + ::grpc::Service::MarkMethodRaw(4); + } + ~WithRawMethod_Lock() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Lock(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::LockRequest* /*request*/, ::mavsdk::rpc::winch::LockResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestLock(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(4, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_Deliver : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_Deliver() { + ::grpc::Service::MarkMethodRaw(5); + } + ~WithRawMethod_Deliver() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Deliver(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::DeliverRequest* /*request*/, ::mavsdk::rpc::winch::DeliverResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestDeliver(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(5, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_Hold : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_Hold() { + ::grpc::Service::MarkMethodRaw(6); + } + ~WithRawMethod_Hold() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Hold(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::HoldRequest* /*request*/, ::mavsdk::rpc::winch::HoldResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestHold(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(6, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_Retract : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_Retract() { + ::grpc::Service::MarkMethodRaw(7); + } + ~WithRawMethod_Retract() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Retract(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RetractRequest* /*request*/, ::mavsdk::rpc::winch::RetractResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRetract(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(7, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_LoadLine : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_LoadLine() { + ::grpc::Service::MarkMethodRaw(8); + } + ~WithRawMethod_LoadLine() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status LoadLine(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::LoadLineRequest* /*request*/, ::mavsdk::rpc::winch::LoadLineResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestLoadLine(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(8, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_AbandonLine : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_AbandonLine() { + ::grpc::Service::MarkMethodRaw(9); + } + ~WithRawMethod_AbandonLine() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AbandonLine(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::AbandonLineRequest* /*request*/, ::mavsdk::rpc::winch::AbandonLineResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestAbandonLine(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(9, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_LoadPayload : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_LoadPayload() { + ::grpc::Service::MarkMethodRaw(10); + } + ~WithRawMethod_LoadPayload() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status LoadPayload(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::LoadPayloadRequest* /*request*/, ::mavsdk::rpc::winch::LoadPayloadResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestLoadPayload(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(10, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawCallbackMethod_SubscribeStatus : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_SubscribeStatus() { + ::grpc::Service::MarkMethodRawCallback(0, + new ::grpc::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const::grpc::ByteBuffer* request) { return this->SubscribeStatus(context, request); })); + } + ~WithRawCallbackMethod_SubscribeStatus() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status SubscribeStatus(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::SubscribeStatusRequest* /*request*/, ::grpc::ServerWriter< ::mavsdk::rpc::winch::StatusResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerWriteReactor< ::grpc::ByteBuffer>* SubscribeStatus( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_Relax : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_Relax() { + ::grpc::Service::MarkMethodRawCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Relax(context, request, response); })); + } + ~WithRawCallbackMethod_Relax() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Relax(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RelaxRequest* /*request*/, ::mavsdk::rpc::winch::RelaxResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* Relax( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_RelativeLengthControl : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_RelativeLengthControl() { + ::grpc::Service::MarkMethodRawCallback(2, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->RelativeLengthControl(context, request, response); })); + } + ~WithRawCallbackMethod_RelativeLengthControl() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RelativeLengthControl(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RelativeLengthControlRequest* /*request*/, ::mavsdk::rpc::winch::RelativeLengthControlResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* RelativeLengthControl( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_RateControl : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_RateControl() { + ::grpc::Service::MarkMethodRawCallback(3, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->RateControl(context, request, response); })); + } + ~WithRawCallbackMethod_RateControl() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RateControl(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RateControlRequest* /*request*/, ::mavsdk::rpc::winch::RateControlResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* RateControl( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_Lock : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_Lock() { + ::grpc::Service::MarkMethodRawCallback(4, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Lock(context, request, response); })); + } + ~WithRawCallbackMethod_Lock() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Lock(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::LockRequest* /*request*/, ::mavsdk::rpc::winch::LockResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* Lock( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_Deliver : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_Deliver() { + ::grpc::Service::MarkMethodRawCallback(5, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Deliver(context, request, response); })); + } + ~WithRawCallbackMethod_Deliver() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Deliver(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::DeliverRequest* /*request*/, ::mavsdk::rpc::winch::DeliverResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* Deliver( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_Hold : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_Hold() { + ::grpc::Service::MarkMethodRawCallback(6, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Hold(context, request, response); })); + } + ~WithRawCallbackMethod_Hold() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Hold(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::HoldRequest* /*request*/, ::mavsdk::rpc::winch::HoldResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* Hold( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_Retract : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_Retract() { + ::grpc::Service::MarkMethodRawCallback(7, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Retract(context, request, response); })); + } + ~WithRawCallbackMethod_Retract() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Retract(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RetractRequest* /*request*/, ::mavsdk::rpc::winch::RetractResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* Retract( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_LoadLine : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_LoadLine() { + ::grpc::Service::MarkMethodRawCallback(8, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->LoadLine(context, request, response); })); + } + ~WithRawCallbackMethod_LoadLine() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status LoadLine(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::LoadLineRequest* /*request*/, ::mavsdk::rpc::winch::LoadLineResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* LoadLine( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_AbandonLine : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_AbandonLine() { + ::grpc::Service::MarkMethodRawCallback(9, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->AbandonLine(context, request, response); })); + } + ~WithRawCallbackMethod_AbandonLine() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AbandonLine(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::AbandonLineRequest* /*request*/, ::mavsdk::rpc::winch::AbandonLineResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* AbandonLine( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_LoadPayload : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_LoadPayload() { + ::grpc::Service::MarkMethodRawCallback(10, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->LoadPayload(context, request, response); })); + } + ~WithRawCallbackMethod_LoadPayload() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status LoadPayload(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::LoadPayloadRequest* /*request*/, ::mavsdk::rpc::winch::LoadPayloadResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* LoadPayload( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithStreamedUnaryMethod_Relax : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_Relax() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::StreamedUnaryHandler< + ::mavsdk::rpc::winch::RelaxRequest, ::mavsdk::rpc::winch::RelaxResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::mavsdk::rpc::winch::RelaxRequest, ::mavsdk::rpc::winch::RelaxResponse>* streamer) { + return this->StreamedRelax(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_Relax() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status Relax(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RelaxRequest* /*request*/, ::mavsdk::rpc::winch::RelaxResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedRelax(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::mavsdk::rpc::winch::RelaxRequest,::mavsdk::rpc::winch::RelaxResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_RelativeLengthControl : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_RelativeLengthControl() { + ::grpc::Service::MarkMethodStreamed(2, + new ::grpc::internal::StreamedUnaryHandler< + ::mavsdk::rpc::winch::RelativeLengthControlRequest, ::mavsdk::rpc::winch::RelativeLengthControlResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::mavsdk::rpc::winch::RelativeLengthControlRequest, ::mavsdk::rpc::winch::RelativeLengthControlResponse>* streamer) { + return this->StreamedRelativeLengthControl(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_RelativeLengthControl() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status RelativeLengthControl(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RelativeLengthControlRequest* /*request*/, ::mavsdk::rpc::winch::RelativeLengthControlResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedRelativeLengthControl(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::mavsdk::rpc::winch::RelativeLengthControlRequest,::mavsdk::rpc::winch::RelativeLengthControlResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_RateControl : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_RateControl() { + ::grpc::Service::MarkMethodStreamed(3, + new ::grpc::internal::StreamedUnaryHandler< + ::mavsdk::rpc::winch::RateControlRequest, ::mavsdk::rpc::winch::RateControlResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::mavsdk::rpc::winch::RateControlRequest, ::mavsdk::rpc::winch::RateControlResponse>* streamer) { + return this->StreamedRateControl(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_RateControl() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status RateControl(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RateControlRequest* /*request*/, ::mavsdk::rpc::winch::RateControlResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedRateControl(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::mavsdk::rpc::winch::RateControlRequest,::mavsdk::rpc::winch::RateControlResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_Lock : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_Lock() { + ::grpc::Service::MarkMethodStreamed(4, + new ::grpc::internal::StreamedUnaryHandler< + ::mavsdk::rpc::winch::LockRequest, ::mavsdk::rpc::winch::LockResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::mavsdk::rpc::winch::LockRequest, ::mavsdk::rpc::winch::LockResponse>* streamer) { + return this->StreamedLock(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_Lock() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status Lock(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::LockRequest* /*request*/, ::mavsdk::rpc::winch::LockResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedLock(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::mavsdk::rpc::winch::LockRequest,::mavsdk::rpc::winch::LockResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_Deliver : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_Deliver() { + ::grpc::Service::MarkMethodStreamed(5, + new ::grpc::internal::StreamedUnaryHandler< + ::mavsdk::rpc::winch::DeliverRequest, ::mavsdk::rpc::winch::DeliverResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::mavsdk::rpc::winch::DeliverRequest, ::mavsdk::rpc::winch::DeliverResponse>* streamer) { + return this->StreamedDeliver(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_Deliver() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status Deliver(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::DeliverRequest* /*request*/, ::mavsdk::rpc::winch::DeliverResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedDeliver(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::mavsdk::rpc::winch::DeliverRequest,::mavsdk::rpc::winch::DeliverResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_Hold : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_Hold() { + ::grpc::Service::MarkMethodStreamed(6, + new ::grpc::internal::StreamedUnaryHandler< + ::mavsdk::rpc::winch::HoldRequest, ::mavsdk::rpc::winch::HoldResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::mavsdk::rpc::winch::HoldRequest, ::mavsdk::rpc::winch::HoldResponse>* streamer) { + return this->StreamedHold(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_Hold() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status Hold(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::HoldRequest* /*request*/, ::mavsdk::rpc::winch::HoldResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedHold(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::mavsdk::rpc::winch::HoldRequest,::mavsdk::rpc::winch::HoldResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_Retract : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_Retract() { + ::grpc::Service::MarkMethodStreamed(7, + new ::grpc::internal::StreamedUnaryHandler< + ::mavsdk::rpc::winch::RetractRequest, ::mavsdk::rpc::winch::RetractResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::mavsdk::rpc::winch::RetractRequest, ::mavsdk::rpc::winch::RetractResponse>* streamer) { + return this->StreamedRetract(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_Retract() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status Retract(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::RetractRequest* /*request*/, ::mavsdk::rpc::winch::RetractResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedRetract(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::mavsdk::rpc::winch::RetractRequest,::mavsdk::rpc::winch::RetractResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_LoadLine : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_LoadLine() { + ::grpc::Service::MarkMethodStreamed(8, + new ::grpc::internal::StreamedUnaryHandler< + ::mavsdk::rpc::winch::LoadLineRequest, ::mavsdk::rpc::winch::LoadLineResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::mavsdk::rpc::winch::LoadLineRequest, ::mavsdk::rpc::winch::LoadLineResponse>* streamer) { + return this->StreamedLoadLine(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_LoadLine() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status LoadLine(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::LoadLineRequest* /*request*/, ::mavsdk::rpc::winch::LoadLineResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedLoadLine(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::mavsdk::rpc::winch::LoadLineRequest,::mavsdk::rpc::winch::LoadLineResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_AbandonLine : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_AbandonLine() { + ::grpc::Service::MarkMethodStreamed(9, + new ::grpc::internal::StreamedUnaryHandler< + ::mavsdk::rpc::winch::AbandonLineRequest, ::mavsdk::rpc::winch::AbandonLineResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::mavsdk::rpc::winch::AbandonLineRequest, ::mavsdk::rpc::winch::AbandonLineResponse>* streamer) { + return this->StreamedAbandonLine(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_AbandonLine() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status AbandonLine(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::AbandonLineRequest* /*request*/, ::mavsdk::rpc::winch::AbandonLineResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedAbandonLine(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::mavsdk::rpc::winch::AbandonLineRequest,::mavsdk::rpc::winch::AbandonLineResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_LoadPayload : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_LoadPayload() { + ::grpc::Service::MarkMethodStreamed(10, + new ::grpc::internal::StreamedUnaryHandler< + ::mavsdk::rpc::winch::LoadPayloadRequest, ::mavsdk::rpc::winch::LoadPayloadResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::mavsdk::rpc::winch::LoadPayloadRequest, ::mavsdk::rpc::winch::LoadPayloadResponse>* streamer) { + return this->StreamedLoadPayload(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_LoadPayload() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status LoadPayload(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::LoadPayloadRequest* /*request*/, ::mavsdk::rpc::winch::LoadPayloadResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedLoadPayload(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::mavsdk::rpc::winch::LoadPayloadRequest,::mavsdk::rpc::winch::LoadPayloadResponse>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_Relax > > > > > > > > > StreamedUnaryService; + template + class WithSplitStreamingMethod_SubscribeStatus : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithSplitStreamingMethod_SubscribeStatus() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::SplitServerStreamingHandler< + ::mavsdk::rpc::winch::SubscribeStatusRequest, ::mavsdk::rpc::winch::StatusResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerSplitStreamer< + ::mavsdk::rpc::winch::SubscribeStatusRequest, ::mavsdk::rpc::winch::StatusResponse>* streamer) { + return this->StreamedSubscribeStatus(context, + streamer); + })); + } + ~WithSplitStreamingMethod_SubscribeStatus() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status SubscribeStatus(::grpc::ServerContext* /*context*/, const ::mavsdk::rpc::winch::SubscribeStatusRequest* /*request*/, ::grpc::ServerWriter< ::mavsdk::rpc::winch::StatusResponse>* /*writer*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with split streamed + virtual ::grpc::Status StreamedSubscribeStatus(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::mavsdk::rpc::winch::SubscribeStatusRequest,::mavsdk::rpc::winch::StatusResponse>* server_split_streamer) = 0; + }; + typedef WithSplitStreamingMethod_SubscribeStatus SplitStreamedService; + typedef WithSplitStreamingMethod_SubscribeStatus > > > > > > > > > > StreamedService; +}; + +} // namespace winch +} // namespace rpc +} // namespace mavsdk + + +#endif // GRPC_winch_2fwinch_2eproto__INCLUDED diff --git a/src/mavsdk_server/src/generated/winch/winch.pb.cc b/src/mavsdk_server/src/generated/winch/winch.pb.cc new file mode 100644 index 0000000000..5feb140477 --- /dev/null +++ b/src/mavsdk_server/src/generated/winch/winch.pb.cc @@ -0,0 +1,5924 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: winch/winch.proto + +#include "winch/winch.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace mavsdk { +namespace rpc { +namespace winch { +PROTOBUF_CONSTEXPR SubscribeStatusRequest::SubscribeStatusRequest( + ::_pbi::ConstantInitialized){} +struct SubscribeStatusRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR SubscribeStatusRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~SubscribeStatusRequestDefaultTypeInternal() {} + union { + SubscribeStatusRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SubscribeStatusRequestDefaultTypeInternal _SubscribeStatusRequest_default_instance_; +PROTOBUF_CONSTEXPR StatusResponse::StatusResponse( + ::_pbi::ConstantInitialized) + : status_(nullptr){} +struct StatusResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR StatusResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~StatusResponseDefaultTypeInternal() {} + union { + StatusResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StatusResponseDefaultTypeInternal _StatusResponse_default_instance_; +PROTOBUF_CONSTEXPR StatusFlags::StatusFlags( + ::_pbi::ConstantInitialized) + : healthy_(false) + , fully_retracted_(false) + , moving_(false) + , clutch_engaged_(false) + , locked_(false) + , dropping_(false) + , arresting_(false) + , ground_sense_(false) + , retracting_(false) + , redeliver_(false) + , abandon_line_(false) + , locking_(false) + , load_line_(false) + , load_payload_(false){} +struct StatusFlagsDefaultTypeInternal { + PROTOBUF_CONSTEXPR StatusFlagsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~StatusFlagsDefaultTypeInternal() {} + union { + StatusFlags _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StatusFlagsDefaultTypeInternal _StatusFlags_default_instance_; +PROTOBUF_CONSTEXPR Status::Status( + ::_pbi::ConstantInitialized) + : status_flags_(nullptr) + , time_usec_(uint64_t{0u}) + , line_length_m_(0) + , speed_m_s_(0) + , tension_kg_(0) + , voltage_v_(0) + , current_a_(0) + , temperature_c_(0){} +struct StatusDefaultTypeInternal { + PROTOBUF_CONSTEXPR StatusDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~StatusDefaultTypeInternal() {} + union { + Status _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StatusDefaultTypeInternal _Status_default_instance_; +PROTOBUF_CONSTEXPR RelaxRequest::RelaxRequest( + ::_pbi::ConstantInitialized) + : instance_(0u){} +struct RelaxRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR RelaxRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~RelaxRequestDefaultTypeInternal() {} + union { + RelaxRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RelaxRequestDefaultTypeInternal _RelaxRequest_default_instance_; +PROTOBUF_CONSTEXPR RelaxResponse::RelaxResponse( + ::_pbi::ConstantInitialized) + : winch_result_(nullptr){} +struct RelaxResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR RelaxResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~RelaxResponseDefaultTypeInternal() {} + union { + RelaxResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RelaxResponseDefaultTypeInternal _RelaxResponse_default_instance_; +PROTOBUF_CONSTEXPR RelativeLengthControlRequest::RelativeLengthControlRequest( + ::_pbi::ConstantInitialized) + : instance_(0u) + , length_m_(0) + , rate_m_s_(0){} +struct RelativeLengthControlRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR RelativeLengthControlRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~RelativeLengthControlRequestDefaultTypeInternal() {} + union { + RelativeLengthControlRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RelativeLengthControlRequestDefaultTypeInternal _RelativeLengthControlRequest_default_instance_; +PROTOBUF_CONSTEXPR RelativeLengthControlResponse::RelativeLengthControlResponse( + ::_pbi::ConstantInitialized) + : winch_result_(nullptr){} +struct RelativeLengthControlResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR RelativeLengthControlResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~RelativeLengthControlResponseDefaultTypeInternal() {} + union { + RelativeLengthControlResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RelativeLengthControlResponseDefaultTypeInternal _RelativeLengthControlResponse_default_instance_; +PROTOBUF_CONSTEXPR RateControlRequest::RateControlRequest( + ::_pbi::ConstantInitialized) + : instance_(0u) + , rate_m_s_(0){} +struct RateControlRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR RateControlRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~RateControlRequestDefaultTypeInternal() {} + union { + RateControlRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RateControlRequestDefaultTypeInternal _RateControlRequest_default_instance_; +PROTOBUF_CONSTEXPR RateControlResponse::RateControlResponse( + ::_pbi::ConstantInitialized) + : winch_result_(nullptr){} +struct RateControlResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR RateControlResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~RateControlResponseDefaultTypeInternal() {} + union { + RateControlResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RateControlResponseDefaultTypeInternal _RateControlResponse_default_instance_; +PROTOBUF_CONSTEXPR LockRequest::LockRequest( + ::_pbi::ConstantInitialized) + : instance_(0u){} +struct LockRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR LockRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~LockRequestDefaultTypeInternal() {} + union { + LockRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LockRequestDefaultTypeInternal _LockRequest_default_instance_; +PROTOBUF_CONSTEXPR LockResponse::LockResponse( + ::_pbi::ConstantInitialized) + : winch_result_(nullptr){} +struct LockResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR LockResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~LockResponseDefaultTypeInternal() {} + union { + LockResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LockResponseDefaultTypeInternal _LockResponse_default_instance_; +PROTOBUF_CONSTEXPR DeliverRequest::DeliverRequest( + ::_pbi::ConstantInitialized) + : instance_(0u){} +struct DeliverRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR DeliverRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~DeliverRequestDefaultTypeInternal() {} + union { + DeliverRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeliverRequestDefaultTypeInternal _DeliverRequest_default_instance_; +PROTOBUF_CONSTEXPR DeliverResponse::DeliverResponse( + ::_pbi::ConstantInitialized) + : winch_result_(nullptr){} +struct DeliverResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR DeliverResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~DeliverResponseDefaultTypeInternal() {} + union { + DeliverResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeliverResponseDefaultTypeInternal _DeliverResponse_default_instance_; +PROTOBUF_CONSTEXPR HoldRequest::HoldRequest( + ::_pbi::ConstantInitialized) + : instance_(0u){} +struct HoldRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR HoldRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~HoldRequestDefaultTypeInternal() {} + union { + HoldRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HoldRequestDefaultTypeInternal _HoldRequest_default_instance_; +PROTOBUF_CONSTEXPR HoldResponse::HoldResponse( + ::_pbi::ConstantInitialized) + : winch_result_(nullptr){} +struct HoldResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR HoldResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~HoldResponseDefaultTypeInternal() {} + union { + HoldResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HoldResponseDefaultTypeInternal _HoldResponse_default_instance_; +PROTOBUF_CONSTEXPR RetractRequest::RetractRequest( + ::_pbi::ConstantInitialized) + : instance_(0u){} +struct RetractRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR RetractRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~RetractRequestDefaultTypeInternal() {} + union { + RetractRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RetractRequestDefaultTypeInternal _RetractRequest_default_instance_; +PROTOBUF_CONSTEXPR RetractResponse::RetractResponse( + ::_pbi::ConstantInitialized) + : winch_result_(nullptr){} +struct RetractResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR RetractResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~RetractResponseDefaultTypeInternal() {} + union { + RetractResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RetractResponseDefaultTypeInternal _RetractResponse_default_instance_; +PROTOBUF_CONSTEXPR LoadLineRequest::LoadLineRequest( + ::_pbi::ConstantInitialized) + : instance_(0u){} +struct LoadLineRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR LoadLineRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~LoadLineRequestDefaultTypeInternal() {} + union { + LoadLineRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LoadLineRequestDefaultTypeInternal _LoadLineRequest_default_instance_; +PROTOBUF_CONSTEXPR LoadLineResponse::LoadLineResponse( + ::_pbi::ConstantInitialized) + : winch_result_(nullptr){} +struct LoadLineResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR LoadLineResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~LoadLineResponseDefaultTypeInternal() {} + union { + LoadLineResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LoadLineResponseDefaultTypeInternal _LoadLineResponse_default_instance_; +PROTOBUF_CONSTEXPR AbandonLineRequest::AbandonLineRequest( + ::_pbi::ConstantInitialized) + : instance_(0u){} +struct AbandonLineRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR AbandonLineRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~AbandonLineRequestDefaultTypeInternal() {} + union { + AbandonLineRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AbandonLineRequestDefaultTypeInternal _AbandonLineRequest_default_instance_; +PROTOBUF_CONSTEXPR AbandonLineResponse::AbandonLineResponse( + ::_pbi::ConstantInitialized) + : winch_result_(nullptr){} +struct AbandonLineResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR AbandonLineResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~AbandonLineResponseDefaultTypeInternal() {} + union { + AbandonLineResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AbandonLineResponseDefaultTypeInternal _AbandonLineResponse_default_instance_; +PROTOBUF_CONSTEXPR LoadPayloadRequest::LoadPayloadRequest( + ::_pbi::ConstantInitialized) + : instance_(0u){} +struct LoadPayloadRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR LoadPayloadRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~LoadPayloadRequestDefaultTypeInternal() {} + union { + LoadPayloadRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LoadPayloadRequestDefaultTypeInternal _LoadPayloadRequest_default_instance_; +PROTOBUF_CONSTEXPR LoadPayloadResponse::LoadPayloadResponse( + ::_pbi::ConstantInitialized) + : winch_result_(nullptr){} +struct LoadPayloadResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR LoadPayloadResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~LoadPayloadResponseDefaultTypeInternal() {} + union { + LoadPayloadResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LoadPayloadResponseDefaultTypeInternal _LoadPayloadResponse_default_instance_; +PROTOBUF_CONSTEXPR WinchResult::WinchResult( + ::_pbi::ConstantInitialized) + : result_str_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) + , result_(0) +{} +struct WinchResultDefaultTypeInternal { + PROTOBUF_CONSTEXPR WinchResultDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~WinchResultDefaultTypeInternal() {} + union { + WinchResult _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WinchResultDefaultTypeInternal _WinchResult_default_instance_; +} // namespace winch +} // namespace rpc +} // namespace mavsdk +static ::_pb::Metadata file_level_metadata_winch_2fwinch_2eproto[25]; +static const ::_pb::EnumDescriptor* file_level_enum_descriptors_winch_2fwinch_2eproto[2]; +static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_winch_2fwinch_2eproto = nullptr; + +const uint32_t TableStruct_winch_2fwinch_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::SubscribeStatusRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::StatusResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::StatusResponse, status_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::StatusFlags, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::StatusFlags, healthy_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::StatusFlags, fully_retracted_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::StatusFlags, moving_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::StatusFlags, clutch_engaged_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::StatusFlags, locked_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::StatusFlags, dropping_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::StatusFlags, arresting_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::StatusFlags, ground_sense_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::StatusFlags, retracting_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::StatusFlags, redeliver_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::StatusFlags, abandon_line_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::StatusFlags, locking_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::StatusFlags, load_line_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::StatusFlags, load_payload_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::Status, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::Status, time_usec_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::Status, line_length_m_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::Status, speed_m_s_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::Status, tension_kg_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::Status, voltage_v_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::Status, current_a_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::Status, temperature_c_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::Status, status_flags_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::RelaxRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::RelaxRequest, instance_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::RelaxResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::RelaxResponse, winch_result_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::RelativeLengthControlRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::RelativeLengthControlRequest, instance_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::RelativeLengthControlRequest, length_m_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::RelativeLengthControlRequest, rate_m_s_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::RelativeLengthControlResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::RelativeLengthControlResponse, winch_result_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::RateControlRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::RateControlRequest, instance_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::RateControlRequest, rate_m_s_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::RateControlResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::RateControlResponse, winch_result_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::LockRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::LockRequest, instance_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::LockResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::LockResponse, winch_result_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::DeliverRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::DeliverRequest, instance_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::DeliverResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::DeliverResponse, winch_result_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::HoldRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::HoldRequest, instance_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::HoldResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::HoldResponse, winch_result_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::RetractRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::RetractRequest, instance_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::RetractResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::RetractResponse, winch_result_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::LoadLineRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::LoadLineRequest, instance_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::LoadLineResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::LoadLineResponse, winch_result_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::AbandonLineRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::AbandonLineRequest, instance_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::AbandonLineResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::AbandonLineResponse, winch_result_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::LoadPayloadRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::LoadPayloadRequest, instance_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::LoadPayloadResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::LoadPayloadResponse, winch_result_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::WinchResult, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::WinchResult, result_), + PROTOBUF_FIELD_OFFSET(::mavsdk::rpc::winch::WinchResult, result_str_), +}; +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, -1, sizeof(::mavsdk::rpc::winch::SubscribeStatusRequest)}, + { 6, -1, -1, sizeof(::mavsdk::rpc::winch::StatusResponse)}, + { 13, -1, -1, sizeof(::mavsdk::rpc::winch::StatusFlags)}, + { 33, -1, -1, sizeof(::mavsdk::rpc::winch::Status)}, + { 47, -1, -1, sizeof(::mavsdk::rpc::winch::RelaxRequest)}, + { 54, -1, -1, sizeof(::mavsdk::rpc::winch::RelaxResponse)}, + { 61, -1, -1, sizeof(::mavsdk::rpc::winch::RelativeLengthControlRequest)}, + { 70, -1, -1, sizeof(::mavsdk::rpc::winch::RelativeLengthControlResponse)}, + { 77, -1, -1, sizeof(::mavsdk::rpc::winch::RateControlRequest)}, + { 85, -1, -1, sizeof(::mavsdk::rpc::winch::RateControlResponse)}, + { 92, -1, -1, sizeof(::mavsdk::rpc::winch::LockRequest)}, + { 99, -1, -1, sizeof(::mavsdk::rpc::winch::LockResponse)}, + { 106, -1, -1, sizeof(::mavsdk::rpc::winch::DeliverRequest)}, + { 113, -1, -1, sizeof(::mavsdk::rpc::winch::DeliverResponse)}, + { 120, -1, -1, sizeof(::mavsdk::rpc::winch::HoldRequest)}, + { 127, -1, -1, sizeof(::mavsdk::rpc::winch::HoldResponse)}, + { 134, -1, -1, sizeof(::mavsdk::rpc::winch::RetractRequest)}, + { 141, -1, -1, sizeof(::mavsdk::rpc::winch::RetractResponse)}, + { 148, -1, -1, sizeof(::mavsdk::rpc::winch::LoadLineRequest)}, + { 155, -1, -1, sizeof(::mavsdk::rpc::winch::LoadLineResponse)}, + { 162, -1, -1, sizeof(::mavsdk::rpc::winch::AbandonLineRequest)}, + { 169, -1, -1, sizeof(::mavsdk::rpc::winch::AbandonLineResponse)}, + { 176, -1, -1, sizeof(::mavsdk::rpc::winch::LoadPayloadRequest)}, + { 183, -1, -1, sizeof(::mavsdk::rpc::winch::LoadPayloadResponse)}, + { 190, -1, -1, sizeof(::mavsdk::rpc::winch::WinchResult)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::mavsdk::rpc::winch::_SubscribeStatusRequest_default_instance_._instance, + &::mavsdk::rpc::winch::_StatusResponse_default_instance_._instance, + &::mavsdk::rpc::winch::_StatusFlags_default_instance_._instance, + &::mavsdk::rpc::winch::_Status_default_instance_._instance, + &::mavsdk::rpc::winch::_RelaxRequest_default_instance_._instance, + &::mavsdk::rpc::winch::_RelaxResponse_default_instance_._instance, + &::mavsdk::rpc::winch::_RelativeLengthControlRequest_default_instance_._instance, + &::mavsdk::rpc::winch::_RelativeLengthControlResponse_default_instance_._instance, + &::mavsdk::rpc::winch::_RateControlRequest_default_instance_._instance, + &::mavsdk::rpc::winch::_RateControlResponse_default_instance_._instance, + &::mavsdk::rpc::winch::_LockRequest_default_instance_._instance, + &::mavsdk::rpc::winch::_LockResponse_default_instance_._instance, + &::mavsdk::rpc::winch::_DeliverRequest_default_instance_._instance, + &::mavsdk::rpc::winch::_DeliverResponse_default_instance_._instance, + &::mavsdk::rpc::winch::_HoldRequest_default_instance_._instance, + &::mavsdk::rpc::winch::_HoldResponse_default_instance_._instance, + &::mavsdk::rpc::winch::_RetractRequest_default_instance_._instance, + &::mavsdk::rpc::winch::_RetractResponse_default_instance_._instance, + &::mavsdk::rpc::winch::_LoadLineRequest_default_instance_._instance, + &::mavsdk::rpc::winch::_LoadLineResponse_default_instance_._instance, + &::mavsdk::rpc::winch::_AbandonLineRequest_default_instance_._instance, + &::mavsdk::rpc::winch::_AbandonLineResponse_default_instance_._instance, + &::mavsdk::rpc::winch::_LoadPayloadRequest_default_instance_._instance, + &::mavsdk::rpc::winch::_LoadPayloadResponse_default_instance_._instance, + &::mavsdk::rpc::winch::_WinchResult_default_instance_._instance, +}; + +const char descriptor_table_protodef_winch_2fwinch_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\021winch/winch.proto\022\020mavsdk.rpc.winch\032\024m" + "avsdk_options.proto\"\030\n\026SubscribeStatusRe" + "quest\":\n\016StatusResponse\022(\n\006status\030\001 \001(\0132" + "\030.mavsdk.rpc.winch.Status\"\241\002\n\013StatusFlag" + "s\022\017\n\007healthy\030\001 \001(\010\022\027\n\017fully_retracted\030\002 " + "\001(\010\022\016\n\006moving\030\003 \001(\010\022\026\n\016clutch_engaged\030\004 " + "\001(\010\022\016\n\006locked\030\005 \001(\010\022\020\n\010dropping\030\006 \001(\010\022\021\n" + "\tarresting\030\007 \001(\010\022\024\n\014ground_sense\030\010 \001(\010\022\022" + "\n\nretracting\030\t \001(\010\022\021\n\tredeliver\030\n \001(\010\022\024\n" + "\014abandon_line\030\013 \001(\010\022\017\n\007locking\030\014 \001(\010\022\021\n\t" + "load_line\030\r \001(\010\022\024\n\014load_payload\030\016 \001(\010\"\313\001" + "\n\006Status\022\021\n\ttime_usec\030\001 \001(\004\022\025\n\rline_leng" + "th_m\030\002 \001(\002\022\021\n\tspeed_m_s\030\003 \001(\002\022\022\n\ntension" + "_kg\030\004 \001(\002\022\021\n\tvoltage_v\030\005 \001(\002\022\021\n\tcurrent_" + "a\030\006 \001(\002\022\025\n\rtemperature_c\030\007 \001(\005\0223\n\014status" + "_flags\030\010 \001(\0132\035.mavsdk.rpc.winch.StatusFl" + "ags\" \n\014RelaxRequest\022\020\n\010instance\030\001 \001(\r\"D\n" + "\rRelaxResponse\0223\n\014winch_result\030\001 \001(\0132\035.m" + "avsdk.rpc.winch.WinchResult\"]\n\034RelativeL" + "engthControlRequest\022\020\n\010instance\030\001 \001(\r\022\020\n" + "\010length_m\030\002 \001(\002\022\031\n\010rate_m_s\030\003 \001(\002B\007\202\265\030\003N" + "aN\"T\n\035RelativeLengthControlResponse\0223\n\014w" + "inch_result\030\001 \001(\0132\035.mavsdk.rpc.winch.Win" + "chResult\"8\n\022RateControlRequest\022\020\n\010instan" + "ce\030\001 \001(\r\022\020\n\010rate_m_s\030\002 \001(\002\"J\n\023RateContro" + "lResponse\0223\n\014winch_result\030\001 \001(\0132\035.mavsdk" + ".rpc.winch.WinchResult\"\037\n\013LockRequest\022\020\n" + "\010instance\030\001 \001(\r\"C\n\014LockResponse\0223\n\014winch" + "_result\030\001 \001(\0132\035.mavsdk.rpc.winch.WinchRe" + "sult\"\"\n\016DeliverRequest\022\020\n\010instance\030\001 \001(\r" + "\"F\n\017DeliverResponse\0223\n\014winch_result\030\001 \001(" + "\0132\035.mavsdk.rpc.winch.WinchResult\"\037\n\013Hold" + "Request\022\020\n\010instance\030\001 \001(\r\"C\n\014HoldRespons" + "e\0223\n\014winch_result\030\001 \001(\0132\035.mavsdk.rpc.win" + "ch.WinchResult\"\"\n\016RetractRequest\022\020\n\010inst" + "ance\030\001 \001(\r\"F\n\017RetractResponse\0223\n\014winch_r" + "esult\030\001 \001(\0132\035.mavsdk.rpc.winch.WinchResu" + "lt\"#\n\017LoadLineRequest\022\020\n\010instance\030\001 \001(\r\"" + "G\n\020LoadLineResponse\0223\n\014winch_result\030\001 \001(" + "\0132\035.mavsdk.rpc.winch.WinchResult\"&\n\022Aban" + "donLineRequest\022\020\n\010instance\030\001 \001(\r\"J\n\023Aban" + "donLineResponse\0223\n\014winch_result\030\001 \001(\0132\035." + "mavsdk.rpc.winch.WinchResult\"&\n\022LoadPayl" + "oadRequest\022\020\n\010instance\030\001 \001(\r\"J\n\023LoadPayl" + "oadResponse\0223\n\014winch_result\030\001 \001(\0132\035.mavs" + "dk.rpc.winch.WinchResult\"\360\001\n\013WinchResult" + "\0224\n\006result\030\001 \001(\0162$.mavsdk.rpc.winch.Winc" + "hResult.Result\022\022\n\nresult_str\030\002 \001(\t\"\226\001\n\006R" + "esult\022\022\n\016RESULT_UNKNOWN\020\000\022\022\n\016RESULT_SUCC" + "ESS\020\001\022\024\n\020RESULT_NO_SYSTEM\020\002\022\017\n\013RESULT_BU" + "SY\020\003\022\022\n\016RESULT_TIMEOUT\020\004\022\026\n\022RESULT_UNSUP" + "PORTED\020\005\022\021\n\rRESULT_FAILED\020\006*\254\002\n\013WinchAct" + "ion\022\030\n\024WINCH_ACTION_RELAXED\020\000\022(\n$WINCH_A" + "CTION_RELATIVE_LENGTH_CONTROL\020\001\022\035\n\031WINCH" + "_ACTION_RATE_CONTROL\020\002\022\025\n\021WINCH_ACTION_L" + "OCK\020\003\022\030\n\024WINCH_ACTION_DELIVER\020\004\022\025\n\021WINCH" + "_ACTION_HOLD\020\005\022\030\n\024WINCH_ACTION_RETRACT\020\006" + "\022\032\n\026WINCH_ACTION_LOAD_LINE\020\007\022\035\n\031WINCH_AC" + "TION_ABANDON_LINE\020\010\022\035\n\031WINCH_ACTION_LOAD" + "_PAYLOAD\020\t2\336\007\n\014WinchService\022a\n\017Subscribe" + "Status\022(.mavsdk.rpc.winch.SubscribeStatu" + "sRequest\032 .mavsdk.rpc.winch.StatusRespon" + "se\"\0000\001\022J\n\005Relax\022\036.mavsdk.rpc.winch.Relax" + "Request\032\037.mavsdk.rpc.winch.RelaxResponse" + "\"\000\022z\n\025RelativeLengthControl\022..mavsdk.rpc" + ".winch.RelativeLengthControlRequest\032/.ma" + "vsdk.rpc.winch.RelativeLengthControlResp" + "onse\"\000\022\\\n\013RateControl\022$.mavsdk.rpc.winch" + ".RateControlRequest\032%.mavsdk.rpc.winch.R" + "ateControlResponse\"\000\022G\n\004Lock\022\035.mavsdk.rp" + "c.winch.LockRequest\032\036.mavsdk.rpc.winch.L" + "ockResponse\"\000\022P\n\007Deliver\022 .mavsdk.rpc.wi" + "nch.DeliverRequest\032!.mavsdk.rpc.winch.De" + "liverResponse\"\000\022G\n\004Hold\022\035.mavsdk.rpc.win" + "ch.HoldRequest\032\036.mavsdk.rpc.winch.HoldRe" + "sponse\"\000\022P\n\007Retract\022 .mavsdk.rpc.winch.R" + "etractRequest\032!.mavsdk.rpc.winch.Retract" + "Response\"\000\022S\n\010LoadLine\022!.mavsdk.rpc.winc" + "h.LoadLineRequest\032\".mavsdk.rpc.winch.Loa" + "dLineResponse\"\000\022\\\n\013AbandonLine\022$.mavsdk." + "rpc.winch.AbandonLineRequest\032%.mavsdk.rp" + "c.winch.AbandonLineResponse\"\000\022\\\n\013LoadPay" + "load\022$.mavsdk.rpc.winch.LoadPayloadReque" + "st\032%.mavsdk.rpc.winch.LoadPayloadRespons" + "e\"\000B\035\n\017io.mavsdk.winchB\nWinchProtob\006prot" + "o3" + ; +static const ::_pbi::DescriptorTable* const descriptor_table_winch_2fwinch_2eproto_deps[1] = { + &::descriptor_table_mavsdk_5foptions_2eproto, +}; +static ::_pbi::once_flag descriptor_table_winch_2fwinch_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_winch_2fwinch_2eproto = { + false, false, 3402, descriptor_table_protodef_winch_2fwinch_2eproto, + "winch/winch.proto", + &descriptor_table_winch_2fwinch_2eproto_once, descriptor_table_winch_2fwinch_2eproto_deps, 1, 25, + schemas, file_default_instances, TableStruct_winch_2fwinch_2eproto::offsets, + file_level_metadata_winch_2fwinch_2eproto, file_level_enum_descriptors_winch_2fwinch_2eproto, + file_level_service_descriptors_winch_2fwinch_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_winch_2fwinch_2eproto_getter() { + return &descriptor_table_winch_2fwinch_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_winch_2fwinch_2eproto(&descriptor_table_winch_2fwinch_2eproto); +namespace mavsdk { +namespace rpc { +namespace winch { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* WinchResult_Result_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_winch_2fwinch_2eproto); + return file_level_enum_descriptors_winch_2fwinch_2eproto[0]; +} +bool WinchResult_Result_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr WinchResult_Result WinchResult::RESULT_UNKNOWN; +constexpr WinchResult_Result WinchResult::RESULT_SUCCESS; +constexpr WinchResult_Result WinchResult::RESULT_NO_SYSTEM; +constexpr WinchResult_Result WinchResult::RESULT_BUSY; +constexpr WinchResult_Result WinchResult::RESULT_TIMEOUT; +constexpr WinchResult_Result WinchResult::RESULT_UNSUPPORTED; +constexpr WinchResult_Result WinchResult::RESULT_FAILED; +constexpr WinchResult_Result WinchResult::Result_MIN; +constexpr WinchResult_Result WinchResult::Result_MAX; +constexpr int WinchResult::Result_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* WinchAction_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_winch_2fwinch_2eproto); + return file_level_enum_descriptors_winch_2fwinch_2eproto[1]; +} +bool WinchAction_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + return true; + default: + return false; + } +} + + +// =================================================================== + +class SubscribeStatusRequest::_Internal { + public: +}; + +SubscribeStatusRequest::SubscribeStatusRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase(arena, is_message_owned) { + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.SubscribeStatusRequest) +} +SubscribeStatusRequest::SubscribeStatusRequest(const SubscribeStatusRequest& from) + : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.SubscribeStatusRequest) +} + + + + + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SubscribeStatusRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl, + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl, +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SubscribeStatusRequest::GetClassData() const { return &_class_data_; } + + + + + + + +::PROTOBUF_NAMESPACE_ID::Metadata SubscribeStatusRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[0]); +} + +// =================================================================== + +class StatusResponse::_Internal { + public: + static const ::mavsdk::rpc::winch::Status& status(const StatusResponse* msg); +}; + +const ::mavsdk::rpc::winch::Status& +StatusResponse::_Internal::status(const StatusResponse* msg) { + return *msg->status_; +} +StatusResponse::StatusResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.StatusResponse) +} +StatusResponse::StatusResponse(const StatusResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_status()) { + status_ = new ::mavsdk::rpc::winch::Status(*from.status_); + } else { + status_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.StatusResponse) +} + +inline void StatusResponse::SharedCtor() { +status_ = nullptr; +} + +StatusResponse::~StatusResponse() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.StatusResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void StatusResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete status_; +} + +void StatusResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void StatusResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.StatusResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && status_ != nullptr) { + delete status_; + } + status_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* StatusResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .mavsdk.rpc.winch.Status status = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_status(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* StatusResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.StatusResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .mavsdk.rpc.winch.Status status = 1; + if (this->_internal_has_status()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::status(this), + _Internal::status(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.StatusResponse) + return target; +} + +size_t StatusResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.StatusResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .mavsdk.rpc.winch.Status status = 1; + if (this->_internal_has_status()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *status_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData StatusResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + StatusResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*StatusResponse::GetClassData() const { return &_class_data_; } + +void StatusResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void StatusResponse::MergeFrom(const StatusResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.StatusResponse) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_status()) { + _internal_mutable_status()->::mavsdk::rpc::winch::Status::MergeFrom(from._internal_status()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void StatusResponse::CopyFrom(const StatusResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.StatusResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool StatusResponse::IsInitialized() const { + return true; +} + +void StatusResponse::InternalSwap(StatusResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(status_, other->status_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata StatusResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[1]); +} + +// =================================================================== + +class StatusFlags::_Internal { + public: +}; + +StatusFlags::StatusFlags(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.StatusFlags) +} +StatusFlags::StatusFlags(const StatusFlags& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&healthy_, &from.healthy_, + static_cast(reinterpret_cast(&load_payload_) - + reinterpret_cast(&healthy_)) + sizeof(load_payload_)); + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.StatusFlags) +} + +inline void StatusFlags::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&healthy_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&load_payload_) - + reinterpret_cast(&healthy_)) + sizeof(load_payload_)); +} + +StatusFlags::~StatusFlags() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.StatusFlags) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void StatusFlags::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void StatusFlags::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void StatusFlags::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.StatusFlags) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&healthy_, 0, static_cast( + reinterpret_cast(&load_payload_) - + reinterpret_cast(&healthy_)) + sizeof(load_payload_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* StatusFlags::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // bool healthy = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + healthy_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool fully_retracted = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + fully_retracted_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool moving = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + moving_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool clutch_engaged = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + clutch_engaged_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool locked = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { + locked_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool dropping = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { + dropping_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool arresting = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { + arresting_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool ground_sense = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { + ground_sense_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool retracting = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 72)) { + retracting_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool redeliver = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 80)) { + redeliver_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool abandon_line = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 88)) { + abandon_line_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool locking = 12; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 96)) { + locking_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool load_line = 13; + case 13: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 104)) { + load_line_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bool load_payload = 14; + case 14: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 112)) { + load_payload_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* StatusFlags::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.StatusFlags) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // bool healthy = 1; + if (this->_internal_healthy() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_healthy(), target); + } + + // bool fully_retracted = 2; + if (this->_internal_fully_retracted() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_fully_retracted(), target); + } + + // bool moving = 3; + if (this->_internal_moving() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_moving(), target); + } + + // bool clutch_engaged = 4; + if (this->_internal_clutch_engaged() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_clutch_engaged(), target); + } + + // bool locked = 5; + if (this->_internal_locked() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_locked(), target); + } + + // bool dropping = 6; + if (this->_internal_dropping() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_dropping(), target); + } + + // bool arresting = 7; + if (this->_internal_arresting() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_arresting(), target); + } + + // bool ground_sense = 8; + if (this->_internal_ground_sense() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(8, this->_internal_ground_sense(), target); + } + + // bool retracting = 9; + if (this->_internal_retracting() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(9, this->_internal_retracting(), target); + } + + // bool redeliver = 10; + if (this->_internal_redeliver() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(10, this->_internal_redeliver(), target); + } + + // bool abandon_line = 11; + if (this->_internal_abandon_line() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(11, this->_internal_abandon_line(), target); + } + + // bool locking = 12; + if (this->_internal_locking() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(12, this->_internal_locking(), target); + } + + // bool load_line = 13; + if (this->_internal_load_line() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(13, this->_internal_load_line(), target); + } + + // bool load_payload = 14; + if (this->_internal_load_payload() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(14, this->_internal_load_payload(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.StatusFlags) + return target; +} + +size_t StatusFlags::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.StatusFlags) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bool healthy = 1; + if (this->_internal_healthy() != 0) { + total_size += 1 + 1; + } + + // bool fully_retracted = 2; + if (this->_internal_fully_retracted() != 0) { + total_size += 1 + 1; + } + + // bool moving = 3; + if (this->_internal_moving() != 0) { + total_size += 1 + 1; + } + + // bool clutch_engaged = 4; + if (this->_internal_clutch_engaged() != 0) { + total_size += 1 + 1; + } + + // bool locked = 5; + if (this->_internal_locked() != 0) { + total_size += 1 + 1; + } + + // bool dropping = 6; + if (this->_internal_dropping() != 0) { + total_size += 1 + 1; + } + + // bool arresting = 7; + if (this->_internal_arresting() != 0) { + total_size += 1 + 1; + } + + // bool ground_sense = 8; + if (this->_internal_ground_sense() != 0) { + total_size += 1 + 1; + } + + // bool retracting = 9; + if (this->_internal_retracting() != 0) { + total_size += 1 + 1; + } + + // bool redeliver = 10; + if (this->_internal_redeliver() != 0) { + total_size += 1 + 1; + } + + // bool abandon_line = 11; + if (this->_internal_abandon_line() != 0) { + total_size += 1 + 1; + } + + // bool locking = 12; + if (this->_internal_locking() != 0) { + total_size += 1 + 1; + } + + // bool load_line = 13; + if (this->_internal_load_line() != 0) { + total_size += 1 + 1; + } + + // bool load_payload = 14; + if (this->_internal_load_payload() != 0) { + total_size += 1 + 1; + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData StatusFlags::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + StatusFlags::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*StatusFlags::GetClassData() const { return &_class_data_; } + +void StatusFlags::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void StatusFlags::MergeFrom(const StatusFlags& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.StatusFlags) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_healthy() != 0) { + _internal_set_healthy(from._internal_healthy()); + } + if (from._internal_fully_retracted() != 0) { + _internal_set_fully_retracted(from._internal_fully_retracted()); + } + if (from._internal_moving() != 0) { + _internal_set_moving(from._internal_moving()); + } + if (from._internal_clutch_engaged() != 0) { + _internal_set_clutch_engaged(from._internal_clutch_engaged()); + } + if (from._internal_locked() != 0) { + _internal_set_locked(from._internal_locked()); + } + if (from._internal_dropping() != 0) { + _internal_set_dropping(from._internal_dropping()); + } + if (from._internal_arresting() != 0) { + _internal_set_arresting(from._internal_arresting()); + } + if (from._internal_ground_sense() != 0) { + _internal_set_ground_sense(from._internal_ground_sense()); + } + if (from._internal_retracting() != 0) { + _internal_set_retracting(from._internal_retracting()); + } + if (from._internal_redeliver() != 0) { + _internal_set_redeliver(from._internal_redeliver()); + } + if (from._internal_abandon_line() != 0) { + _internal_set_abandon_line(from._internal_abandon_line()); + } + if (from._internal_locking() != 0) { + _internal_set_locking(from._internal_locking()); + } + if (from._internal_load_line() != 0) { + _internal_set_load_line(from._internal_load_line()); + } + if (from._internal_load_payload() != 0) { + _internal_set_load_payload(from._internal_load_payload()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void StatusFlags::CopyFrom(const StatusFlags& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.StatusFlags) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool StatusFlags::IsInitialized() const { + return true; +} + +void StatusFlags::InternalSwap(StatusFlags* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(StatusFlags, load_payload_) + + sizeof(StatusFlags::load_payload_) + - PROTOBUF_FIELD_OFFSET(StatusFlags, healthy_)>( + reinterpret_cast(&healthy_), + reinterpret_cast(&other->healthy_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata StatusFlags::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[2]); +} + +// =================================================================== + +class Status::_Internal { + public: + static const ::mavsdk::rpc::winch::StatusFlags& status_flags(const Status* msg); +}; + +const ::mavsdk::rpc::winch::StatusFlags& +Status::_Internal::status_flags(const Status* msg) { + return *msg->status_flags_; +} +Status::Status(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.Status) +} +Status::Status(const Status& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_status_flags()) { + status_flags_ = new ::mavsdk::rpc::winch::StatusFlags(*from.status_flags_); + } else { + status_flags_ = nullptr; + } + ::memcpy(&time_usec_, &from.time_usec_, + static_cast(reinterpret_cast(&temperature_c_) - + reinterpret_cast(&time_usec_)) + sizeof(temperature_c_)); + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.Status) +} + +inline void Status::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&status_flags_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&temperature_c_) - + reinterpret_cast(&status_flags_)) + sizeof(temperature_c_)); +} + +Status::~Status() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.Status) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Status::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete status_flags_; +} + +void Status::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void Status::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.Status) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && status_flags_ != nullptr) { + delete status_flags_; + } + status_flags_ = nullptr; + ::memset(&time_usec_, 0, static_cast( + reinterpret_cast(&temperature_c_) - + reinterpret_cast(&time_usec_)) + sizeof(temperature_c_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Status::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // uint64 time_usec = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + time_usec_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // float line_length_m = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 21)) { + line_length_m_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else + goto handle_unusual; + continue; + // float speed_m_s = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 29)) { + speed_m_s_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else + goto handle_unusual; + continue; + // float tension_kg = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 37)) { + tension_kg_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else + goto handle_unusual; + continue; + // float voltage_v = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 45)) { + voltage_v_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else + goto handle_unusual; + continue; + // float current_a = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 53)) { + current_a_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else + goto handle_unusual; + continue; + // int32 temperature_c = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { + temperature_c_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .mavsdk.rpc.winch.StatusFlags status_flags = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { + ptr = ctx->ParseMessage(_internal_mutable_status_flags(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Status::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.Status) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint64 time_usec = 1; + if (this->_internal_time_usec() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_time_usec(), target); + } + + // float line_length_m = 2; + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_line_length_m = this->_internal_line_length_m(); + uint32_t raw_line_length_m; + memcpy(&raw_line_length_m, &tmp_line_length_m, sizeof(tmp_line_length_m)); + if (raw_line_length_m != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_line_length_m(), target); + } + + // float speed_m_s = 3; + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_speed_m_s = this->_internal_speed_m_s(); + uint32_t raw_speed_m_s; + memcpy(&raw_speed_m_s, &tmp_speed_m_s, sizeof(tmp_speed_m_s)); + if (raw_speed_m_s != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_speed_m_s(), target); + } + + // float tension_kg = 4; + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_tension_kg = this->_internal_tension_kg(); + uint32_t raw_tension_kg; + memcpy(&raw_tension_kg, &tmp_tension_kg, sizeof(tmp_tension_kg)); + if (raw_tension_kg != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFloatToArray(4, this->_internal_tension_kg(), target); + } + + // float voltage_v = 5; + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_voltage_v = this->_internal_voltage_v(); + uint32_t raw_voltage_v; + memcpy(&raw_voltage_v, &tmp_voltage_v, sizeof(tmp_voltage_v)); + if (raw_voltage_v != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFloatToArray(5, this->_internal_voltage_v(), target); + } + + // float current_a = 6; + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_current_a = this->_internal_current_a(); + uint32_t raw_current_a; + memcpy(&raw_current_a, &tmp_current_a, sizeof(tmp_current_a)); + if (raw_current_a != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFloatToArray(6, this->_internal_current_a(), target); + } + + // int32 temperature_c = 7; + if (this->_internal_temperature_c() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_temperature_c(), target); + } + + // .mavsdk.rpc.winch.StatusFlags status_flags = 8; + if (this->_internal_has_status_flags()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(8, _Internal::status_flags(this), + _Internal::status_flags(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.Status) + return target; +} + +size_t Status::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.Status) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .mavsdk.rpc.winch.StatusFlags status_flags = 8; + if (this->_internal_has_status_flags()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *status_flags_); + } + + // uint64 time_usec = 1; + if (this->_internal_time_usec() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_time_usec()); + } + + // float line_length_m = 2; + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_line_length_m = this->_internal_line_length_m(); + uint32_t raw_line_length_m; + memcpy(&raw_line_length_m, &tmp_line_length_m, sizeof(tmp_line_length_m)); + if (raw_line_length_m != 0) { + total_size += 1 + 4; + } + + // float speed_m_s = 3; + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_speed_m_s = this->_internal_speed_m_s(); + uint32_t raw_speed_m_s; + memcpy(&raw_speed_m_s, &tmp_speed_m_s, sizeof(tmp_speed_m_s)); + if (raw_speed_m_s != 0) { + total_size += 1 + 4; + } + + // float tension_kg = 4; + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_tension_kg = this->_internal_tension_kg(); + uint32_t raw_tension_kg; + memcpy(&raw_tension_kg, &tmp_tension_kg, sizeof(tmp_tension_kg)); + if (raw_tension_kg != 0) { + total_size += 1 + 4; + } + + // float voltage_v = 5; + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_voltage_v = this->_internal_voltage_v(); + uint32_t raw_voltage_v; + memcpy(&raw_voltage_v, &tmp_voltage_v, sizeof(tmp_voltage_v)); + if (raw_voltage_v != 0) { + total_size += 1 + 4; + } + + // float current_a = 6; + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_current_a = this->_internal_current_a(); + uint32_t raw_current_a; + memcpy(&raw_current_a, &tmp_current_a, sizeof(tmp_current_a)); + if (raw_current_a != 0) { + total_size += 1 + 4; + } + + // int32 temperature_c = 7; + if (this->_internal_temperature_c() != 0) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_temperature_c()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Status::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + Status::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Status::GetClassData() const { return &_class_data_; } + +void Status::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void Status::MergeFrom(const Status& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.Status) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_status_flags()) { + _internal_mutable_status_flags()->::mavsdk::rpc::winch::StatusFlags::MergeFrom(from._internal_status_flags()); + } + if (from._internal_time_usec() != 0) { + _internal_set_time_usec(from._internal_time_usec()); + } + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_line_length_m = from._internal_line_length_m(); + uint32_t raw_line_length_m; + memcpy(&raw_line_length_m, &tmp_line_length_m, sizeof(tmp_line_length_m)); + if (raw_line_length_m != 0) { + _internal_set_line_length_m(from._internal_line_length_m()); + } + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_speed_m_s = from._internal_speed_m_s(); + uint32_t raw_speed_m_s; + memcpy(&raw_speed_m_s, &tmp_speed_m_s, sizeof(tmp_speed_m_s)); + if (raw_speed_m_s != 0) { + _internal_set_speed_m_s(from._internal_speed_m_s()); + } + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_tension_kg = from._internal_tension_kg(); + uint32_t raw_tension_kg; + memcpy(&raw_tension_kg, &tmp_tension_kg, sizeof(tmp_tension_kg)); + if (raw_tension_kg != 0) { + _internal_set_tension_kg(from._internal_tension_kg()); + } + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_voltage_v = from._internal_voltage_v(); + uint32_t raw_voltage_v; + memcpy(&raw_voltage_v, &tmp_voltage_v, sizeof(tmp_voltage_v)); + if (raw_voltage_v != 0) { + _internal_set_voltage_v(from._internal_voltage_v()); + } + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_current_a = from._internal_current_a(); + uint32_t raw_current_a; + memcpy(&raw_current_a, &tmp_current_a, sizeof(tmp_current_a)); + if (raw_current_a != 0) { + _internal_set_current_a(from._internal_current_a()); + } + if (from._internal_temperature_c() != 0) { + _internal_set_temperature_c(from._internal_temperature_c()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void Status::CopyFrom(const Status& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.Status) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Status::IsInitialized() const { + return true; +} + +void Status::InternalSwap(Status* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Status, temperature_c_) + + sizeof(Status::temperature_c_) + - PROTOBUF_FIELD_OFFSET(Status, status_flags_)>( + reinterpret_cast(&status_flags_), + reinterpret_cast(&other->status_flags_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Status::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[3]); +} + +// =================================================================== + +class RelaxRequest::_Internal { + public: +}; + +RelaxRequest::RelaxRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.RelaxRequest) +} +RelaxRequest::RelaxRequest(const RelaxRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + instance_ = from.instance_; + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.RelaxRequest) +} + +inline void RelaxRequest::SharedCtor() { +instance_ = 0u; +} + +RelaxRequest::~RelaxRequest() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.RelaxRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void RelaxRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void RelaxRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void RelaxRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.RelaxRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + instance_ = 0u; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* RelaxRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // uint32 instance = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + instance_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* RelaxRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.RelaxRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_instance(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.RelaxRequest) + return target; +} + +size_t RelaxRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.RelaxRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_instance()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RelaxRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + RelaxRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RelaxRequest::GetClassData() const { return &_class_data_; } + +void RelaxRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void RelaxRequest::MergeFrom(const RelaxRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.RelaxRequest) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_instance() != 0) { + _internal_set_instance(from._internal_instance()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void RelaxRequest::CopyFrom(const RelaxRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.RelaxRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RelaxRequest::IsInitialized() const { + return true; +} + +void RelaxRequest::InternalSwap(RelaxRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(instance_, other->instance_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata RelaxRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[4]); +} + +// =================================================================== + +class RelaxResponse::_Internal { + public: + static const ::mavsdk::rpc::winch::WinchResult& winch_result(const RelaxResponse* msg); +}; + +const ::mavsdk::rpc::winch::WinchResult& +RelaxResponse::_Internal::winch_result(const RelaxResponse* msg) { + return *msg->winch_result_; +} +RelaxResponse::RelaxResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.RelaxResponse) +} +RelaxResponse::RelaxResponse(const RelaxResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_winch_result()) { + winch_result_ = new ::mavsdk::rpc::winch::WinchResult(*from.winch_result_); + } else { + winch_result_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.RelaxResponse) +} + +inline void RelaxResponse::SharedCtor() { +winch_result_ = nullptr; +} + +RelaxResponse::~RelaxResponse() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.RelaxResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void RelaxResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete winch_result_; +} + +void RelaxResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void RelaxResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.RelaxResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && winch_result_ != nullptr) { + delete winch_result_; + } + winch_result_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* RelaxResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_winch_result(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* RelaxResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.RelaxResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + if (this->_internal_has_winch_result()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::winch_result(this), + _Internal::winch_result(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.RelaxResponse) + return target; +} + +size_t RelaxResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.RelaxResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + if (this->_internal_has_winch_result()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *winch_result_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RelaxResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + RelaxResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RelaxResponse::GetClassData() const { return &_class_data_; } + +void RelaxResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void RelaxResponse::MergeFrom(const RelaxResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.RelaxResponse) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_winch_result()) { + _internal_mutable_winch_result()->::mavsdk::rpc::winch::WinchResult::MergeFrom(from._internal_winch_result()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void RelaxResponse::CopyFrom(const RelaxResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.RelaxResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RelaxResponse::IsInitialized() const { + return true; +} + +void RelaxResponse::InternalSwap(RelaxResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(winch_result_, other->winch_result_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata RelaxResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[5]); +} + +// =================================================================== + +class RelativeLengthControlRequest::_Internal { + public: +}; + +RelativeLengthControlRequest::RelativeLengthControlRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.RelativeLengthControlRequest) +} +RelativeLengthControlRequest::RelativeLengthControlRequest(const RelativeLengthControlRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&instance_, &from.instance_, + static_cast(reinterpret_cast(&rate_m_s_) - + reinterpret_cast(&instance_)) + sizeof(rate_m_s_)); + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.RelativeLengthControlRequest) +} + +inline void RelativeLengthControlRequest::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&instance_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&rate_m_s_) - + reinterpret_cast(&instance_)) + sizeof(rate_m_s_)); +} + +RelativeLengthControlRequest::~RelativeLengthControlRequest() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.RelativeLengthControlRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void RelativeLengthControlRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void RelativeLengthControlRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void RelativeLengthControlRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.RelativeLengthControlRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&instance_, 0, static_cast( + reinterpret_cast(&rate_m_s_) - + reinterpret_cast(&instance_)) + sizeof(rate_m_s_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* RelativeLengthControlRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // uint32 instance = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + instance_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // float length_m = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 21)) { + length_m_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else + goto handle_unusual; + continue; + // float rate_m_s = 3 [(.mavsdk.options.default_value) = "NaN"]; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 29)) { + rate_m_s_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* RelativeLengthControlRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.RelativeLengthControlRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_instance(), target); + } + + // float length_m = 2; + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_length_m = this->_internal_length_m(); + uint32_t raw_length_m; + memcpy(&raw_length_m, &tmp_length_m, sizeof(tmp_length_m)); + if (raw_length_m != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_length_m(), target); + } + + // float rate_m_s = 3 [(.mavsdk.options.default_value) = "NaN"]; + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_rate_m_s = this->_internal_rate_m_s(); + uint32_t raw_rate_m_s; + memcpy(&raw_rate_m_s, &tmp_rate_m_s, sizeof(tmp_rate_m_s)); + if (raw_rate_m_s != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_rate_m_s(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.RelativeLengthControlRequest) + return target; +} + +size_t RelativeLengthControlRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.RelativeLengthControlRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_instance()); + } + + // float length_m = 2; + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_length_m = this->_internal_length_m(); + uint32_t raw_length_m; + memcpy(&raw_length_m, &tmp_length_m, sizeof(tmp_length_m)); + if (raw_length_m != 0) { + total_size += 1 + 4; + } + + // float rate_m_s = 3 [(.mavsdk.options.default_value) = "NaN"]; + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_rate_m_s = this->_internal_rate_m_s(); + uint32_t raw_rate_m_s; + memcpy(&raw_rate_m_s, &tmp_rate_m_s, sizeof(tmp_rate_m_s)); + if (raw_rate_m_s != 0) { + total_size += 1 + 4; + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RelativeLengthControlRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + RelativeLengthControlRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RelativeLengthControlRequest::GetClassData() const { return &_class_data_; } + +void RelativeLengthControlRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void RelativeLengthControlRequest::MergeFrom(const RelativeLengthControlRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.RelativeLengthControlRequest) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_instance() != 0) { + _internal_set_instance(from._internal_instance()); + } + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_length_m = from._internal_length_m(); + uint32_t raw_length_m; + memcpy(&raw_length_m, &tmp_length_m, sizeof(tmp_length_m)); + if (raw_length_m != 0) { + _internal_set_length_m(from._internal_length_m()); + } + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_rate_m_s = from._internal_rate_m_s(); + uint32_t raw_rate_m_s; + memcpy(&raw_rate_m_s, &tmp_rate_m_s, sizeof(tmp_rate_m_s)); + if (raw_rate_m_s != 0) { + _internal_set_rate_m_s(from._internal_rate_m_s()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void RelativeLengthControlRequest::CopyFrom(const RelativeLengthControlRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.RelativeLengthControlRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RelativeLengthControlRequest::IsInitialized() const { + return true; +} + +void RelativeLengthControlRequest::InternalSwap(RelativeLengthControlRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(RelativeLengthControlRequest, rate_m_s_) + + sizeof(RelativeLengthControlRequest::rate_m_s_) + - PROTOBUF_FIELD_OFFSET(RelativeLengthControlRequest, instance_)>( + reinterpret_cast(&instance_), + reinterpret_cast(&other->instance_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata RelativeLengthControlRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[6]); +} + +// =================================================================== + +class RelativeLengthControlResponse::_Internal { + public: + static const ::mavsdk::rpc::winch::WinchResult& winch_result(const RelativeLengthControlResponse* msg); +}; + +const ::mavsdk::rpc::winch::WinchResult& +RelativeLengthControlResponse::_Internal::winch_result(const RelativeLengthControlResponse* msg) { + return *msg->winch_result_; +} +RelativeLengthControlResponse::RelativeLengthControlResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.RelativeLengthControlResponse) +} +RelativeLengthControlResponse::RelativeLengthControlResponse(const RelativeLengthControlResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_winch_result()) { + winch_result_ = new ::mavsdk::rpc::winch::WinchResult(*from.winch_result_); + } else { + winch_result_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.RelativeLengthControlResponse) +} + +inline void RelativeLengthControlResponse::SharedCtor() { +winch_result_ = nullptr; +} + +RelativeLengthControlResponse::~RelativeLengthControlResponse() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.RelativeLengthControlResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void RelativeLengthControlResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete winch_result_; +} + +void RelativeLengthControlResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void RelativeLengthControlResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.RelativeLengthControlResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && winch_result_ != nullptr) { + delete winch_result_; + } + winch_result_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* RelativeLengthControlResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_winch_result(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* RelativeLengthControlResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.RelativeLengthControlResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + if (this->_internal_has_winch_result()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::winch_result(this), + _Internal::winch_result(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.RelativeLengthControlResponse) + return target; +} + +size_t RelativeLengthControlResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.RelativeLengthControlResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + if (this->_internal_has_winch_result()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *winch_result_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RelativeLengthControlResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + RelativeLengthControlResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RelativeLengthControlResponse::GetClassData() const { return &_class_data_; } + +void RelativeLengthControlResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void RelativeLengthControlResponse::MergeFrom(const RelativeLengthControlResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.RelativeLengthControlResponse) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_winch_result()) { + _internal_mutable_winch_result()->::mavsdk::rpc::winch::WinchResult::MergeFrom(from._internal_winch_result()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void RelativeLengthControlResponse::CopyFrom(const RelativeLengthControlResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.RelativeLengthControlResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RelativeLengthControlResponse::IsInitialized() const { + return true; +} + +void RelativeLengthControlResponse::InternalSwap(RelativeLengthControlResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(winch_result_, other->winch_result_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata RelativeLengthControlResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[7]); +} + +// =================================================================== + +class RateControlRequest::_Internal { + public: +}; + +RateControlRequest::RateControlRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.RateControlRequest) +} +RateControlRequest::RateControlRequest(const RateControlRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&instance_, &from.instance_, + static_cast(reinterpret_cast(&rate_m_s_) - + reinterpret_cast(&instance_)) + sizeof(rate_m_s_)); + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.RateControlRequest) +} + +inline void RateControlRequest::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&instance_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&rate_m_s_) - + reinterpret_cast(&instance_)) + sizeof(rate_m_s_)); +} + +RateControlRequest::~RateControlRequest() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.RateControlRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void RateControlRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void RateControlRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void RateControlRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.RateControlRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&instance_, 0, static_cast( + reinterpret_cast(&rate_m_s_) - + reinterpret_cast(&instance_)) + sizeof(rate_m_s_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* RateControlRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // uint32 instance = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + instance_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // float rate_m_s = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 21)) { + rate_m_s_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* RateControlRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.RateControlRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_instance(), target); + } + + // float rate_m_s = 2; + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_rate_m_s = this->_internal_rate_m_s(); + uint32_t raw_rate_m_s; + memcpy(&raw_rate_m_s, &tmp_rate_m_s, sizeof(tmp_rate_m_s)); + if (raw_rate_m_s != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_rate_m_s(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.RateControlRequest) + return target; +} + +size_t RateControlRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.RateControlRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_instance()); + } + + // float rate_m_s = 2; + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_rate_m_s = this->_internal_rate_m_s(); + uint32_t raw_rate_m_s; + memcpy(&raw_rate_m_s, &tmp_rate_m_s, sizeof(tmp_rate_m_s)); + if (raw_rate_m_s != 0) { + total_size += 1 + 4; + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RateControlRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + RateControlRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RateControlRequest::GetClassData() const { return &_class_data_; } + +void RateControlRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void RateControlRequest::MergeFrom(const RateControlRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.RateControlRequest) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_instance() != 0) { + _internal_set_instance(from._internal_instance()); + } + static_assert(sizeof(uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size."); + float tmp_rate_m_s = from._internal_rate_m_s(); + uint32_t raw_rate_m_s; + memcpy(&raw_rate_m_s, &tmp_rate_m_s, sizeof(tmp_rate_m_s)); + if (raw_rate_m_s != 0) { + _internal_set_rate_m_s(from._internal_rate_m_s()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void RateControlRequest::CopyFrom(const RateControlRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.RateControlRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RateControlRequest::IsInitialized() const { + return true; +} + +void RateControlRequest::InternalSwap(RateControlRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(RateControlRequest, rate_m_s_) + + sizeof(RateControlRequest::rate_m_s_) + - PROTOBUF_FIELD_OFFSET(RateControlRequest, instance_)>( + reinterpret_cast(&instance_), + reinterpret_cast(&other->instance_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata RateControlRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[8]); +} + +// =================================================================== + +class RateControlResponse::_Internal { + public: + static const ::mavsdk::rpc::winch::WinchResult& winch_result(const RateControlResponse* msg); +}; + +const ::mavsdk::rpc::winch::WinchResult& +RateControlResponse::_Internal::winch_result(const RateControlResponse* msg) { + return *msg->winch_result_; +} +RateControlResponse::RateControlResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.RateControlResponse) +} +RateControlResponse::RateControlResponse(const RateControlResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_winch_result()) { + winch_result_ = new ::mavsdk::rpc::winch::WinchResult(*from.winch_result_); + } else { + winch_result_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.RateControlResponse) +} + +inline void RateControlResponse::SharedCtor() { +winch_result_ = nullptr; +} + +RateControlResponse::~RateControlResponse() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.RateControlResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void RateControlResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete winch_result_; +} + +void RateControlResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void RateControlResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.RateControlResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && winch_result_ != nullptr) { + delete winch_result_; + } + winch_result_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* RateControlResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_winch_result(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* RateControlResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.RateControlResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + if (this->_internal_has_winch_result()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::winch_result(this), + _Internal::winch_result(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.RateControlResponse) + return target; +} + +size_t RateControlResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.RateControlResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + if (this->_internal_has_winch_result()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *winch_result_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RateControlResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + RateControlResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RateControlResponse::GetClassData() const { return &_class_data_; } + +void RateControlResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void RateControlResponse::MergeFrom(const RateControlResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.RateControlResponse) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_winch_result()) { + _internal_mutable_winch_result()->::mavsdk::rpc::winch::WinchResult::MergeFrom(from._internal_winch_result()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void RateControlResponse::CopyFrom(const RateControlResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.RateControlResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RateControlResponse::IsInitialized() const { + return true; +} + +void RateControlResponse::InternalSwap(RateControlResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(winch_result_, other->winch_result_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata RateControlResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[9]); +} + +// =================================================================== + +class LockRequest::_Internal { + public: +}; + +LockRequest::LockRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.LockRequest) +} +LockRequest::LockRequest(const LockRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + instance_ = from.instance_; + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.LockRequest) +} + +inline void LockRequest::SharedCtor() { +instance_ = 0u; +} + +LockRequest::~LockRequest() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.LockRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void LockRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void LockRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void LockRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.LockRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + instance_ = 0u; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* LockRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // uint32 instance = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + instance_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* LockRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.LockRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_instance(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.LockRequest) + return target; +} + +size_t LockRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.LockRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_instance()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData LockRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + LockRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*LockRequest::GetClassData() const { return &_class_data_; } + +void LockRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void LockRequest::MergeFrom(const LockRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.LockRequest) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_instance() != 0) { + _internal_set_instance(from._internal_instance()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void LockRequest::CopyFrom(const LockRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.LockRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool LockRequest::IsInitialized() const { + return true; +} + +void LockRequest::InternalSwap(LockRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(instance_, other->instance_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata LockRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[10]); +} + +// =================================================================== + +class LockResponse::_Internal { + public: + static const ::mavsdk::rpc::winch::WinchResult& winch_result(const LockResponse* msg); +}; + +const ::mavsdk::rpc::winch::WinchResult& +LockResponse::_Internal::winch_result(const LockResponse* msg) { + return *msg->winch_result_; +} +LockResponse::LockResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.LockResponse) +} +LockResponse::LockResponse(const LockResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_winch_result()) { + winch_result_ = new ::mavsdk::rpc::winch::WinchResult(*from.winch_result_); + } else { + winch_result_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.LockResponse) +} + +inline void LockResponse::SharedCtor() { +winch_result_ = nullptr; +} + +LockResponse::~LockResponse() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.LockResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void LockResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete winch_result_; +} + +void LockResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void LockResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.LockResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && winch_result_ != nullptr) { + delete winch_result_; + } + winch_result_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* LockResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_winch_result(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* LockResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.LockResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + if (this->_internal_has_winch_result()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::winch_result(this), + _Internal::winch_result(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.LockResponse) + return target; +} + +size_t LockResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.LockResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + if (this->_internal_has_winch_result()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *winch_result_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData LockResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + LockResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*LockResponse::GetClassData() const { return &_class_data_; } + +void LockResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void LockResponse::MergeFrom(const LockResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.LockResponse) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_winch_result()) { + _internal_mutable_winch_result()->::mavsdk::rpc::winch::WinchResult::MergeFrom(from._internal_winch_result()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void LockResponse::CopyFrom(const LockResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.LockResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool LockResponse::IsInitialized() const { + return true; +} + +void LockResponse::InternalSwap(LockResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(winch_result_, other->winch_result_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata LockResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[11]); +} + +// =================================================================== + +class DeliverRequest::_Internal { + public: +}; + +DeliverRequest::DeliverRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.DeliverRequest) +} +DeliverRequest::DeliverRequest(const DeliverRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + instance_ = from.instance_; + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.DeliverRequest) +} + +inline void DeliverRequest::SharedCtor() { +instance_ = 0u; +} + +DeliverRequest::~DeliverRequest() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.DeliverRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void DeliverRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void DeliverRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void DeliverRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.DeliverRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + instance_ = 0u; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* DeliverRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // uint32 instance = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + instance_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* DeliverRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.DeliverRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_instance(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.DeliverRequest) + return target; +} + +size_t DeliverRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.DeliverRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_instance()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData DeliverRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + DeliverRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*DeliverRequest::GetClassData() const { return &_class_data_; } + +void DeliverRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void DeliverRequest::MergeFrom(const DeliverRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.DeliverRequest) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_instance() != 0) { + _internal_set_instance(from._internal_instance()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void DeliverRequest::CopyFrom(const DeliverRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.DeliverRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DeliverRequest::IsInitialized() const { + return true; +} + +void DeliverRequest::InternalSwap(DeliverRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(instance_, other->instance_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata DeliverRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[12]); +} + +// =================================================================== + +class DeliverResponse::_Internal { + public: + static const ::mavsdk::rpc::winch::WinchResult& winch_result(const DeliverResponse* msg); +}; + +const ::mavsdk::rpc::winch::WinchResult& +DeliverResponse::_Internal::winch_result(const DeliverResponse* msg) { + return *msg->winch_result_; +} +DeliverResponse::DeliverResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.DeliverResponse) +} +DeliverResponse::DeliverResponse(const DeliverResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_winch_result()) { + winch_result_ = new ::mavsdk::rpc::winch::WinchResult(*from.winch_result_); + } else { + winch_result_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.DeliverResponse) +} + +inline void DeliverResponse::SharedCtor() { +winch_result_ = nullptr; +} + +DeliverResponse::~DeliverResponse() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.DeliverResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void DeliverResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete winch_result_; +} + +void DeliverResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void DeliverResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.DeliverResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && winch_result_ != nullptr) { + delete winch_result_; + } + winch_result_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* DeliverResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_winch_result(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* DeliverResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.DeliverResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + if (this->_internal_has_winch_result()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::winch_result(this), + _Internal::winch_result(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.DeliverResponse) + return target; +} + +size_t DeliverResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.DeliverResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + if (this->_internal_has_winch_result()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *winch_result_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData DeliverResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + DeliverResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*DeliverResponse::GetClassData() const { return &_class_data_; } + +void DeliverResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void DeliverResponse::MergeFrom(const DeliverResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.DeliverResponse) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_winch_result()) { + _internal_mutable_winch_result()->::mavsdk::rpc::winch::WinchResult::MergeFrom(from._internal_winch_result()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void DeliverResponse::CopyFrom(const DeliverResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.DeliverResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DeliverResponse::IsInitialized() const { + return true; +} + +void DeliverResponse::InternalSwap(DeliverResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(winch_result_, other->winch_result_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata DeliverResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[13]); +} + +// =================================================================== + +class HoldRequest::_Internal { + public: +}; + +HoldRequest::HoldRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.HoldRequest) +} +HoldRequest::HoldRequest(const HoldRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + instance_ = from.instance_; + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.HoldRequest) +} + +inline void HoldRequest::SharedCtor() { +instance_ = 0u; +} + +HoldRequest::~HoldRequest() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.HoldRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void HoldRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void HoldRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void HoldRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.HoldRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + instance_ = 0u; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* HoldRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // uint32 instance = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + instance_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* HoldRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.HoldRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_instance(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.HoldRequest) + return target; +} + +size_t HoldRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.HoldRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_instance()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData HoldRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + HoldRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*HoldRequest::GetClassData() const { return &_class_data_; } + +void HoldRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void HoldRequest::MergeFrom(const HoldRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.HoldRequest) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_instance() != 0) { + _internal_set_instance(from._internal_instance()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void HoldRequest::CopyFrom(const HoldRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.HoldRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool HoldRequest::IsInitialized() const { + return true; +} + +void HoldRequest::InternalSwap(HoldRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(instance_, other->instance_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata HoldRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[14]); +} + +// =================================================================== + +class HoldResponse::_Internal { + public: + static const ::mavsdk::rpc::winch::WinchResult& winch_result(const HoldResponse* msg); +}; + +const ::mavsdk::rpc::winch::WinchResult& +HoldResponse::_Internal::winch_result(const HoldResponse* msg) { + return *msg->winch_result_; +} +HoldResponse::HoldResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.HoldResponse) +} +HoldResponse::HoldResponse(const HoldResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_winch_result()) { + winch_result_ = new ::mavsdk::rpc::winch::WinchResult(*from.winch_result_); + } else { + winch_result_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.HoldResponse) +} + +inline void HoldResponse::SharedCtor() { +winch_result_ = nullptr; +} + +HoldResponse::~HoldResponse() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.HoldResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void HoldResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete winch_result_; +} + +void HoldResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void HoldResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.HoldResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && winch_result_ != nullptr) { + delete winch_result_; + } + winch_result_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* HoldResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_winch_result(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* HoldResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.HoldResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + if (this->_internal_has_winch_result()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::winch_result(this), + _Internal::winch_result(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.HoldResponse) + return target; +} + +size_t HoldResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.HoldResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + if (this->_internal_has_winch_result()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *winch_result_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData HoldResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + HoldResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*HoldResponse::GetClassData() const { return &_class_data_; } + +void HoldResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void HoldResponse::MergeFrom(const HoldResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.HoldResponse) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_winch_result()) { + _internal_mutable_winch_result()->::mavsdk::rpc::winch::WinchResult::MergeFrom(from._internal_winch_result()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void HoldResponse::CopyFrom(const HoldResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.HoldResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool HoldResponse::IsInitialized() const { + return true; +} + +void HoldResponse::InternalSwap(HoldResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(winch_result_, other->winch_result_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata HoldResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[15]); +} + +// =================================================================== + +class RetractRequest::_Internal { + public: +}; + +RetractRequest::RetractRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.RetractRequest) +} +RetractRequest::RetractRequest(const RetractRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + instance_ = from.instance_; + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.RetractRequest) +} + +inline void RetractRequest::SharedCtor() { +instance_ = 0u; +} + +RetractRequest::~RetractRequest() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.RetractRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void RetractRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void RetractRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void RetractRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.RetractRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + instance_ = 0u; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* RetractRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // uint32 instance = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + instance_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* RetractRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.RetractRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_instance(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.RetractRequest) + return target; +} + +size_t RetractRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.RetractRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_instance()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RetractRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + RetractRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RetractRequest::GetClassData() const { return &_class_data_; } + +void RetractRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void RetractRequest::MergeFrom(const RetractRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.RetractRequest) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_instance() != 0) { + _internal_set_instance(from._internal_instance()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void RetractRequest::CopyFrom(const RetractRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.RetractRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RetractRequest::IsInitialized() const { + return true; +} + +void RetractRequest::InternalSwap(RetractRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(instance_, other->instance_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata RetractRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[16]); +} + +// =================================================================== + +class RetractResponse::_Internal { + public: + static const ::mavsdk::rpc::winch::WinchResult& winch_result(const RetractResponse* msg); +}; + +const ::mavsdk::rpc::winch::WinchResult& +RetractResponse::_Internal::winch_result(const RetractResponse* msg) { + return *msg->winch_result_; +} +RetractResponse::RetractResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.RetractResponse) +} +RetractResponse::RetractResponse(const RetractResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_winch_result()) { + winch_result_ = new ::mavsdk::rpc::winch::WinchResult(*from.winch_result_); + } else { + winch_result_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.RetractResponse) +} + +inline void RetractResponse::SharedCtor() { +winch_result_ = nullptr; +} + +RetractResponse::~RetractResponse() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.RetractResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void RetractResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete winch_result_; +} + +void RetractResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void RetractResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.RetractResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && winch_result_ != nullptr) { + delete winch_result_; + } + winch_result_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* RetractResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_winch_result(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* RetractResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.RetractResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + if (this->_internal_has_winch_result()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::winch_result(this), + _Internal::winch_result(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.RetractResponse) + return target; +} + +size_t RetractResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.RetractResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + if (this->_internal_has_winch_result()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *winch_result_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RetractResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + RetractResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RetractResponse::GetClassData() const { return &_class_data_; } + +void RetractResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void RetractResponse::MergeFrom(const RetractResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.RetractResponse) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_winch_result()) { + _internal_mutable_winch_result()->::mavsdk::rpc::winch::WinchResult::MergeFrom(from._internal_winch_result()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void RetractResponse::CopyFrom(const RetractResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.RetractResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool RetractResponse::IsInitialized() const { + return true; +} + +void RetractResponse::InternalSwap(RetractResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(winch_result_, other->winch_result_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata RetractResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[17]); +} + +// =================================================================== + +class LoadLineRequest::_Internal { + public: +}; + +LoadLineRequest::LoadLineRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.LoadLineRequest) +} +LoadLineRequest::LoadLineRequest(const LoadLineRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + instance_ = from.instance_; + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.LoadLineRequest) +} + +inline void LoadLineRequest::SharedCtor() { +instance_ = 0u; +} + +LoadLineRequest::~LoadLineRequest() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.LoadLineRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void LoadLineRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void LoadLineRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void LoadLineRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.LoadLineRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + instance_ = 0u; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* LoadLineRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // uint32 instance = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + instance_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* LoadLineRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.LoadLineRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_instance(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.LoadLineRequest) + return target; +} + +size_t LoadLineRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.LoadLineRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_instance()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData LoadLineRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + LoadLineRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*LoadLineRequest::GetClassData() const { return &_class_data_; } + +void LoadLineRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void LoadLineRequest::MergeFrom(const LoadLineRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.LoadLineRequest) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_instance() != 0) { + _internal_set_instance(from._internal_instance()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void LoadLineRequest::CopyFrom(const LoadLineRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.LoadLineRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool LoadLineRequest::IsInitialized() const { + return true; +} + +void LoadLineRequest::InternalSwap(LoadLineRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(instance_, other->instance_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata LoadLineRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[18]); +} + +// =================================================================== + +class LoadLineResponse::_Internal { + public: + static const ::mavsdk::rpc::winch::WinchResult& winch_result(const LoadLineResponse* msg); +}; + +const ::mavsdk::rpc::winch::WinchResult& +LoadLineResponse::_Internal::winch_result(const LoadLineResponse* msg) { + return *msg->winch_result_; +} +LoadLineResponse::LoadLineResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.LoadLineResponse) +} +LoadLineResponse::LoadLineResponse(const LoadLineResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_winch_result()) { + winch_result_ = new ::mavsdk::rpc::winch::WinchResult(*from.winch_result_); + } else { + winch_result_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.LoadLineResponse) +} + +inline void LoadLineResponse::SharedCtor() { +winch_result_ = nullptr; +} + +LoadLineResponse::~LoadLineResponse() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.LoadLineResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void LoadLineResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete winch_result_; +} + +void LoadLineResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void LoadLineResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.LoadLineResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && winch_result_ != nullptr) { + delete winch_result_; + } + winch_result_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* LoadLineResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_winch_result(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* LoadLineResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.LoadLineResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + if (this->_internal_has_winch_result()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::winch_result(this), + _Internal::winch_result(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.LoadLineResponse) + return target; +} + +size_t LoadLineResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.LoadLineResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + if (this->_internal_has_winch_result()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *winch_result_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData LoadLineResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + LoadLineResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*LoadLineResponse::GetClassData() const { return &_class_data_; } + +void LoadLineResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void LoadLineResponse::MergeFrom(const LoadLineResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.LoadLineResponse) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_winch_result()) { + _internal_mutable_winch_result()->::mavsdk::rpc::winch::WinchResult::MergeFrom(from._internal_winch_result()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void LoadLineResponse::CopyFrom(const LoadLineResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.LoadLineResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool LoadLineResponse::IsInitialized() const { + return true; +} + +void LoadLineResponse::InternalSwap(LoadLineResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(winch_result_, other->winch_result_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata LoadLineResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[19]); +} + +// =================================================================== + +class AbandonLineRequest::_Internal { + public: +}; + +AbandonLineRequest::AbandonLineRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.AbandonLineRequest) +} +AbandonLineRequest::AbandonLineRequest(const AbandonLineRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + instance_ = from.instance_; + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.AbandonLineRequest) +} + +inline void AbandonLineRequest::SharedCtor() { +instance_ = 0u; +} + +AbandonLineRequest::~AbandonLineRequest() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.AbandonLineRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void AbandonLineRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void AbandonLineRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void AbandonLineRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.AbandonLineRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + instance_ = 0u; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AbandonLineRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // uint32 instance = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + instance_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* AbandonLineRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.AbandonLineRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_instance(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.AbandonLineRequest) + return target; +} + +size_t AbandonLineRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.AbandonLineRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_instance()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AbandonLineRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + AbandonLineRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AbandonLineRequest::GetClassData() const { return &_class_data_; } + +void AbandonLineRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void AbandonLineRequest::MergeFrom(const AbandonLineRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.AbandonLineRequest) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_instance() != 0) { + _internal_set_instance(from._internal_instance()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void AbandonLineRequest::CopyFrom(const AbandonLineRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.AbandonLineRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AbandonLineRequest::IsInitialized() const { + return true; +} + +void AbandonLineRequest::InternalSwap(AbandonLineRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(instance_, other->instance_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AbandonLineRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[20]); +} + +// =================================================================== + +class AbandonLineResponse::_Internal { + public: + static const ::mavsdk::rpc::winch::WinchResult& winch_result(const AbandonLineResponse* msg); +}; + +const ::mavsdk::rpc::winch::WinchResult& +AbandonLineResponse::_Internal::winch_result(const AbandonLineResponse* msg) { + return *msg->winch_result_; +} +AbandonLineResponse::AbandonLineResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.AbandonLineResponse) +} +AbandonLineResponse::AbandonLineResponse(const AbandonLineResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_winch_result()) { + winch_result_ = new ::mavsdk::rpc::winch::WinchResult(*from.winch_result_); + } else { + winch_result_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.AbandonLineResponse) +} + +inline void AbandonLineResponse::SharedCtor() { +winch_result_ = nullptr; +} + +AbandonLineResponse::~AbandonLineResponse() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.AbandonLineResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void AbandonLineResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete winch_result_; +} + +void AbandonLineResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void AbandonLineResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.AbandonLineResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && winch_result_ != nullptr) { + delete winch_result_; + } + winch_result_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* AbandonLineResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_winch_result(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* AbandonLineResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.AbandonLineResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + if (this->_internal_has_winch_result()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::winch_result(this), + _Internal::winch_result(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.AbandonLineResponse) + return target; +} + +size_t AbandonLineResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.AbandonLineResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + if (this->_internal_has_winch_result()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *winch_result_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AbandonLineResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + AbandonLineResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AbandonLineResponse::GetClassData() const { return &_class_data_; } + +void AbandonLineResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void AbandonLineResponse::MergeFrom(const AbandonLineResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.AbandonLineResponse) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_winch_result()) { + _internal_mutable_winch_result()->::mavsdk::rpc::winch::WinchResult::MergeFrom(from._internal_winch_result()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void AbandonLineResponse::CopyFrom(const AbandonLineResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.AbandonLineResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AbandonLineResponse::IsInitialized() const { + return true; +} + +void AbandonLineResponse::InternalSwap(AbandonLineResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(winch_result_, other->winch_result_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata AbandonLineResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[21]); +} + +// =================================================================== + +class LoadPayloadRequest::_Internal { + public: +}; + +LoadPayloadRequest::LoadPayloadRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.LoadPayloadRequest) +} +LoadPayloadRequest::LoadPayloadRequest(const LoadPayloadRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + instance_ = from.instance_; + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.LoadPayloadRequest) +} + +inline void LoadPayloadRequest::SharedCtor() { +instance_ = 0u; +} + +LoadPayloadRequest::~LoadPayloadRequest() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.LoadPayloadRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void LoadPayloadRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void LoadPayloadRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void LoadPayloadRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.LoadPayloadRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + instance_ = 0u; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* LoadPayloadRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // uint32 instance = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + instance_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* LoadPayloadRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.LoadPayloadRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_instance(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.LoadPayloadRequest) + return target; +} + +size_t LoadPayloadRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.LoadPayloadRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // uint32 instance = 1; + if (this->_internal_instance() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_instance()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData LoadPayloadRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + LoadPayloadRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*LoadPayloadRequest::GetClassData() const { return &_class_data_; } + +void LoadPayloadRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void LoadPayloadRequest::MergeFrom(const LoadPayloadRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.LoadPayloadRequest) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_instance() != 0) { + _internal_set_instance(from._internal_instance()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void LoadPayloadRequest::CopyFrom(const LoadPayloadRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.LoadPayloadRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool LoadPayloadRequest::IsInitialized() const { + return true; +} + +void LoadPayloadRequest::InternalSwap(LoadPayloadRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(instance_, other->instance_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata LoadPayloadRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[22]); +} + +// =================================================================== + +class LoadPayloadResponse::_Internal { + public: + static const ::mavsdk::rpc::winch::WinchResult& winch_result(const LoadPayloadResponse* msg); +}; + +const ::mavsdk::rpc::winch::WinchResult& +LoadPayloadResponse::_Internal::winch_result(const LoadPayloadResponse* msg) { + return *msg->winch_result_; +} +LoadPayloadResponse::LoadPayloadResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.LoadPayloadResponse) +} +LoadPayloadResponse::LoadPayloadResponse(const LoadPayloadResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_winch_result()) { + winch_result_ = new ::mavsdk::rpc::winch::WinchResult(*from.winch_result_); + } else { + winch_result_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.LoadPayloadResponse) +} + +inline void LoadPayloadResponse::SharedCtor() { +winch_result_ = nullptr; +} + +LoadPayloadResponse::~LoadPayloadResponse() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.LoadPayloadResponse) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void LoadPayloadResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete winch_result_; +} + +void LoadPayloadResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void LoadPayloadResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.LoadPayloadResponse) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && winch_result_ != nullptr) { + delete winch_result_; + } + winch_result_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* LoadPayloadResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_winch_result(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* LoadPayloadResponse::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.LoadPayloadResponse) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + if (this->_internal_has_winch_result()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::winch_result(this), + _Internal::winch_result(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.LoadPayloadResponse) + return target; +} + +size_t LoadPayloadResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.LoadPayloadResponse) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + if (this->_internal_has_winch_result()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *winch_result_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData LoadPayloadResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + LoadPayloadResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*LoadPayloadResponse::GetClassData() const { return &_class_data_; } + +void LoadPayloadResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void LoadPayloadResponse::MergeFrom(const LoadPayloadResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.LoadPayloadResponse) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_winch_result()) { + _internal_mutable_winch_result()->::mavsdk::rpc::winch::WinchResult::MergeFrom(from._internal_winch_result()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void LoadPayloadResponse::CopyFrom(const LoadPayloadResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.LoadPayloadResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool LoadPayloadResponse::IsInitialized() const { + return true; +} + +void LoadPayloadResponse::InternalSwap(LoadPayloadResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(winch_result_, other->winch_result_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata LoadPayloadResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[23]); +} + +// =================================================================== + +class WinchResult::_Internal { + public: +}; + +WinchResult::WinchResult(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:mavsdk.rpc.winch.WinchResult) +} +WinchResult::WinchResult(const WinchResult& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + result_str_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + result_str_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_result_str().empty()) { + result_str_.Set(from._internal_result_str(), + GetArenaForAllocation()); + } + result_ = from.result_; + // @@protoc_insertion_point(copy_constructor:mavsdk.rpc.winch.WinchResult) +} + +inline void WinchResult::SharedCtor() { +result_str_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + result_str_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +result_ = 0; +} + +WinchResult::~WinchResult() { + // @@protoc_insertion_point(destructor:mavsdk.rpc.winch.WinchResult) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void WinchResult::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + result_str_.Destroy(); +} + +void WinchResult::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void WinchResult::Clear() { +// @@protoc_insertion_point(message_clear_start:mavsdk.rpc.winch.WinchResult) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + result_str_.ClearToEmpty(); + result_ = 0; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* WinchResult::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .mavsdk.rpc.winch.WinchResult.Result result = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_result(static_cast<::mavsdk::rpc::winch::WinchResult_Result>(val)); + } else + goto handle_unusual; + continue; + // string result_str = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_result_str(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "mavsdk.rpc.winch.WinchResult.result_str")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* WinchResult::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:mavsdk.rpc.winch.WinchResult) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .mavsdk.rpc.winch.WinchResult.Result result = 1; + if (this->_internal_result() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_result(), target); + } + + // string result_str = 2; + if (!this->_internal_result_str().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_result_str().data(), static_cast(this->_internal_result_str().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "mavsdk.rpc.winch.WinchResult.result_str"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_result_str(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:mavsdk.rpc.winch.WinchResult) + return target; +} + +size_t WinchResult::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:mavsdk.rpc.winch.WinchResult) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string result_str = 2; + if (!this->_internal_result_str().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_result_str()); + } + + // .mavsdk.rpc.winch.WinchResult.Result result = 1; + if (this->_internal_result() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_result()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData WinchResult::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + WinchResult::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*WinchResult::GetClassData() const { return &_class_data_; } + +void WinchResult::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void WinchResult::MergeFrom(const WinchResult& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:mavsdk.rpc.winch.WinchResult) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_result_str().empty()) { + _internal_set_result_str(from._internal_result_str()); + } + if (from._internal_result() != 0) { + _internal_set_result(from._internal_result()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void WinchResult::CopyFrom(const WinchResult& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:mavsdk.rpc.winch.WinchResult) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool WinchResult::IsInitialized() const { + return true; +} + +void WinchResult::InternalSwap(WinchResult* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &result_str_, lhs_arena, + &other->result_str_, rhs_arena + ); + swap(result_, other->result_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata WinchResult::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_winch_2fwinch_2eproto_getter, &descriptor_table_winch_2fwinch_2eproto_once, + file_level_metadata_winch_2fwinch_2eproto[24]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace winch +} // namespace rpc +} // namespace mavsdk +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::SubscribeStatusRequest* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::SubscribeStatusRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::SubscribeStatusRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::StatusResponse* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::StatusResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::StatusResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::StatusFlags* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::StatusFlags >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::StatusFlags >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::Status* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::Status >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::Status >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::RelaxRequest* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::RelaxRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::RelaxRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::RelaxResponse* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::RelaxResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::RelaxResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::RelativeLengthControlRequest* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::RelativeLengthControlRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::RelativeLengthControlRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::RelativeLengthControlResponse* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::RelativeLengthControlResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::RelativeLengthControlResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::RateControlRequest* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::RateControlRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::RateControlRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::RateControlResponse* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::RateControlResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::RateControlResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::LockRequest* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::LockRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::LockRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::LockResponse* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::LockResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::LockResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::DeliverRequest* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::DeliverRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::DeliverRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::DeliverResponse* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::DeliverResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::DeliverResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::HoldRequest* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::HoldRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::HoldRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::HoldResponse* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::HoldResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::HoldResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::RetractRequest* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::RetractRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::RetractRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::RetractResponse* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::RetractResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::RetractResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::LoadLineRequest* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::LoadLineRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::LoadLineRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::LoadLineResponse* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::LoadLineResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::LoadLineResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::AbandonLineRequest* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::AbandonLineRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::AbandonLineRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::AbandonLineResponse* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::AbandonLineResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::AbandonLineResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::LoadPayloadRequest* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::LoadPayloadRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::LoadPayloadRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::LoadPayloadResponse* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::LoadPayloadResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::LoadPayloadResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::mavsdk::rpc::winch::WinchResult* +Arena::CreateMaybeMessage< ::mavsdk::rpc::winch::WinchResult >(Arena* arena) { + return Arena::CreateMessageInternal< ::mavsdk::rpc::winch::WinchResult >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/src/mavsdk_server/src/generated/winch/winch.pb.h b/src/mavsdk_server/src/generated/winch/winch.pb.h new file mode 100644 index 0000000000..13191148e1 --- /dev/null +++ b/src/mavsdk_server/src/generated/winch/winch.pb.h @@ -0,0 +1,6203 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: winch/winch.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_winch_2fwinch_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_winch_2fwinch_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3020000 +#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 3020001 < 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include "mavsdk_options.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_winch_2fwinch_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_winch_2fwinch_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_winch_2fwinch_2eproto; +namespace mavsdk { +namespace rpc { +namespace winch { +class AbandonLineRequest; +struct AbandonLineRequestDefaultTypeInternal; +extern AbandonLineRequestDefaultTypeInternal _AbandonLineRequest_default_instance_; +class AbandonLineResponse; +struct AbandonLineResponseDefaultTypeInternal; +extern AbandonLineResponseDefaultTypeInternal _AbandonLineResponse_default_instance_; +class DeliverRequest; +struct DeliverRequestDefaultTypeInternal; +extern DeliverRequestDefaultTypeInternal _DeliverRequest_default_instance_; +class DeliverResponse; +struct DeliverResponseDefaultTypeInternal; +extern DeliverResponseDefaultTypeInternal _DeliverResponse_default_instance_; +class HoldRequest; +struct HoldRequestDefaultTypeInternal; +extern HoldRequestDefaultTypeInternal _HoldRequest_default_instance_; +class HoldResponse; +struct HoldResponseDefaultTypeInternal; +extern HoldResponseDefaultTypeInternal _HoldResponse_default_instance_; +class LoadLineRequest; +struct LoadLineRequestDefaultTypeInternal; +extern LoadLineRequestDefaultTypeInternal _LoadLineRequest_default_instance_; +class LoadLineResponse; +struct LoadLineResponseDefaultTypeInternal; +extern LoadLineResponseDefaultTypeInternal _LoadLineResponse_default_instance_; +class LoadPayloadRequest; +struct LoadPayloadRequestDefaultTypeInternal; +extern LoadPayloadRequestDefaultTypeInternal _LoadPayloadRequest_default_instance_; +class LoadPayloadResponse; +struct LoadPayloadResponseDefaultTypeInternal; +extern LoadPayloadResponseDefaultTypeInternal _LoadPayloadResponse_default_instance_; +class LockRequest; +struct LockRequestDefaultTypeInternal; +extern LockRequestDefaultTypeInternal _LockRequest_default_instance_; +class LockResponse; +struct LockResponseDefaultTypeInternal; +extern LockResponseDefaultTypeInternal _LockResponse_default_instance_; +class RateControlRequest; +struct RateControlRequestDefaultTypeInternal; +extern RateControlRequestDefaultTypeInternal _RateControlRequest_default_instance_; +class RateControlResponse; +struct RateControlResponseDefaultTypeInternal; +extern RateControlResponseDefaultTypeInternal _RateControlResponse_default_instance_; +class RelativeLengthControlRequest; +struct RelativeLengthControlRequestDefaultTypeInternal; +extern RelativeLengthControlRequestDefaultTypeInternal _RelativeLengthControlRequest_default_instance_; +class RelativeLengthControlResponse; +struct RelativeLengthControlResponseDefaultTypeInternal; +extern RelativeLengthControlResponseDefaultTypeInternal _RelativeLengthControlResponse_default_instance_; +class RelaxRequest; +struct RelaxRequestDefaultTypeInternal; +extern RelaxRequestDefaultTypeInternal _RelaxRequest_default_instance_; +class RelaxResponse; +struct RelaxResponseDefaultTypeInternal; +extern RelaxResponseDefaultTypeInternal _RelaxResponse_default_instance_; +class RetractRequest; +struct RetractRequestDefaultTypeInternal; +extern RetractRequestDefaultTypeInternal _RetractRequest_default_instance_; +class RetractResponse; +struct RetractResponseDefaultTypeInternal; +extern RetractResponseDefaultTypeInternal _RetractResponse_default_instance_; +class Status; +struct StatusDefaultTypeInternal; +extern StatusDefaultTypeInternal _Status_default_instance_; +class StatusFlags; +struct StatusFlagsDefaultTypeInternal; +extern StatusFlagsDefaultTypeInternal _StatusFlags_default_instance_; +class StatusResponse; +struct StatusResponseDefaultTypeInternal; +extern StatusResponseDefaultTypeInternal _StatusResponse_default_instance_; +class SubscribeStatusRequest; +struct SubscribeStatusRequestDefaultTypeInternal; +extern SubscribeStatusRequestDefaultTypeInternal _SubscribeStatusRequest_default_instance_; +class WinchResult; +struct WinchResultDefaultTypeInternal; +extern WinchResultDefaultTypeInternal _WinchResult_default_instance_; +} // namespace winch +} // namespace rpc +} // namespace mavsdk +PROTOBUF_NAMESPACE_OPEN +template<> ::mavsdk::rpc::winch::AbandonLineRequest* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::AbandonLineRequest>(Arena*); +template<> ::mavsdk::rpc::winch::AbandonLineResponse* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::AbandonLineResponse>(Arena*); +template<> ::mavsdk::rpc::winch::DeliverRequest* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::DeliverRequest>(Arena*); +template<> ::mavsdk::rpc::winch::DeliverResponse* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::DeliverResponse>(Arena*); +template<> ::mavsdk::rpc::winch::HoldRequest* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::HoldRequest>(Arena*); +template<> ::mavsdk::rpc::winch::HoldResponse* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::HoldResponse>(Arena*); +template<> ::mavsdk::rpc::winch::LoadLineRequest* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::LoadLineRequest>(Arena*); +template<> ::mavsdk::rpc::winch::LoadLineResponse* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::LoadLineResponse>(Arena*); +template<> ::mavsdk::rpc::winch::LoadPayloadRequest* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::LoadPayloadRequest>(Arena*); +template<> ::mavsdk::rpc::winch::LoadPayloadResponse* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::LoadPayloadResponse>(Arena*); +template<> ::mavsdk::rpc::winch::LockRequest* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::LockRequest>(Arena*); +template<> ::mavsdk::rpc::winch::LockResponse* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::LockResponse>(Arena*); +template<> ::mavsdk::rpc::winch::RateControlRequest* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::RateControlRequest>(Arena*); +template<> ::mavsdk::rpc::winch::RateControlResponse* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::RateControlResponse>(Arena*); +template<> ::mavsdk::rpc::winch::RelativeLengthControlRequest* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::RelativeLengthControlRequest>(Arena*); +template<> ::mavsdk::rpc::winch::RelativeLengthControlResponse* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::RelativeLengthControlResponse>(Arena*); +template<> ::mavsdk::rpc::winch::RelaxRequest* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::RelaxRequest>(Arena*); +template<> ::mavsdk::rpc::winch::RelaxResponse* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::RelaxResponse>(Arena*); +template<> ::mavsdk::rpc::winch::RetractRequest* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::RetractRequest>(Arena*); +template<> ::mavsdk::rpc::winch::RetractResponse* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::RetractResponse>(Arena*); +template<> ::mavsdk::rpc::winch::Status* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::Status>(Arena*); +template<> ::mavsdk::rpc::winch::StatusFlags* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::StatusFlags>(Arena*); +template<> ::mavsdk::rpc::winch::StatusResponse* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::StatusResponse>(Arena*); +template<> ::mavsdk::rpc::winch::SubscribeStatusRequest* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::SubscribeStatusRequest>(Arena*); +template<> ::mavsdk::rpc::winch::WinchResult* Arena::CreateMaybeMessage<::mavsdk::rpc::winch::WinchResult>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace mavsdk { +namespace rpc { +namespace winch { + +enum WinchResult_Result : int { + WinchResult_Result_RESULT_UNKNOWN = 0, + WinchResult_Result_RESULT_SUCCESS = 1, + WinchResult_Result_RESULT_NO_SYSTEM = 2, + WinchResult_Result_RESULT_BUSY = 3, + WinchResult_Result_RESULT_TIMEOUT = 4, + WinchResult_Result_RESULT_UNSUPPORTED = 5, + WinchResult_Result_RESULT_FAILED = 6, + WinchResult_Result_WinchResult_Result_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + WinchResult_Result_WinchResult_Result_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool WinchResult_Result_IsValid(int value); +constexpr WinchResult_Result WinchResult_Result_Result_MIN = WinchResult_Result_RESULT_UNKNOWN; +constexpr WinchResult_Result WinchResult_Result_Result_MAX = WinchResult_Result_RESULT_FAILED; +constexpr int WinchResult_Result_Result_ARRAYSIZE = WinchResult_Result_Result_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* WinchResult_Result_descriptor(); +template +inline const std::string& WinchResult_Result_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function WinchResult_Result_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + WinchResult_Result_descriptor(), enum_t_value); +} +inline bool WinchResult_Result_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, WinchResult_Result* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + WinchResult_Result_descriptor(), name, value); +} +enum WinchAction : int { + WINCH_ACTION_RELAXED = 0, + WINCH_ACTION_RELATIVE_LENGTH_CONTROL = 1, + WINCH_ACTION_RATE_CONTROL = 2, + WINCH_ACTION_LOCK = 3, + WINCH_ACTION_DELIVER = 4, + WINCH_ACTION_HOLD = 5, + WINCH_ACTION_RETRACT = 6, + WINCH_ACTION_LOAD_LINE = 7, + WINCH_ACTION_ABANDON_LINE = 8, + WINCH_ACTION_LOAD_PAYLOAD = 9, + WinchAction_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + WinchAction_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool WinchAction_IsValid(int value); +constexpr WinchAction WinchAction_MIN = WINCH_ACTION_RELAXED; +constexpr WinchAction WinchAction_MAX = WINCH_ACTION_LOAD_PAYLOAD; +constexpr int WinchAction_ARRAYSIZE = WinchAction_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* WinchAction_descriptor(); +template +inline const std::string& WinchAction_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function WinchAction_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + WinchAction_descriptor(), enum_t_value); +} +inline bool WinchAction_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, WinchAction* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + WinchAction_descriptor(), name, value); +} +// =================================================================== + +class SubscribeStatusRequest final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.SubscribeStatusRequest) */ { + public: + inline SubscribeStatusRequest() : SubscribeStatusRequest(nullptr) {} + explicit PROTOBUF_CONSTEXPR SubscribeStatusRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SubscribeStatusRequest(const SubscribeStatusRequest& from); + SubscribeStatusRequest(SubscribeStatusRequest&& from) noexcept + : SubscribeStatusRequest() { + *this = ::std::move(from); + } + + inline SubscribeStatusRequest& operator=(const SubscribeStatusRequest& from) { + CopyFrom(from); + return *this; + } + inline SubscribeStatusRequest& operator=(SubscribeStatusRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const SubscribeStatusRequest& default_instance() { + return *internal_default_instance(); + } + static inline const SubscribeStatusRequest* internal_default_instance() { + return reinterpret_cast( + &_SubscribeStatusRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(SubscribeStatusRequest& a, SubscribeStatusRequest& b) { + a.Swap(&b); + } + inline void Swap(SubscribeStatusRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SubscribeStatusRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SubscribeStatusRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const SubscribeStatusRequest& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const SubscribeStatusRequest& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.SubscribeStatusRequest"; + } + protected: + explicit SubscribeStatusRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.SubscribeStatusRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class StatusResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.StatusResponse) */ { + public: + inline StatusResponse() : StatusResponse(nullptr) {} + ~StatusResponse() override; + explicit PROTOBUF_CONSTEXPR StatusResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + StatusResponse(const StatusResponse& from); + StatusResponse(StatusResponse&& from) noexcept + : StatusResponse() { + *this = ::std::move(from); + } + + inline StatusResponse& operator=(const StatusResponse& from) { + CopyFrom(from); + return *this; + } + inline StatusResponse& operator=(StatusResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const StatusResponse& default_instance() { + return *internal_default_instance(); + } + static inline const StatusResponse* internal_default_instance() { + return reinterpret_cast( + &_StatusResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(StatusResponse& a, StatusResponse& b) { + a.Swap(&b); + } + inline void Swap(StatusResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(StatusResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + StatusResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const StatusResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const StatusResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(StatusResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.StatusResponse"; + } + protected: + explicit StatusResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kStatusFieldNumber = 1, + }; + // .mavsdk.rpc.winch.Status status = 1; + bool has_status() const; + private: + bool _internal_has_status() const; + public: + void clear_status(); + const ::mavsdk::rpc::winch::Status& status() const; + PROTOBUF_NODISCARD ::mavsdk::rpc::winch::Status* release_status(); + ::mavsdk::rpc::winch::Status* mutable_status(); + void set_allocated_status(::mavsdk::rpc::winch::Status* status); + private: + const ::mavsdk::rpc::winch::Status& _internal_status() const; + ::mavsdk::rpc::winch::Status* _internal_mutable_status(); + public: + void unsafe_arena_set_allocated_status( + ::mavsdk::rpc::winch::Status* status); + ::mavsdk::rpc::winch::Status* unsafe_arena_release_status(); + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.StatusResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::mavsdk::rpc::winch::Status* status_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class StatusFlags final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.StatusFlags) */ { + public: + inline StatusFlags() : StatusFlags(nullptr) {} + ~StatusFlags() override; + explicit PROTOBUF_CONSTEXPR StatusFlags(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + StatusFlags(const StatusFlags& from); + StatusFlags(StatusFlags&& from) noexcept + : StatusFlags() { + *this = ::std::move(from); + } + + inline StatusFlags& operator=(const StatusFlags& from) { + CopyFrom(from); + return *this; + } + inline StatusFlags& operator=(StatusFlags&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const StatusFlags& default_instance() { + return *internal_default_instance(); + } + static inline const StatusFlags* internal_default_instance() { + return reinterpret_cast( + &_StatusFlags_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(StatusFlags& a, StatusFlags& b) { + a.Swap(&b); + } + inline void Swap(StatusFlags* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(StatusFlags* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + StatusFlags* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const StatusFlags& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const StatusFlags& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(StatusFlags* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.StatusFlags"; + } + protected: + explicit StatusFlags(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kHealthyFieldNumber = 1, + kFullyRetractedFieldNumber = 2, + kMovingFieldNumber = 3, + kClutchEngagedFieldNumber = 4, + kLockedFieldNumber = 5, + kDroppingFieldNumber = 6, + kArrestingFieldNumber = 7, + kGroundSenseFieldNumber = 8, + kRetractingFieldNumber = 9, + kRedeliverFieldNumber = 10, + kAbandonLineFieldNumber = 11, + kLockingFieldNumber = 12, + kLoadLineFieldNumber = 13, + kLoadPayloadFieldNumber = 14, + }; + // bool healthy = 1; + void clear_healthy(); + bool healthy() const; + void set_healthy(bool value); + private: + bool _internal_healthy() const; + void _internal_set_healthy(bool value); + public: + + // bool fully_retracted = 2; + void clear_fully_retracted(); + bool fully_retracted() const; + void set_fully_retracted(bool value); + private: + bool _internal_fully_retracted() const; + void _internal_set_fully_retracted(bool value); + public: + + // bool moving = 3; + void clear_moving(); + bool moving() const; + void set_moving(bool value); + private: + bool _internal_moving() const; + void _internal_set_moving(bool value); + public: + + // bool clutch_engaged = 4; + void clear_clutch_engaged(); + bool clutch_engaged() const; + void set_clutch_engaged(bool value); + private: + bool _internal_clutch_engaged() const; + void _internal_set_clutch_engaged(bool value); + public: + + // bool locked = 5; + void clear_locked(); + bool locked() const; + void set_locked(bool value); + private: + bool _internal_locked() const; + void _internal_set_locked(bool value); + public: + + // bool dropping = 6; + void clear_dropping(); + bool dropping() const; + void set_dropping(bool value); + private: + bool _internal_dropping() const; + void _internal_set_dropping(bool value); + public: + + // bool arresting = 7; + void clear_arresting(); + bool arresting() const; + void set_arresting(bool value); + private: + bool _internal_arresting() const; + void _internal_set_arresting(bool value); + public: + + // bool ground_sense = 8; + void clear_ground_sense(); + bool ground_sense() const; + void set_ground_sense(bool value); + private: + bool _internal_ground_sense() const; + void _internal_set_ground_sense(bool value); + public: + + // bool retracting = 9; + void clear_retracting(); + bool retracting() const; + void set_retracting(bool value); + private: + bool _internal_retracting() const; + void _internal_set_retracting(bool value); + public: + + // bool redeliver = 10; + void clear_redeliver(); + bool redeliver() const; + void set_redeliver(bool value); + private: + bool _internal_redeliver() const; + void _internal_set_redeliver(bool value); + public: + + // bool abandon_line = 11; + void clear_abandon_line(); + bool abandon_line() const; + void set_abandon_line(bool value); + private: + bool _internal_abandon_line() const; + void _internal_set_abandon_line(bool value); + public: + + // bool locking = 12; + void clear_locking(); + bool locking() const; + void set_locking(bool value); + private: + bool _internal_locking() const; + void _internal_set_locking(bool value); + public: + + // bool load_line = 13; + void clear_load_line(); + bool load_line() const; + void set_load_line(bool value); + private: + bool _internal_load_line() const; + void _internal_set_load_line(bool value); + public: + + // bool load_payload = 14; + void clear_load_payload(); + bool load_payload() const; + void set_load_payload(bool value); + private: + bool _internal_load_payload() const; + void _internal_set_load_payload(bool value); + public: + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.StatusFlags) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + bool healthy_; + bool fully_retracted_; + bool moving_; + bool clutch_engaged_; + bool locked_; + bool dropping_; + bool arresting_; + bool ground_sense_; + bool retracting_; + bool redeliver_; + bool abandon_line_; + bool locking_; + bool load_line_; + bool load_payload_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class Status final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.Status) */ { + public: + inline Status() : Status(nullptr) {} + ~Status() override; + explicit PROTOBUF_CONSTEXPR Status(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Status(const Status& from); + Status(Status&& from) noexcept + : Status() { + *this = ::std::move(from); + } + + inline Status& operator=(const Status& from) { + CopyFrom(from); + return *this; + } + inline Status& operator=(Status&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Status& default_instance() { + return *internal_default_instance(); + } + static inline const Status* internal_default_instance() { + return reinterpret_cast( + &_Status_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(Status& a, Status& b) { + a.Swap(&b); + } + inline void Swap(Status* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Status* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Status* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Status& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const Status& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Status* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.Status"; + } + protected: + explicit Status(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kStatusFlagsFieldNumber = 8, + kTimeUsecFieldNumber = 1, + kLineLengthMFieldNumber = 2, + kSpeedMSFieldNumber = 3, + kTensionKgFieldNumber = 4, + kVoltageVFieldNumber = 5, + kCurrentAFieldNumber = 6, + kTemperatureCFieldNumber = 7, + }; + // .mavsdk.rpc.winch.StatusFlags status_flags = 8; + bool has_status_flags() const; + private: + bool _internal_has_status_flags() const; + public: + void clear_status_flags(); + const ::mavsdk::rpc::winch::StatusFlags& status_flags() const; + PROTOBUF_NODISCARD ::mavsdk::rpc::winch::StatusFlags* release_status_flags(); + ::mavsdk::rpc::winch::StatusFlags* mutable_status_flags(); + void set_allocated_status_flags(::mavsdk::rpc::winch::StatusFlags* status_flags); + private: + const ::mavsdk::rpc::winch::StatusFlags& _internal_status_flags() const; + ::mavsdk::rpc::winch::StatusFlags* _internal_mutable_status_flags(); + public: + void unsafe_arena_set_allocated_status_flags( + ::mavsdk::rpc::winch::StatusFlags* status_flags); + ::mavsdk::rpc::winch::StatusFlags* unsafe_arena_release_status_flags(); + + // uint64 time_usec = 1; + void clear_time_usec(); + uint64_t time_usec() const; + void set_time_usec(uint64_t value); + private: + uint64_t _internal_time_usec() const; + void _internal_set_time_usec(uint64_t value); + public: + + // float line_length_m = 2; + void clear_line_length_m(); + float line_length_m() const; + void set_line_length_m(float value); + private: + float _internal_line_length_m() const; + void _internal_set_line_length_m(float value); + public: + + // float speed_m_s = 3; + void clear_speed_m_s(); + float speed_m_s() const; + void set_speed_m_s(float value); + private: + float _internal_speed_m_s() const; + void _internal_set_speed_m_s(float value); + public: + + // float tension_kg = 4; + void clear_tension_kg(); + float tension_kg() const; + void set_tension_kg(float value); + private: + float _internal_tension_kg() const; + void _internal_set_tension_kg(float value); + public: + + // float voltage_v = 5; + void clear_voltage_v(); + float voltage_v() const; + void set_voltage_v(float value); + private: + float _internal_voltage_v() const; + void _internal_set_voltage_v(float value); + public: + + // float current_a = 6; + void clear_current_a(); + float current_a() const; + void set_current_a(float value); + private: + float _internal_current_a() const; + void _internal_set_current_a(float value); + public: + + // int32 temperature_c = 7; + void clear_temperature_c(); + int32_t temperature_c() const; + void set_temperature_c(int32_t value); + private: + int32_t _internal_temperature_c() const; + void _internal_set_temperature_c(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.Status) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::mavsdk::rpc::winch::StatusFlags* status_flags_; + uint64_t time_usec_; + float line_length_m_; + float speed_m_s_; + float tension_kg_; + float voltage_v_; + float current_a_; + int32_t temperature_c_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class RelaxRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.RelaxRequest) */ { + public: + inline RelaxRequest() : RelaxRequest(nullptr) {} + ~RelaxRequest() override; + explicit PROTOBUF_CONSTEXPR RelaxRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RelaxRequest(const RelaxRequest& from); + RelaxRequest(RelaxRequest&& from) noexcept + : RelaxRequest() { + *this = ::std::move(from); + } + + inline RelaxRequest& operator=(const RelaxRequest& from) { + CopyFrom(from); + return *this; + } + inline RelaxRequest& operator=(RelaxRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RelaxRequest& default_instance() { + return *internal_default_instance(); + } + static inline const RelaxRequest* internal_default_instance() { + return reinterpret_cast( + &_RelaxRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(RelaxRequest& a, RelaxRequest& b) { + a.Swap(&b); + } + inline void Swap(RelaxRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RelaxRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RelaxRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RelaxRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const RelaxRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RelaxRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.RelaxRequest"; + } + protected: + explicit RelaxRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInstanceFieldNumber = 1, + }; + // uint32 instance = 1; + void clear_instance(); + uint32_t instance() const; + void set_instance(uint32_t value); + private: + uint32_t _internal_instance() const; + void _internal_set_instance(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.RelaxRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + uint32_t instance_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class RelaxResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.RelaxResponse) */ { + public: + inline RelaxResponse() : RelaxResponse(nullptr) {} + ~RelaxResponse() override; + explicit PROTOBUF_CONSTEXPR RelaxResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RelaxResponse(const RelaxResponse& from); + RelaxResponse(RelaxResponse&& from) noexcept + : RelaxResponse() { + *this = ::std::move(from); + } + + inline RelaxResponse& operator=(const RelaxResponse& from) { + CopyFrom(from); + return *this; + } + inline RelaxResponse& operator=(RelaxResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RelaxResponse& default_instance() { + return *internal_default_instance(); + } + static inline const RelaxResponse* internal_default_instance() { + return reinterpret_cast( + &_RelaxResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(RelaxResponse& a, RelaxResponse& b) { + a.Swap(&b); + } + inline void Swap(RelaxResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RelaxResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RelaxResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RelaxResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const RelaxResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RelaxResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.RelaxResponse"; + } + protected: + explicit RelaxResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kWinchResultFieldNumber = 1, + }; + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + bool has_winch_result() const; + private: + bool _internal_has_winch_result() const; + public: + void clear_winch_result(); + const ::mavsdk::rpc::winch::WinchResult& winch_result() const; + PROTOBUF_NODISCARD ::mavsdk::rpc::winch::WinchResult* release_winch_result(); + ::mavsdk::rpc::winch::WinchResult* mutable_winch_result(); + void set_allocated_winch_result(::mavsdk::rpc::winch::WinchResult* winch_result); + private: + const ::mavsdk::rpc::winch::WinchResult& _internal_winch_result() const; + ::mavsdk::rpc::winch::WinchResult* _internal_mutable_winch_result(); + public: + void unsafe_arena_set_allocated_winch_result( + ::mavsdk::rpc::winch::WinchResult* winch_result); + ::mavsdk::rpc::winch::WinchResult* unsafe_arena_release_winch_result(); + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.RelaxResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::mavsdk::rpc::winch::WinchResult* winch_result_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class RelativeLengthControlRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.RelativeLengthControlRequest) */ { + public: + inline RelativeLengthControlRequest() : RelativeLengthControlRequest(nullptr) {} + ~RelativeLengthControlRequest() override; + explicit PROTOBUF_CONSTEXPR RelativeLengthControlRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RelativeLengthControlRequest(const RelativeLengthControlRequest& from); + RelativeLengthControlRequest(RelativeLengthControlRequest&& from) noexcept + : RelativeLengthControlRequest() { + *this = ::std::move(from); + } + + inline RelativeLengthControlRequest& operator=(const RelativeLengthControlRequest& from) { + CopyFrom(from); + return *this; + } + inline RelativeLengthControlRequest& operator=(RelativeLengthControlRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RelativeLengthControlRequest& default_instance() { + return *internal_default_instance(); + } + static inline const RelativeLengthControlRequest* internal_default_instance() { + return reinterpret_cast( + &_RelativeLengthControlRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(RelativeLengthControlRequest& a, RelativeLengthControlRequest& b) { + a.Swap(&b); + } + inline void Swap(RelativeLengthControlRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RelativeLengthControlRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RelativeLengthControlRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RelativeLengthControlRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const RelativeLengthControlRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RelativeLengthControlRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.RelativeLengthControlRequest"; + } + protected: + explicit RelativeLengthControlRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInstanceFieldNumber = 1, + kLengthMFieldNumber = 2, + kRateMSFieldNumber = 3, + }; + // uint32 instance = 1; + void clear_instance(); + uint32_t instance() const; + void set_instance(uint32_t value); + private: + uint32_t _internal_instance() const; + void _internal_set_instance(uint32_t value); + public: + + // float length_m = 2; + void clear_length_m(); + float length_m() const; + void set_length_m(float value); + private: + float _internal_length_m() const; + void _internal_set_length_m(float value); + public: + + // float rate_m_s = 3 [(.mavsdk.options.default_value) = "NaN"]; + void clear_rate_m_s(); + float rate_m_s() const; + void set_rate_m_s(float value); + private: + float _internal_rate_m_s() const; + void _internal_set_rate_m_s(float value); + public: + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.RelativeLengthControlRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + uint32_t instance_; + float length_m_; + float rate_m_s_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class RelativeLengthControlResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.RelativeLengthControlResponse) */ { + public: + inline RelativeLengthControlResponse() : RelativeLengthControlResponse(nullptr) {} + ~RelativeLengthControlResponse() override; + explicit PROTOBUF_CONSTEXPR RelativeLengthControlResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RelativeLengthControlResponse(const RelativeLengthControlResponse& from); + RelativeLengthControlResponse(RelativeLengthControlResponse&& from) noexcept + : RelativeLengthControlResponse() { + *this = ::std::move(from); + } + + inline RelativeLengthControlResponse& operator=(const RelativeLengthControlResponse& from) { + CopyFrom(from); + return *this; + } + inline RelativeLengthControlResponse& operator=(RelativeLengthControlResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RelativeLengthControlResponse& default_instance() { + return *internal_default_instance(); + } + static inline const RelativeLengthControlResponse* internal_default_instance() { + return reinterpret_cast( + &_RelativeLengthControlResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(RelativeLengthControlResponse& a, RelativeLengthControlResponse& b) { + a.Swap(&b); + } + inline void Swap(RelativeLengthControlResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RelativeLengthControlResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RelativeLengthControlResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RelativeLengthControlResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const RelativeLengthControlResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RelativeLengthControlResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.RelativeLengthControlResponse"; + } + protected: + explicit RelativeLengthControlResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kWinchResultFieldNumber = 1, + }; + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + bool has_winch_result() const; + private: + bool _internal_has_winch_result() const; + public: + void clear_winch_result(); + const ::mavsdk::rpc::winch::WinchResult& winch_result() const; + PROTOBUF_NODISCARD ::mavsdk::rpc::winch::WinchResult* release_winch_result(); + ::mavsdk::rpc::winch::WinchResult* mutable_winch_result(); + void set_allocated_winch_result(::mavsdk::rpc::winch::WinchResult* winch_result); + private: + const ::mavsdk::rpc::winch::WinchResult& _internal_winch_result() const; + ::mavsdk::rpc::winch::WinchResult* _internal_mutable_winch_result(); + public: + void unsafe_arena_set_allocated_winch_result( + ::mavsdk::rpc::winch::WinchResult* winch_result); + ::mavsdk::rpc::winch::WinchResult* unsafe_arena_release_winch_result(); + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.RelativeLengthControlResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::mavsdk::rpc::winch::WinchResult* winch_result_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class RateControlRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.RateControlRequest) */ { + public: + inline RateControlRequest() : RateControlRequest(nullptr) {} + ~RateControlRequest() override; + explicit PROTOBUF_CONSTEXPR RateControlRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RateControlRequest(const RateControlRequest& from); + RateControlRequest(RateControlRequest&& from) noexcept + : RateControlRequest() { + *this = ::std::move(from); + } + + inline RateControlRequest& operator=(const RateControlRequest& from) { + CopyFrom(from); + return *this; + } + inline RateControlRequest& operator=(RateControlRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RateControlRequest& default_instance() { + return *internal_default_instance(); + } + static inline const RateControlRequest* internal_default_instance() { + return reinterpret_cast( + &_RateControlRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(RateControlRequest& a, RateControlRequest& b) { + a.Swap(&b); + } + inline void Swap(RateControlRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RateControlRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RateControlRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RateControlRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const RateControlRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RateControlRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.RateControlRequest"; + } + protected: + explicit RateControlRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInstanceFieldNumber = 1, + kRateMSFieldNumber = 2, + }; + // uint32 instance = 1; + void clear_instance(); + uint32_t instance() const; + void set_instance(uint32_t value); + private: + uint32_t _internal_instance() const; + void _internal_set_instance(uint32_t value); + public: + + // float rate_m_s = 2; + void clear_rate_m_s(); + float rate_m_s() const; + void set_rate_m_s(float value); + private: + float _internal_rate_m_s() const; + void _internal_set_rate_m_s(float value); + public: + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.RateControlRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + uint32_t instance_; + float rate_m_s_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class RateControlResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.RateControlResponse) */ { + public: + inline RateControlResponse() : RateControlResponse(nullptr) {} + ~RateControlResponse() override; + explicit PROTOBUF_CONSTEXPR RateControlResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RateControlResponse(const RateControlResponse& from); + RateControlResponse(RateControlResponse&& from) noexcept + : RateControlResponse() { + *this = ::std::move(from); + } + + inline RateControlResponse& operator=(const RateControlResponse& from) { + CopyFrom(from); + return *this; + } + inline RateControlResponse& operator=(RateControlResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RateControlResponse& default_instance() { + return *internal_default_instance(); + } + static inline const RateControlResponse* internal_default_instance() { + return reinterpret_cast( + &_RateControlResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(RateControlResponse& a, RateControlResponse& b) { + a.Swap(&b); + } + inline void Swap(RateControlResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RateControlResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RateControlResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RateControlResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const RateControlResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RateControlResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.RateControlResponse"; + } + protected: + explicit RateControlResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kWinchResultFieldNumber = 1, + }; + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + bool has_winch_result() const; + private: + bool _internal_has_winch_result() const; + public: + void clear_winch_result(); + const ::mavsdk::rpc::winch::WinchResult& winch_result() const; + PROTOBUF_NODISCARD ::mavsdk::rpc::winch::WinchResult* release_winch_result(); + ::mavsdk::rpc::winch::WinchResult* mutable_winch_result(); + void set_allocated_winch_result(::mavsdk::rpc::winch::WinchResult* winch_result); + private: + const ::mavsdk::rpc::winch::WinchResult& _internal_winch_result() const; + ::mavsdk::rpc::winch::WinchResult* _internal_mutable_winch_result(); + public: + void unsafe_arena_set_allocated_winch_result( + ::mavsdk::rpc::winch::WinchResult* winch_result); + ::mavsdk::rpc::winch::WinchResult* unsafe_arena_release_winch_result(); + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.RateControlResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::mavsdk::rpc::winch::WinchResult* winch_result_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class LockRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.LockRequest) */ { + public: + inline LockRequest() : LockRequest(nullptr) {} + ~LockRequest() override; + explicit PROTOBUF_CONSTEXPR LockRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + LockRequest(const LockRequest& from); + LockRequest(LockRequest&& from) noexcept + : LockRequest() { + *this = ::std::move(from); + } + + inline LockRequest& operator=(const LockRequest& from) { + CopyFrom(from); + return *this; + } + inline LockRequest& operator=(LockRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const LockRequest& default_instance() { + return *internal_default_instance(); + } + static inline const LockRequest* internal_default_instance() { + return reinterpret_cast( + &_LockRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 10; + + friend void swap(LockRequest& a, LockRequest& b) { + a.Swap(&b); + } + inline void Swap(LockRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(LockRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + LockRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const LockRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const LockRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(LockRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.LockRequest"; + } + protected: + explicit LockRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInstanceFieldNumber = 1, + }; + // uint32 instance = 1; + void clear_instance(); + uint32_t instance() const; + void set_instance(uint32_t value); + private: + uint32_t _internal_instance() const; + void _internal_set_instance(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.LockRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + uint32_t instance_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class LockResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.LockResponse) */ { + public: + inline LockResponse() : LockResponse(nullptr) {} + ~LockResponse() override; + explicit PROTOBUF_CONSTEXPR LockResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + LockResponse(const LockResponse& from); + LockResponse(LockResponse&& from) noexcept + : LockResponse() { + *this = ::std::move(from); + } + + inline LockResponse& operator=(const LockResponse& from) { + CopyFrom(from); + return *this; + } + inline LockResponse& operator=(LockResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const LockResponse& default_instance() { + return *internal_default_instance(); + } + static inline const LockResponse* internal_default_instance() { + return reinterpret_cast( + &_LockResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 11; + + friend void swap(LockResponse& a, LockResponse& b) { + a.Swap(&b); + } + inline void Swap(LockResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(LockResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + LockResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const LockResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const LockResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(LockResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.LockResponse"; + } + protected: + explicit LockResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kWinchResultFieldNumber = 1, + }; + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + bool has_winch_result() const; + private: + bool _internal_has_winch_result() const; + public: + void clear_winch_result(); + const ::mavsdk::rpc::winch::WinchResult& winch_result() const; + PROTOBUF_NODISCARD ::mavsdk::rpc::winch::WinchResult* release_winch_result(); + ::mavsdk::rpc::winch::WinchResult* mutable_winch_result(); + void set_allocated_winch_result(::mavsdk::rpc::winch::WinchResult* winch_result); + private: + const ::mavsdk::rpc::winch::WinchResult& _internal_winch_result() const; + ::mavsdk::rpc::winch::WinchResult* _internal_mutable_winch_result(); + public: + void unsafe_arena_set_allocated_winch_result( + ::mavsdk::rpc::winch::WinchResult* winch_result); + ::mavsdk::rpc::winch::WinchResult* unsafe_arena_release_winch_result(); + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.LockResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::mavsdk::rpc::winch::WinchResult* winch_result_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class DeliverRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.DeliverRequest) */ { + public: + inline DeliverRequest() : DeliverRequest(nullptr) {} + ~DeliverRequest() override; + explicit PROTOBUF_CONSTEXPR DeliverRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DeliverRequest(const DeliverRequest& from); + DeliverRequest(DeliverRequest&& from) noexcept + : DeliverRequest() { + *this = ::std::move(from); + } + + inline DeliverRequest& operator=(const DeliverRequest& from) { + CopyFrom(from); + return *this; + } + inline DeliverRequest& operator=(DeliverRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DeliverRequest& default_instance() { + return *internal_default_instance(); + } + static inline const DeliverRequest* internal_default_instance() { + return reinterpret_cast( + &_DeliverRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 12; + + friend void swap(DeliverRequest& a, DeliverRequest& b) { + a.Swap(&b); + } + inline void Swap(DeliverRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DeliverRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DeliverRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DeliverRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const DeliverRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DeliverRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.DeliverRequest"; + } + protected: + explicit DeliverRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInstanceFieldNumber = 1, + }; + // uint32 instance = 1; + void clear_instance(); + uint32_t instance() const; + void set_instance(uint32_t value); + private: + uint32_t _internal_instance() const; + void _internal_set_instance(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.DeliverRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + uint32_t instance_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class DeliverResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.DeliverResponse) */ { + public: + inline DeliverResponse() : DeliverResponse(nullptr) {} + ~DeliverResponse() override; + explicit PROTOBUF_CONSTEXPR DeliverResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DeliverResponse(const DeliverResponse& from); + DeliverResponse(DeliverResponse&& from) noexcept + : DeliverResponse() { + *this = ::std::move(from); + } + + inline DeliverResponse& operator=(const DeliverResponse& from) { + CopyFrom(from); + return *this; + } + inline DeliverResponse& operator=(DeliverResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DeliverResponse& default_instance() { + return *internal_default_instance(); + } + static inline const DeliverResponse* internal_default_instance() { + return reinterpret_cast( + &_DeliverResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 13; + + friend void swap(DeliverResponse& a, DeliverResponse& b) { + a.Swap(&b); + } + inline void Swap(DeliverResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DeliverResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DeliverResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DeliverResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const DeliverResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DeliverResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.DeliverResponse"; + } + protected: + explicit DeliverResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kWinchResultFieldNumber = 1, + }; + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + bool has_winch_result() const; + private: + bool _internal_has_winch_result() const; + public: + void clear_winch_result(); + const ::mavsdk::rpc::winch::WinchResult& winch_result() const; + PROTOBUF_NODISCARD ::mavsdk::rpc::winch::WinchResult* release_winch_result(); + ::mavsdk::rpc::winch::WinchResult* mutable_winch_result(); + void set_allocated_winch_result(::mavsdk::rpc::winch::WinchResult* winch_result); + private: + const ::mavsdk::rpc::winch::WinchResult& _internal_winch_result() const; + ::mavsdk::rpc::winch::WinchResult* _internal_mutable_winch_result(); + public: + void unsafe_arena_set_allocated_winch_result( + ::mavsdk::rpc::winch::WinchResult* winch_result); + ::mavsdk::rpc::winch::WinchResult* unsafe_arena_release_winch_result(); + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.DeliverResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::mavsdk::rpc::winch::WinchResult* winch_result_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class HoldRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.HoldRequest) */ { + public: + inline HoldRequest() : HoldRequest(nullptr) {} + ~HoldRequest() override; + explicit PROTOBUF_CONSTEXPR HoldRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + HoldRequest(const HoldRequest& from); + HoldRequest(HoldRequest&& from) noexcept + : HoldRequest() { + *this = ::std::move(from); + } + + inline HoldRequest& operator=(const HoldRequest& from) { + CopyFrom(from); + return *this; + } + inline HoldRequest& operator=(HoldRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const HoldRequest& default_instance() { + return *internal_default_instance(); + } + static inline const HoldRequest* internal_default_instance() { + return reinterpret_cast( + &_HoldRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 14; + + friend void swap(HoldRequest& a, HoldRequest& b) { + a.Swap(&b); + } + inline void Swap(HoldRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(HoldRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + HoldRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const HoldRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const HoldRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(HoldRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.HoldRequest"; + } + protected: + explicit HoldRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInstanceFieldNumber = 1, + }; + // uint32 instance = 1; + void clear_instance(); + uint32_t instance() const; + void set_instance(uint32_t value); + private: + uint32_t _internal_instance() const; + void _internal_set_instance(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.HoldRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + uint32_t instance_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class HoldResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.HoldResponse) */ { + public: + inline HoldResponse() : HoldResponse(nullptr) {} + ~HoldResponse() override; + explicit PROTOBUF_CONSTEXPR HoldResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + HoldResponse(const HoldResponse& from); + HoldResponse(HoldResponse&& from) noexcept + : HoldResponse() { + *this = ::std::move(from); + } + + inline HoldResponse& operator=(const HoldResponse& from) { + CopyFrom(from); + return *this; + } + inline HoldResponse& operator=(HoldResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const HoldResponse& default_instance() { + return *internal_default_instance(); + } + static inline const HoldResponse* internal_default_instance() { + return reinterpret_cast( + &_HoldResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 15; + + friend void swap(HoldResponse& a, HoldResponse& b) { + a.Swap(&b); + } + inline void Swap(HoldResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(HoldResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + HoldResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const HoldResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const HoldResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(HoldResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.HoldResponse"; + } + protected: + explicit HoldResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kWinchResultFieldNumber = 1, + }; + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + bool has_winch_result() const; + private: + bool _internal_has_winch_result() const; + public: + void clear_winch_result(); + const ::mavsdk::rpc::winch::WinchResult& winch_result() const; + PROTOBUF_NODISCARD ::mavsdk::rpc::winch::WinchResult* release_winch_result(); + ::mavsdk::rpc::winch::WinchResult* mutable_winch_result(); + void set_allocated_winch_result(::mavsdk::rpc::winch::WinchResult* winch_result); + private: + const ::mavsdk::rpc::winch::WinchResult& _internal_winch_result() const; + ::mavsdk::rpc::winch::WinchResult* _internal_mutable_winch_result(); + public: + void unsafe_arena_set_allocated_winch_result( + ::mavsdk::rpc::winch::WinchResult* winch_result); + ::mavsdk::rpc::winch::WinchResult* unsafe_arena_release_winch_result(); + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.HoldResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::mavsdk::rpc::winch::WinchResult* winch_result_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class RetractRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.RetractRequest) */ { + public: + inline RetractRequest() : RetractRequest(nullptr) {} + ~RetractRequest() override; + explicit PROTOBUF_CONSTEXPR RetractRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RetractRequest(const RetractRequest& from); + RetractRequest(RetractRequest&& from) noexcept + : RetractRequest() { + *this = ::std::move(from); + } + + inline RetractRequest& operator=(const RetractRequest& from) { + CopyFrom(from); + return *this; + } + inline RetractRequest& operator=(RetractRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RetractRequest& default_instance() { + return *internal_default_instance(); + } + static inline const RetractRequest* internal_default_instance() { + return reinterpret_cast( + &_RetractRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 16; + + friend void swap(RetractRequest& a, RetractRequest& b) { + a.Swap(&b); + } + inline void Swap(RetractRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RetractRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RetractRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RetractRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const RetractRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RetractRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.RetractRequest"; + } + protected: + explicit RetractRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInstanceFieldNumber = 1, + }; + // uint32 instance = 1; + void clear_instance(); + uint32_t instance() const; + void set_instance(uint32_t value); + private: + uint32_t _internal_instance() const; + void _internal_set_instance(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.RetractRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + uint32_t instance_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class RetractResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.RetractResponse) */ { + public: + inline RetractResponse() : RetractResponse(nullptr) {} + ~RetractResponse() override; + explicit PROTOBUF_CONSTEXPR RetractResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + RetractResponse(const RetractResponse& from); + RetractResponse(RetractResponse&& from) noexcept + : RetractResponse() { + *this = ::std::move(from); + } + + inline RetractResponse& operator=(const RetractResponse& from) { + CopyFrom(from); + return *this; + } + inline RetractResponse& operator=(RetractResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const RetractResponse& default_instance() { + return *internal_default_instance(); + } + static inline const RetractResponse* internal_default_instance() { + return reinterpret_cast( + &_RetractResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 17; + + friend void swap(RetractResponse& a, RetractResponse& b) { + a.Swap(&b); + } + inline void Swap(RetractResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(RetractResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + RetractResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const RetractResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const RetractResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(RetractResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.RetractResponse"; + } + protected: + explicit RetractResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kWinchResultFieldNumber = 1, + }; + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + bool has_winch_result() const; + private: + bool _internal_has_winch_result() const; + public: + void clear_winch_result(); + const ::mavsdk::rpc::winch::WinchResult& winch_result() const; + PROTOBUF_NODISCARD ::mavsdk::rpc::winch::WinchResult* release_winch_result(); + ::mavsdk::rpc::winch::WinchResult* mutable_winch_result(); + void set_allocated_winch_result(::mavsdk::rpc::winch::WinchResult* winch_result); + private: + const ::mavsdk::rpc::winch::WinchResult& _internal_winch_result() const; + ::mavsdk::rpc::winch::WinchResult* _internal_mutable_winch_result(); + public: + void unsafe_arena_set_allocated_winch_result( + ::mavsdk::rpc::winch::WinchResult* winch_result); + ::mavsdk::rpc::winch::WinchResult* unsafe_arena_release_winch_result(); + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.RetractResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::mavsdk::rpc::winch::WinchResult* winch_result_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class LoadLineRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.LoadLineRequest) */ { + public: + inline LoadLineRequest() : LoadLineRequest(nullptr) {} + ~LoadLineRequest() override; + explicit PROTOBUF_CONSTEXPR LoadLineRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + LoadLineRequest(const LoadLineRequest& from); + LoadLineRequest(LoadLineRequest&& from) noexcept + : LoadLineRequest() { + *this = ::std::move(from); + } + + inline LoadLineRequest& operator=(const LoadLineRequest& from) { + CopyFrom(from); + return *this; + } + inline LoadLineRequest& operator=(LoadLineRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const LoadLineRequest& default_instance() { + return *internal_default_instance(); + } + static inline const LoadLineRequest* internal_default_instance() { + return reinterpret_cast( + &_LoadLineRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 18; + + friend void swap(LoadLineRequest& a, LoadLineRequest& b) { + a.Swap(&b); + } + inline void Swap(LoadLineRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(LoadLineRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + LoadLineRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const LoadLineRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const LoadLineRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(LoadLineRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.LoadLineRequest"; + } + protected: + explicit LoadLineRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInstanceFieldNumber = 1, + }; + // uint32 instance = 1; + void clear_instance(); + uint32_t instance() const; + void set_instance(uint32_t value); + private: + uint32_t _internal_instance() const; + void _internal_set_instance(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.LoadLineRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + uint32_t instance_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class LoadLineResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.LoadLineResponse) */ { + public: + inline LoadLineResponse() : LoadLineResponse(nullptr) {} + ~LoadLineResponse() override; + explicit PROTOBUF_CONSTEXPR LoadLineResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + LoadLineResponse(const LoadLineResponse& from); + LoadLineResponse(LoadLineResponse&& from) noexcept + : LoadLineResponse() { + *this = ::std::move(from); + } + + inline LoadLineResponse& operator=(const LoadLineResponse& from) { + CopyFrom(from); + return *this; + } + inline LoadLineResponse& operator=(LoadLineResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const LoadLineResponse& default_instance() { + return *internal_default_instance(); + } + static inline const LoadLineResponse* internal_default_instance() { + return reinterpret_cast( + &_LoadLineResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 19; + + friend void swap(LoadLineResponse& a, LoadLineResponse& b) { + a.Swap(&b); + } + inline void Swap(LoadLineResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(LoadLineResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + LoadLineResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const LoadLineResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const LoadLineResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(LoadLineResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.LoadLineResponse"; + } + protected: + explicit LoadLineResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kWinchResultFieldNumber = 1, + }; + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + bool has_winch_result() const; + private: + bool _internal_has_winch_result() const; + public: + void clear_winch_result(); + const ::mavsdk::rpc::winch::WinchResult& winch_result() const; + PROTOBUF_NODISCARD ::mavsdk::rpc::winch::WinchResult* release_winch_result(); + ::mavsdk::rpc::winch::WinchResult* mutable_winch_result(); + void set_allocated_winch_result(::mavsdk::rpc::winch::WinchResult* winch_result); + private: + const ::mavsdk::rpc::winch::WinchResult& _internal_winch_result() const; + ::mavsdk::rpc::winch::WinchResult* _internal_mutable_winch_result(); + public: + void unsafe_arena_set_allocated_winch_result( + ::mavsdk::rpc::winch::WinchResult* winch_result); + ::mavsdk::rpc::winch::WinchResult* unsafe_arena_release_winch_result(); + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.LoadLineResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::mavsdk::rpc::winch::WinchResult* winch_result_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class AbandonLineRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.AbandonLineRequest) */ { + public: + inline AbandonLineRequest() : AbandonLineRequest(nullptr) {} + ~AbandonLineRequest() override; + explicit PROTOBUF_CONSTEXPR AbandonLineRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AbandonLineRequest(const AbandonLineRequest& from); + AbandonLineRequest(AbandonLineRequest&& from) noexcept + : AbandonLineRequest() { + *this = ::std::move(from); + } + + inline AbandonLineRequest& operator=(const AbandonLineRequest& from) { + CopyFrom(from); + return *this; + } + inline AbandonLineRequest& operator=(AbandonLineRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AbandonLineRequest& default_instance() { + return *internal_default_instance(); + } + static inline const AbandonLineRequest* internal_default_instance() { + return reinterpret_cast( + &_AbandonLineRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 20; + + friend void swap(AbandonLineRequest& a, AbandonLineRequest& b) { + a.Swap(&b); + } + inline void Swap(AbandonLineRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AbandonLineRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + AbandonLineRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const AbandonLineRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const AbandonLineRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AbandonLineRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.AbandonLineRequest"; + } + protected: + explicit AbandonLineRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInstanceFieldNumber = 1, + }; + // uint32 instance = 1; + void clear_instance(); + uint32_t instance() const; + void set_instance(uint32_t value); + private: + uint32_t _internal_instance() const; + void _internal_set_instance(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.AbandonLineRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + uint32_t instance_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class AbandonLineResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.AbandonLineResponse) */ { + public: + inline AbandonLineResponse() : AbandonLineResponse(nullptr) {} + ~AbandonLineResponse() override; + explicit PROTOBUF_CONSTEXPR AbandonLineResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + AbandonLineResponse(const AbandonLineResponse& from); + AbandonLineResponse(AbandonLineResponse&& from) noexcept + : AbandonLineResponse() { + *this = ::std::move(from); + } + + inline AbandonLineResponse& operator=(const AbandonLineResponse& from) { + CopyFrom(from); + return *this; + } + inline AbandonLineResponse& operator=(AbandonLineResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const AbandonLineResponse& default_instance() { + return *internal_default_instance(); + } + static inline const AbandonLineResponse* internal_default_instance() { + return reinterpret_cast( + &_AbandonLineResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 21; + + friend void swap(AbandonLineResponse& a, AbandonLineResponse& b) { + a.Swap(&b); + } + inline void Swap(AbandonLineResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AbandonLineResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + AbandonLineResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const AbandonLineResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const AbandonLineResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(AbandonLineResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.AbandonLineResponse"; + } + protected: + explicit AbandonLineResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kWinchResultFieldNumber = 1, + }; + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + bool has_winch_result() const; + private: + bool _internal_has_winch_result() const; + public: + void clear_winch_result(); + const ::mavsdk::rpc::winch::WinchResult& winch_result() const; + PROTOBUF_NODISCARD ::mavsdk::rpc::winch::WinchResult* release_winch_result(); + ::mavsdk::rpc::winch::WinchResult* mutable_winch_result(); + void set_allocated_winch_result(::mavsdk::rpc::winch::WinchResult* winch_result); + private: + const ::mavsdk::rpc::winch::WinchResult& _internal_winch_result() const; + ::mavsdk::rpc::winch::WinchResult* _internal_mutable_winch_result(); + public: + void unsafe_arena_set_allocated_winch_result( + ::mavsdk::rpc::winch::WinchResult* winch_result); + ::mavsdk::rpc::winch::WinchResult* unsafe_arena_release_winch_result(); + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.AbandonLineResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::mavsdk::rpc::winch::WinchResult* winch_result_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class LoadPayloadRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.LoadPayloadRequest) */ { + public: + inline LoadPayloadRequest() : LoadPayloadRequest(nullptr) {} + ~LoadPayloadRequest() override; + explicit PROTOBUF_CONSTEXPR LoadPayloadRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + LoadPayloadRequest(const LoadPayloadRequest& from); + LoadPayloadRequest(LoadPayloadRequest&& from) noexcept + : LoadPayloadRequest() { + *this = ::std::move(from); + } + + inline LoadPayloadRequest& operator=(const LoadPayloadRequest& from) { + CopyFrom(from); + return *this; + } + inline LoadPayloadRequest& operator=(LoadPayloadRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const LoadPayloadRequest& default_instance() { + return *internal_default_instance(); + } + static inline const LoadPayloadRequest* internal_default_instance() { + return reinterpret_cast( + &_LoadPayloadRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 22; + + friend void swap(LoadPayloadRequest& a, LoadPayloadRequest& b) { + a.Swap(&b); + } + inline void Swap(LoadPayloadRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(LoadPayloadRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + LoadPayloadRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const LoadPayloadRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const LoadPayloadRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(LoadPayloadRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.LoadPayloadRequest"; + } + protected: + explicit LoadPayloadRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInstanceFieldNumber = 1, + }; + // uint32 instance = 1; + void clear_instance(); + uint32_t instance() const; + void set_instance(uint32_t value); + private: + uint32_t _internal_instance() const; + void _internal_set_instance(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.LoadPayloadRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + uint32_t instance_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class LoadPayloadResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.LoadPayloadResponse) */ { + public: + inline LoadPayloadResponse() : LoadPayloadResponse(nullptr) {} + ~LoadPayloadResponse() override; + explicit PROTOBUF_CONSTEXPR LoadPayloadResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + LoadPayloadResponse(const LoadPayloadResponse& from); + LoadPayloadResponse(LoadPayloadResponse&& from) noexcept + : LoadPayloadResponse() { + *this = ::std::move(from); + } + + inline LoadPayloadResponse& operator=(const LoadPayloadResponse& from) { + CopyFrom(from); + return *this; + } + inline LoadPayloadResponse& operator=(LoadPayloadResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const LoadPayloadResponse& default_instance() { + return *internal_default_instance(); + } + static inline const LoadPayloadResponse* internal_default_instance() { + return reinterpret_cast( + &_LoadPayloadResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 23; + + friend void swap(LoadPayloadResponse& a, LoadPayloadResponse& b) { + a.Swap(&b); + } + inline void Swap(LoadPayloadResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(LoadPayloadResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + LoadPayloadResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const LoadPayloadResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const LoadPayloadResponse& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(LoadPayloadResponse* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.LoadPayloadResponse"; + } + protected: + explicit LoadPayloadResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kWinchResultFieldNumber = 1, + }; + // .mavsdk.rpc.winch.WinchResult winch_result = 1; + bool has_winch_result() const; + private: + bool _internal_has_winch_result() const; + public: + void clear_winch_result(); + const ::mavsdk::rpc::winch::WinchResult& winch_result() const; + PROTOBUF_NODISCARD ::mavsdk::rpc::winch::WinchResult* release_winch_result(); + ::mavsdk::rpc::winch::WinchResult* mutable_winch_result(); + void set_allocated_winch_result(::mavsdk::rpc::winch::WinchResult* winch_result); + private: + const ::mavsdk::rpc::winch::WinchResult& _internal_winch_result() const; + ::mavsdk::rpc::winch::WinchResult* _internal_mutable_winch_result(); + public: + void unsafe_arena_set_allocated_winch_result( + ::mavsdk::rpc::winch::WinchResult* winch_result); + ::mavsdk::rpc::winch::WinchResult* unsafe_arena_release_winch_result(); + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.LoadPayloadResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::mavsdk::rpc::winch::WinchResult* winch_result_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// ------------------------------------------------------------------- + +class WinchResult final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:mavsdk.rpc.winch.WinchResult) */ { + public: + inline WinchResult() : WinchResult(nullptr) {} + ~WinchResult() override; + explicit PROTOBUF_CONSTEXPR WinchResult(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + WinchResult(const WinchResult& from); + WinchResult(WinchResult&& from) noexcept + : WinchResult() { + *this = ::std::move(from); + } + + inline WinchResult& operator=(const WinchResult& from) { + CopyFrom(from); + return *this; + } + inline WinchResult& operator=(WinchResult&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const WinchResult& default_instance() { + return *internal_default_instance(); + } + static inline const WinchResult* internal_default_instance() { + return reinterpret_cast( + &_WinchResult_default_instance_); + } + static constexpr int kIndexInFileMessages = + 24; + + friend void swap(WinchResult& a, WinchResult& b) { + a.Swap(&b); + } + inline void Swap(WinchResult* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(WinchResult* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + WinchResult* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const WinchResult& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const WinchResult& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(WinchResult* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "mavsdk.rpc.winch.WinchResult"; + } + protected: + explicit WinchResult(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef WinchResult_Result Result; + static constexpr Result RESULT_UNKNOWN = + WinchResult_Result_RESULT_UNKNOWN; + static constexpr Result RESULT_SUCCESS = + WinchResult_Result_RESULT_SUCCESS; + static constexpr Result RESULT_NO_SYSTEM = + WinchResult_Result_RESULT_NO_SYSTEM; + static constexpr Result RESULT_BUSY = + WinchResult_Result_RESULT_BUSY; + static constexpr Result RESULT_TIMEOUT = + WinchResult_Result_RESULT_TIMEOUT; + static constexpr Result RESULT_UNSUPPORTED = + WinchResult_Result_RESULT_UNSUPPORTED; + static constexpr Result RESULT_FAILED = + WinchResult_Result_RESULT_FAILED; + static inline bool Result_IsValid(int value) { + return WinchResult_Result_IsValid(value); + } + static constexpr Result Result_MIN = + WinchResult_Result_Result_MIN; + static constexpr Result Result_MAX = + WinchResult_Result_Result_MAX; + static constexpr int Result_ARRAYSIZE = + WinchResult_Result_Result_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + Result_descriptor() { + return WinchResult_Result_descriptor(); + } + template + static inline const std::string& Result_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Result_Name."); + return WinchResult_Result_Name(enum_t_value); + } + static inline bool Result_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Result* value) { + return WinchResult_Result_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kResultStrFieldNumber = 2, + kResultFieldNumber = 1, + }; + // string result_str = 2; + void clear_result_str(); + const std::string& result_str() const; + template + void set_result_str(ArgT0&& arg0, ArgT... args); + std::string* mutable_result_str(); + PROTOBUF_NODISCARD std::string* release_result_str(); + void set_allocated_result_str(std::string* result_str); + private: + const std::string& _internal_result_str() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_result_str(const std::string& value); + std::string* _internal_mutable_result_str(); + public: + + // .mavsdk.rpc.winch.WinchResult.Result result = 1; + void clear_result(); + ::mavsdk::rpc::winch::WinchResult_Result result() const; + void set_result(::mavsdk::rpc::winch::WinchResult_Result value); + private: + ::mavsdk::rpc::winch::WinchResult_Result _internal_result() const; + void _internal_set_result(::mavsdk::rpc::winch::WinchResult_Result value); + public: + + // @@protoc_insertion_point(class_scope:mavsdk.rpc.winch.WinchResult) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr result_str_; + int result_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_winch_2fwinch_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// SubscribeStatusRequest + +// ------------------------------------------------------------------- + +// StatusResponse + +// .mavsdk.rpc.winch.Status status = 1; +inline bool StatusResponse::_internal_has_status() const { + return this != internal_default_instance() && status_ != nullptr; +} +inline bool StatusResponse::has_status() const { + return _internal_has_status(); +} +inline void StatusResponse::clear_status() { + if (GetArenaForAllocation() == nullptr && status_ != nullptr) { + delete status_; + } + status_ = nullptr; +} +inline const ::mavsdk::rpc::winch::Status& StatusResponse::_internal_status() const { + const ::mavsdk::rpc::winch::Status* p = status_; + return p != nullptr ? *p : reinterpret_cast( + ::mavsdk::rpc::winch::_Status_default_instance_); +} +inline const ::mavsdk::rpc::winch::Status& StatusResponse::status() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.StatusResponse.status) + return _internal_status(); +} +inline void StatusResponse::unsafe_arena_set_allocated_status( + ::mavsdk::rpc::winch::Status* status) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_); + } + status_ = status; + if (status) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mavsdk.rpc.winch.StatusResponse.status) +} +inline ::mavsdk::rpc::winch::Status* StatusResponse::release_status() { + + ::mavsdk::rpc::winch::Status* temp = status_; + status_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mavsdk::rpc::winch::Status* StatusResponse::unsafe_arena_release_status() { + // @@protoc_insertion_point(field_release:mavsdk.rpc.winch.StatusResponse.status) + + ::mavsdk::rpc::winch::Status* temp = status_; + status_ = nullptr; + return temp; +} +inline ::mavsdk::rpc::winch::Status* StatusResponse::_internal_mutable_status() { + + if (status_ == nullptr) { + auto* p = CreateMaybeMessage<::mavsdk::rpc::winch::Status>(GetArenaForAllocation()); + status_ = p; + } + return status_; +} +inline ::mavsdk::rpc::winch::Status* StatusResponse::mutable_status() { + ::mavsdk::rpc::winch::Status* _msg = _internal_mutable_status(); + // @@protoc_insertion_point(field_mutable:mavsdk.rpc.winch.StatusResponse.status) + return _msg; +} +inline void StatusResponse::set_allocated_status(::mavsdk::rpc::winch::Status* status) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete status_; + } + if (status) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(status); + if (message_arena != submessage_arena) { + status = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, status, submessage_arena); + } + + } else { + + } + status_ = status; + // @@protoc_insertion_point(field_set_allocated:mavsdk.rpc.winch.StatusResponse.status) +} + +// ------------------------------------------------------------------- + +// StatusFlags + +// bool healthy = 1; +inline void StatusFlags::clear_healthy() { + healthy_ = false; +} +inline bool StatusFlags::_internal_healthy() const { + return healthy_; +} +inline bool StatusFlags::healthy() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.StatusFlags.healthy) + return _internal_healthy(); +} +inline void StatusFlags::_internal_set_healthy(bool value) { + + healthy_ = value; +} +inline void StatusFlags::set_healthy(bool value) { + _internal_set_healthy(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.StatusFlags.healthy) +} + +// bool fully_retracted = 2; +inline void StatusFlags::clear_fully_retracted() { + fully_retracted_ = false; +} +inline bool StatusFlags::_internal_fully_retracted() const { + return fully_retracted_; +} +inline bool StatusFlags::fully_retracted() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.StatusFlags.fully_retracted) + return _internal_fully_retracted(); +} +inline void StatusFlags::_internal_set_fully_retracted(bool value) { + + fully_retracted_ = value; +} +inline void StatusFlags::set_fully_retracted(bool value) { + _internal_set_fully_retracted(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.StatusFlags.fully_retracted) +} + +// bool moving = 3; +inline void StatusFlags::clear_moving() { + moving_ = false; +} +inline bool StatusFlags::_internal_moving() const { + return moving_; +} +inline bool StatusFlags::moving() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.StatusFlags.moving) + return _internal_moving(); +} +inline void StatusFlags::_internal_set_moving(bool value) { + + moving_ = value; +} +inline void StatusFlags::set_moving(bool value) { + _internal_set_moving(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.StatusFlags.moving) +} + +// bool clutch_engaged = 4; +inline void StatusFlags::clear_clutch_engaged() { + clutch_engaged_ = false; +} +inline bool StatusFlags::_internal_clutch_engaged() const { + return clutch_engaged_; +} +inline bool StatusFlags::clutch_engaged() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.StatusFlags.clutch_engaged) + return _internal_clutch_engaged(); +} +inline void StatusFlags::_internal_set_clutch_engaged(bool value) { + + clutch_engaged_ = value; +} +inline void StatusFlags::set_clutch_engaged(bool value) { + _internal_set_clutch_engaged(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.StatusFlags.clutch_engaged) +} + +// bool locked = 5; +inline void StatusFlags::clear_locked() { + locked_ = false; +} +inline bool StatusFlags::_internal_locked() const { + return locked_; +} +inline bool StatusFlags::locked() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.StatusFlags.locked) + return _internal_locked(); +} +inline void StatusFlags::_internal_set_locked(bool value) { + + locked_ = value; +} +inline void StatusFlags::set_locked(bool value) { + _internal_set_locked(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.StatusFlags.locked) +} + +// bool dropping = 6; +inline void StatusFlags::clear_dropping() { + dropping_ = false; +} +inline bool StatusFlags::_internal_dropping() const { + return dropping_; +} +inline bool StatusFlags::dropping() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.StatusFlags.dropping) + return _internal_dropping(); +} +inline void StatusFlags::_internal_set_dropping(bool value) { + + dropping_ = value; +} +inline void StatusFlags::set_dropping(bool value) { + _internal_set_dropping(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.StatusFlags.dropping) +} + +// bool arresting = 7; +inline void StatusFlags::clear_arresting() { + arresting_ = false; +} +inline bool StatusFlags::_internal_arresting() const { + return arresting_; +} +inline bool StatusFlags::arresting() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.StatusFlags.arresting) + return _internal_arresting(); +} +inline void StatusFlags::_internal_set_arresting(bool value) { + + arresting_ = value; +} +inline void StatusFlags::set_arresting(bool value) { + _internal_set_arresting(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.StatusFlags.arresting) +} + +// bool ground_sense = 8; +inline void StatusFlags::clear_ground_sense() { + ground_sense_ = false; +} +inline bool StatusFlags::_internal_ground_sense() const { + return ground_sense_; +} +inline bool StatusFlags::ground_sense() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.StatusFlags.ground_sense) + return _internal_ground_sense(); +} +inline void StatusFlags::_internal_set_ground_sense(bool value) { + + ground_sense_ = value; +} +inline void StatusFlags::set_ground_sense(bool value) { + _internal_set_ground_sense(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.StatusFlags.ground_sense) +} + +// bool retracting = 9; +inline void StatusFlags::clear_retracting() { + retracting_ = false; +} +inline bool StatusFlags::_internal_retracting() const { + return retracting_; +} +inline bool StatusFlags::retracting() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.StatusFlags.retracting) + return _internal_retracting(); +} +inline void StatusFlags::_internal_set_retracting(bool value) { + + retracting_ = value; +} +inline void StatusFlags::set_retracting(bool value) { + _internal_set_retracting(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.StatusFlags.retracting) +} + +// bool redeliver = 10; +inline void StatusFlags::clear_redeliver() { + redeliver_ = false; +} +inline bool StatusFlags::_internal_redeliver() const { + return redeliver_; +} +inline bool StatusFlags::redeliver() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.StatusFlags.redeliver) + return _internal_redeliver(); +} +inline void StatusFlags::_internal_set_redeliver(bool value) { + + redeliver_ = value; +} +inline void StatusFlags::set_redeliver(bool value) { + _internal_set_redeliver(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.StatusFlags.redeliver) +} + +// bool abandon_line = 11; +inline void StatusFlags::clear_abandon_line() { + abandon_line_ = false; +} +inline bool StatusFlags::_internal_abandon_line() const { + return abandon_line_; +} +inline bool StatusFlags::abandon_line() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.StatusFlags.abandon_line) + return _internal_abandon_line(); +} +inline void StatusFlags::_internal_set_abandon_line(bool value) { + + abandon_line_ = value; +} +inline void StatusFlags::set_abandon_line(bool value) { + _internal_set_abandon_line(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.StatusFlags.abandon_line) +} + +// bool locking = 12; +inline void StatusFlags::clear_locking() { + locking_ = false; +} +inline bool StatusFlags::_internal_locking() const { + return locking_; +} +inline bool StatusFlags::locking() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.StatusFlags.locking) + return _internal_locking(); +} +inline void StatusFlags::_internal_set_locking(bool value) { + + locking_ = value; +} +inline void StatusFlags::set_locking(bool value) { + _internal_set_locking(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.StatusFlags.locking) +} + +// bool load_line = 13; +inline void StatusFlags::clear_load_line() { + load_line_ = false; +} +inline bool StatusFlags::_internal_load_line() const { + return load_line_; +} +inline bool StatusFlags::load_line() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.StatusFlags.load_line) + return _internal_load_line(); +} +inline void StatusFlags::_internal_set_load_line(bool value) { + + load_line_ = value; +} +inline void StatusFlags::set_load_line(bool value) { + _internal_set_load_line(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.StatusFlags.load_line) +} + +// bool load_payload = 14; +inline void StatusFlags::clear_load_payload() { + load_payload_ = false; +} +inline bool StatusFlags::_internal_load_payload() const { + return load_payload_; +} +inline bool StatusFlags::load_payload() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.StatusFlags.load_payload) + return _internal_load_payload(); +} +inline void StatusFlags::_internal_set_load_payload(bool value) { + + load_payload_ = value; +} +inline void StatusFlags::set_load_payload(bool value) { + _internal_set_load_payload(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.StatusFlags.load_payload) +} + +// ------------------------------------------------------------------- + +// Status + +// uint64 time_usec = 1; +inline void Status::clear_time_usec() { + time_usec_ = uint64_t{0u}; +} +inline uint64_t Status::_internal_time_usec() const { + return time_usec_; +} +inline uint64_t Status::time_usec() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.Status.time_usec) + return _internal_time_usec(); +} +inline void Status::_internal_set_time_usec(uint64_t value) { + + time_usec_ = value; +} +inline void Status::set_time_usec(uint64_t value) { + _internal_set_time_usec(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.Status.time_usec) +} + +// float line_length_m = 2; +inline void Status::clear_line_length_m() { + line_length_m_ = 0; +} +inline float Status::_internal_line_length_m() const { + return line_length_m_; +} +inline float Status::line_length_m() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.Status.line_length_m) + return _internal_line_length_m(); +} +inline void Status::_internal_set_line_length_m(float value) { + + line_length_m_ = value; +} +inline void Status::set_line_length_m(float value) { + _internal_set_line_length_m(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.Status.line_length_m) +} + +// float speed_m_s = 3; +inline void Status::clear_speed_m_s() { + speed_m_s_ = 0; +} +inline float Status::_internal_speed_m_s() const { + return speed_m_s_; +} +inline float Status::speed_m_s() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.Status.speed_m_s) + return _internal_speed_m_s(); +} +inline void Status::_internal_set_speed_m_s(float value) { + + speed_m_s_ = value; +} +inline void Status::set_speed_m_s(float value) { + _internal_set_speed_m_s(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.Status.speed_m_s) +} + +// float tension_kg = 4; +inline void Status::clear_tension_kg() { + tension_kg_ = 0; +} +inline float Status::_internal_tension_kg() const { + return tension_kg_; +} +inline float Status::tension_kg() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.Status.tension_kg) + return _internal_tension_kg(); +} +inline void Status::_internal_set_tension_kg(float value) { + + tension_kg_ = value; +} +inline void Status::set_tension_kg(float value) { + _internal_set_tension_kg(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.Status.tension_kg) +} + +// float voltage_v = 5; +inline void Status::clear_voltage_v() { + voltage_v_ = 0; +} +inline float Status::_internal_voltage_v() const { + return voltage_v_; +} +inline float Status::voltage_v() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.Status.voltage_v) + return _internal_voltage_v(); +} +inline void Status::_internal_set_voltage_v(float value) { + + voltage_v_ = value; +} +inline void Status::set_voltage_v(float value) { + _internal_set_voltage_v(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.Status.voltage_v) +} + +// float current_a = 6; +inline void Status::clear_current_a() { + current_a_ = 0; +} +inline float Status::_internal_current_a() const { + return current_a_; +} +inline float Status::current_a() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.Status.current_a) + return _internal_current_a(); +} +inline void Status::_internal_set_current_a(float value) { + + current_a_ = value; +} +inline void Status::set_current_a(float value) { + _internal_set_current_a(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.Status.current_a) +} + +// int32 temperature_c = 7; +inline void Status::clear_temperature_c() { + temperature_c_ = 0; +} +inline int32_t Status::_internal_temperature_c() const { + return temperature_c_; +} +inline int32_t Status::temperature_c() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.Status.temperature_c) + return _internal_temperature_c(); +} +inline void Status::_internal_set_temperature_c(int32_t value) { + + temperature_c_ = value; +} +inline void Status::set_temperature_c(int32_t value) { + _internal_set_temperature_c(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.Status.temperature_c) +} + +// .mavsdk.rpc.winch.StatusFlags status_flags = 8; +inline bool Status::_internal_has_status_flags() const { + return this != internal_default_instance() && status_flags_ != nullptr; +} +inline bool Status::has_status_flags() const { + return _internal_has_status_flags(); +} +inline void Status::clear_status_flags() { + if (GetArenaForAllocation() == nullptr && status_flags_ != nullptr) { + delete status_flags_; + } + status_flags_ = nullptr; +} +inline const ::mavsdk::rpc::winch::StatusFlags& Status::_internal_status_flags() const { + const ::mavsdk::rpc::winch::StatusFlags* p = status_flags_; + return p != nullptr ? *p : reinterpret_cast( + ::mavsdk::rpc::winch::_StatusFlags_default_instance_); +} +inline const ::mavsdk::rpc::winch::StatusFlags& Status::status_flags() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.Status.status_flags) + return _internal_status_flags(); +} +inline void Status::unsafe_arena_set_allocated_status_flags( + ::mavsdk::rpc::winch::StatusFlags* status_flags) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(status_flags_); + } + status_flags_ = status_flags; + if (status_flags) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mavsdk.rpc.winch.Status.status_flags) +} +inline ::mavsdk::rpc::winch::StatusFlags* Status::release_status_flags() { + + ::mavsdk::rpc::winch::StatusFlags* temp = status_flags_; + status_flags_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mavsdk::rpc::winch::StatusFlags* Status::unsafe_arena_release_status_flags() { + // @@protoc_insertion_point(field_release:mavsdk.rpc.winch.Status.status_flags) + + ::mavsdk::rpc::winch::StatusFlags* temp = status_flags_; + status_flags_ = nullptr; + return temp; +} +inline ::mavsdk::rpc::winch::StatusFlags* Status::_internal_mutable_status_flags() { + + if (status_flags_ == nullptr) { + auto* p = CreateMaybeMessage<::mavsdk::rpc::winch::StatusFlags>(GetArenaForAllocation()); + status_flags_ = p; + } + return status_flags_; +} +inline ::mavsdk::rpc::winch::StatusFlags* Status::mutable_status_flags() { + ::mavsdk::rpc::winch::StatusFlags* _msg = _internal_mutable_status_flags(); + // @@protoc_insertion_point(field_mutable:mavsdk.rpc.winch.Status.status_flags) + return _msg; +} +inline void Status::set_allocated_status_flags(::mavsdk::rpc::winch::StatusFlags* status_flags) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete status_flags_; + } + if (status_flags) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(status_flags); + if (message_arena != submessage_arena) { + status_flags = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, status_flags, submessage_arena); + } + + } else { + + } + status_flags_ = status_flags; + // @@protoc_insertion_point(field_set_allocated:mavsdk.rpc.winch.Status.status_flags) +} + +// ------------------------------------------------------------------- + +// RelaxRequest + +// uint32 instance = 1; +inline void RelaxRequest::clear_instance() { + instance_ = 0u; +} +inline uint32_t RelaxRequest::_internal_instance() const { + return instance_; +} +inline uint32_t RelaxRequest::instance() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.RelaxRequest.instance) + return _internal_instance(); +} +inline void RelaxRequest::_internal_set_instance(uint32_t value) { + + instance_ = value; +} +inline void RelaxRequest::set_instance(uint32_t value) { + _internal_set_instance(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.RelaxRequest.instance) +} + +// ------------------------------------------------------------------- + +// RelaxResponse + +// .mavsdk.rpc.winch.WinchResult winch_result = 1; +inline bool RelaxResponse::_internal_has_winch_result() const { + return this != internal_default_instance() && winch_result_ != nullptr; +} +inline bool RelaxResponse::has_winch_result() const { + return _internal_has_winch_result(); +} +inline void RelaxResponse::clear_winch_result() { + if (GetArenaForAllocation() == nullptr && winch_result_ != nullptr) { + delete winch_result_; + } + winch_result_ = nullptr; +} +inline const ::mavsdk::rpc::winch::WinchResult& RelaxResponse::_internal_winch_result() const { + const ::mavsdk::rpc::winch::WinchResult* p = winch_result_; + return p != nullptr ? *p : reinterpret_cast( + ::mavsdk::rpc::winch::_WinchResult_default_instance_); +} +inline const ::mavsdk::rpc::winch::WinchResult& RelaxResponse::winch_result() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.RelaxResponse.winch_result) + return _internal_winch_result(); +} +inline void RelaxResponse::unsafe_arena_set_allocated_winch_result( + ::mavsdk::rpc::winch::WinchResult* winch_result) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(winch_result_); + } + winch_result_ = winch_result; + if (winch_result) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mavsdk.rpc.winch.RelaxResponse.winch_result) +} +inline ::mavsdk::rpc::winch::WinchResult* RelaxResponse::release_winch_result() { + + ::mavsdk::rpc::winch::WinchResult* temp = winch_result_; + winch_result_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mavsdk::rpc::winch::WinchResult* RelaxResponse::unsafe_arena_release_winch_result() { + // @@protoc_insertion_point(field_release:mavsdk.rpc.winch.RelaxResponse.winch_result) + + ::mavsdk::rpc::winch::WinchResult* temp = winch_result_; + winch_result_ = nullptr; + return temp; +} +inline ::mavsdk::rpc::winch::WinchResult* RelaxResponse::_internal_mutable_winch_result() { + + if (winch_result_ == nullptr) { + auto* p = CreateMaybeMessage<::mavsdk::rpc::winch::WinchResult>(GetArenaForAllocation()); + winch_result_ = p; + } + return winch_result_; +} +inline ::mavsdk::rpc::winch::WinchResult* RelaxResponse::mutable_winch_result() { + ::mavsdk::rpc::winch::WinchResult* _msg = _internal_mutable_winch_result(); + // @@protoc_insertion_point(field_mutable:mavsdk.rpc.winch.RelaxResponse.winch_result) + return _msg; +} +inline void RelaxResponse::set_allocated_winch_result(::mavsdk::rpc::winch::WinchResult* winch_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete winch_result_; + } + if (winch_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(winch_result); + if (message_arena != submessage_arena) { + winch_result = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, winch_result, submessage_arena); + } + + } else { + + } + winch_result_ = winch_result; + // @@protoc_insertion_point(field_set_allocated:mavsdk.rpc.winch.RelaxResponse.winch_result) +} + +// ------------------------------------------------------------------- + +// RelativeLengthControlRequest + +// uint32 instance = 1; +inline void RelativeLengthControlRequest::clear_instance() { + instance_ = 0u; +} +inline uint32_t RelativeLengthControlRequest::_internal_instance() const { + return instance_; +} +inline uint32_t RelativeLengthControlRequest::instance() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.RelativeLengthControlRequest.instance) + return _internal_instance(); +} +inline void RelativeLengthControlRequest::_internal_set_instance(uint32_t value) { + + instance_ = value; +} +inline void RelativeLengthControlRequest::set_instance(uint32_t value) { + _internal_set_instance(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.RelativeLengthControlRequest.instance) +} + +// float length_m = 2; +inline void RelativeLengthControlRequest::clear_length_m() { + length_m_ = 0; +} +inline float RelativeLengthControlRequest::_internal_length_m() const { + return length_m_; +} +inline float RelativeLengthControlRequest::length_m() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.RelativeLengthControlRequest.length_m) + return _internal_length_m(); +} +inline void RelativeLengthControlRequest::_internal_set_length_m(float value) { + + length_m_ = value; +} +inline void RelativeLengthControlRequest::set_length_m(float value) { + _internal_set_length_m(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.RelativeLengthControlRequest.length_m) +} + +// float rate_m_s = 3 [(.mavsdk.options.default_value) = "NaN"]; +inline void RelativeLengthControlRequest::clear_rate_m_s() { + rate_m_s_ = 0; +} +inline float RelativeLengthControlRequest::_internal_rate_m_s() const { + return rate_m_s_; +} +inline float RelativeLengthControlRequest::rate_m_s() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.RelativeLengthControlRequest.rate_m_s) + return _internal_rate_m_s(); +} +inline void RelativeLengthControlRequest::_internal_set_rate_m_s(float value) { + + rate_m_s_ = value; +} +inline void RelativeLengthControlRequest::set_rate_m_s(float value) { + _internal_set_rate_m_s(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.RelativeLengthControlRequest.rate_m_s) +} + +// ------------------------------------------------------------------- + +// RelativeLengthControlResponse + +// .mavsdk.rpc.winch.WinchResult winch_result = 1; +inline bool RelativeLengthControlResponse::_internal_has_winch_result() const { + return this != internal_default_instance() && winch_result_ != nullptr; +} +inline bool RelativeLengthControlResponse::has_winch_result() const { + return _internal_has_winch_result(); +} +inline void RelativeLengthControlResponse::clear_winch_result() { + if (GetArenaForAllocation() == nullptr && winch_result_ != nullptr) { + delete winch_result_; + } + winch_result_ = nullptr; +} +inline const ::mavsdk::rpc::winch::WinchResult& RelativeLengthControlResponse::_internal_winch_result() const { + const ::mavsdk::rpc::winch::WinchResult* p = winch_result_; + return p != nullptr ? *p : reinterpret_cast( + ::mavsdk::rpc::winch::_WinchResult_default_instance_); +} +inline const ::mavsdk::rpc::winch::WinchResult& RelativeLengthControlResponse::winch_result() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.RelativeLengthControlResponse.winch_result) + return _internal_winch_result(); +} +inline void RelativeLengthControlResponse::unsafe_arena_set_allocated_winch_result( + ::mavsdk::rpc::winch::WinchResult* winch_result) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(winch_result_); + } + winch_result_ = winch_result; + if (winch_result) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mavsdk.rpc.winch.RelativeLengthControlResponse.winch_result) +} +inline ::mavsdk::rpc::winch::WinchResult* RelativeLengthControlResponse::release_winch_result() { + + ::mavsdk::rpc::winch::WinchResult* temp = winch_result_; + winch_result_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mavsdk::rpc::winch::WinchResult* RelativeLengthControlResponse::unsafe_arena_release_winch_result() { + // @@protoc_insertion_point(field_release:mavsdk.rpc.winch.RelativeLengthControlResponse.winch_result) + + ::mavsdk::rpc::winch::WinchResult* temp = winch_result_; + winch_result_ = nullptr; + return temp; +} +inline ::mavsdk::rpc::winch::WinchResult* RelativeLengthControlResponse::_internal_mutable_winch_result() { + + if (winch_result_ == nullptr) { + auto* p = CreateMaybeMessage<::mavsdk::rpc::winch::WinchResult>(GetArenaForAllocation()); + winch_result_ = p; + } + return winch_result_; +} +inline ::mavsdk::rpc::winch::WinchResult* RelativeLengthControlResponse::mutable_winch_result() { + ::mavsdk::rpc::winch::WinchResult* _msg = _internal_mutable_winch_result(); + // @@protoc_insertion_point(field_mutable:mavsdk.rpc.winch.RelativeLengthControlResponse.winch_result) + return _msg; +} +inline void RelativeLengthControlResponse::set_allocated_winch_result(::mavsdk::rpc::winch::WinchResult* winch_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete winch_result_; + } + if (winch_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(winch_result); + if (message_arena != submessage_arena) { + winch_result = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, winch_result, submessage_arena); + } + + } else { + + } + winch_result_ = winch_result; + // @@protoc_insertion_point(field_set_allocated:mavsdk.rpc.winch.RelativeLengthControlResponse.winch_result) +} + +// ------------------------------------------------------------------- + +// RateControlRequest + +// uint32 instance = 1; +inline void RateControlRequest::clear_instance() { + instance_ = 0u; +} +inline uint32_t RateControlRequest::_internal_instance() const { + return instance_; +} +inline uint32_t RateControlRequest::instance() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.RateControlRequest.instance) + return _internal_instance(); +} +inline void RateControlRequest::_internal_set_instance(uint32_t value) { + + instance_ = value; +} +inline void RateControlRequest::set_instance(uint32_t value) { + _internal_set_instance(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.RateControlRequest.instance) +} + +// float rate_m_s = 2; +inline void RateControlRequest::clear_rate_m_s() { + rate_m_s_ = 0; +} +inline float RateControlRequest::_internal_rate_m_s() const { + return rate_m_s_; +} +inline float RateControlRequest::rate_m_s() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.RateControlRequest.rate_m_s) + return _internal_rate_m_s(); +} +inline void RateControlRequest::_internal_set_rate_m_s(float value) { + + rate_m_s_ = value; +} +inline void RateControlRequest::set_rate_m_s(float value) { + _internal_set_rate_m_s(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.RateControlRequest.rate_m_s) +} + +// ------------------------------------------------------------------- + +// RateControlResponse + +// .mavsdk.rpc.winch.WinchResult winch_result = 1; +inline bool RateControlResponse::_internal_has_winch_result() const { + return this != internal_default_instance() && winch_result_ != nullptr; +} +inline bool RateControlResponse::has_winch_result() const { + return _internal_has_winch_result(); +} +inline void RateControlResponse::clear_winch_result() { + if (GetArenaForAllocation() == nullptr && winch_result_ != nullptr) { + delete winch_result_; + } + winch_result_ = nullptr; +} +inline const ::mavsdk::rpc::winch::WinchResult& RateControlResponse::_internal_winch_result() const { + const ::mavsdk::rpc::winch::WinchResult* p = winch_result_; + return p != nullptr ? *p : reinterpret_cast( + ::mavsdk::rpc::winch::_WinchResult_default_instance_); +} +inline const ::mavsdk::rpc::winch::WinchResult& RateControlResponse::winch_result() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.RateControlResponse.winch_result) + return _internal_winch_result(); +} +inline void RateControlResponse::unsafe_arena_set_allocated_winch_result( + ::mavsdk::rpc::winch::WinchResult* winch_result) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(winch_result_); + } + winch_result_ = winch_result; + if (winch_result) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mavsdk.rpc.winch.RateControlResponse.winch_result) +} +inline ::mavsdk::rpc::winch::WinchResult* RateControlResponse::release_winch_result() { + + ::mavsdk::rpc::winch::WinchResult* temp = winch_result_; + winch_result_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mavsdk::rpc::winch::WinchResult* RateControlResponse::unsafe_arena_release_winch_result() { + // @@protoc_insertion_point(field_release:mavsdk.rpc.winch.RateControlResponse.winch_result) + + ::mavsdk::rpc::winch::WinchResult* temp = winch_result_; + winch_result_ = nullptr; + return temp; +} +inline ::mavsdk::rpc::winch::WinchResult* RateControlResponse::_internal_mutable_winch_result() { + + if (winch_result_ == nullptr) { + auto* p = CreateMaybeMessage<::mavsdk::rpc::winch::WinchResult>(GetArenaForAllocation()); + winch_result_ = p; + } + return winch_result_; +} +inline ::mavsdk::rpc::winch::WinchResult* RateControlResponse::mutable_winch_result() { + ::mavsdk::rpc::winch::WinchResult* _msg = _internal_mutable_winch_result(); + // @@protoc_insertion_point(field_mutable:mavsdk.rpc.winch.RateControlResponse.winch_result) + return _msg; +} +inline void RateControlResponse::set_allocated_winch_result(::mavsdk::rpc::winch::WinchResult* winch_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete winch_result_; + } + if (winch_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(winch_result); + if (message_arena != submessage_arena) { + winch_result = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, winch_result, submessage_arena); + } + + } else { + + } + winch_result_ = winch_result; + // @@protoc_insertion_point(field_set_allocated:mavsdk.rpc.winch.RateControlResponse.winch_result) +} + +// ------------------------------------------------------------------- + +// LockRequest + +// uint32 instance = 1; +inline void LockRequest::clear_instance() { + instance_ = 0u; +} +inline uint32_t LockRequest::_internal_instance() const { + return instance_; +} +inline uint32_t LockRequest::instance() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.LockRequest.instance) + return _internal_instance(); +} +inline void LockRequest::_internal_set_instance(uint32_t value) { + + instance_ = value; +} +inline void LockRequest::set_instance(uint32_t value) { + _internal_set_instance(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.LockRequest.instance) +} + +// ------------------------------------------------------------------- + +// LockResponse + +// .mavsdk.rpc.winch.WinchResult winch_result = 1; +inline bool LockResponse::_internal_has_winch_result() const { + return this != internal_default_instance() && winch_result_ != nullptr; +} +inline bool LockResponse::has_winch_result() const { + return _internal_has_winch_result(); +} +inline void LockResponse::clear_winch_result() { + if (GetArenaForAllocation() == nullptr && winch_result_ != nullptr) { + delete winch_result_; + } + winch_result_ = nullptr; +} +inline const ::mavsdk::rpc::winch::WinchResult& LockResponse::_internal_winch_result() const { + const ::mavsdk::rpc::winch::WinchResult* p = winch_result_; + return p != nullptr ? *p : reinterpret_cast( + ::mavsdk::rpc::winch::_WinchResult_default_instance_); +} +inline const ::mavsdk::rpc::winch::WinchResult& LockResponse::winch_result() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.LockResponse.winch_result) + return _internal_winch_result(); +} +inline void LockResponse::unsafe_arena_set_allocated_winch_result( + ::mavsdk::rpc::winch::WinchResult* winch_result) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(winch_result_); + } + winch_result_ = winch_result; + if (winch_result) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mavsdk.rpc.winch.LockResponse.winch_result) +} +inline ::mavsdk::rpc::winch::WinchResult* LockResponse::release_winch_result() { + + ::mavsdk::rpc::winch::WinchResult* temp = winch_result_; + winch_result_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mavsdk::rpc::winch::WinchResult* LockResponse::unsafe_arena_release_winch_result() { + // @@protoc_insertion_point(field_release:mavsdk.rpc.winch.LockResponse.winch_result) + + ::mavsdk::rpc::winch::WinchResult* temp = winch_result_; + winch_result_ = nullptr; + return temp; +} +inline ::mavsdk::rpc::winch::WinchResult* LockResponse::_internal_mutable_winch_result() { + + if (winch_result_ == nullptr) { + auto* p = CreateMaybeMessage<::mavsdk::rpc::winch::WinchResult>(GetArenaForAllocation()); + winch_result_ = p; + } + return winch_result_; +} +inline ::mavsdk::rpc::winch::WinchResult* LockResponse::mutable_winch_result() { + ::mavsdk::rpc::winch::WinchResult* _msg = _internal_mutable_winch_result(); + // @@protoc_insertion_point(field_mutable:mavsdk.rpc.winch.LockResponse.winch_result) + return _msg; +} +inline void LockResponse::set_allocated_winch_result(::mavsdk::rpc::winch::WinchResult* winch_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete winch_result_; + } + if (winch_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(winch_result); + if (message_arena != submessage_arena) { + winch_result = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, winch_result, submessage_arena); + } + + } else { + + } + winch_result_ = winch_result; + // @@protoc_insertion_point(field_set_allocated:mavsdk.rpc.winch.LockResponse.winch_result) +} + +// ------------------------------------------------------------------- + +// DeliverRequest + +// uint32 instance = 1; +inline void DeliverRequest::clear_instance() { + instance_ = 0u; +} +inline uint32_t DeliverRequest::_internal_instance() const { + return instance_; +} +inline uint32_t DeliverRequest::instance() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.DeliverRequest.instance) + return _internal_instance(); +} +inline void DeliverRequest::_internal_set_instance(uint32_t value) { + + instance_ = value; +} +inline void DeliverRequest::set_instance(uint32_t value) { + _internal_set_instance(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.DeliverRequest.instance) +} + +// ------------------------------------------------------------------- + +// DeliverResponse + +// .mavsdk.rpc.winch.WinchResult winch_result = 1; +inline bool DeliverResponse::_internal_has_winch_result() const { + return this != internal_default_instance() && winch_result_ != nullptr; +} +inline bool DeliverResponse::has_winch_result() const { + return _internal_has_winch_result(); +} +inline void DeliverResponse::clear_winch_result() { + if (GetArenaForAllocation() == nullptr && winch_result_ != nullptr) { + delete winch_result_; + } + winch_result_ = nullptr; +} +inline const ::mavsdk::rpc::winch::WinchResult& DeliverResponse::_internal_winch_result() const { + const ::mavsdk::rpc::winch::WinchResult* p = winch_result_; + return p != nullptr ? *p : reinterpret_cast( + ::mavsdk::rpc::winch::_WinchResult_default_instance_); +} +inline const ::mavsdk::rpc::winch::WinchResult& DeliverResponse::winch_result() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.DeliverResponse.winch_result) + return _internal_winch_result(); +} +inline void DeliverResponse::unsafe_arena_set_allocated_winch_result( + ::mavsdk::rpc::winch::WinchResult* winch_result) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(winch_result_); + } + winch_result_ = winch_result; + if (winch_result) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mavsdk.rpc.winch.DeliverResponse.winch_result) +} +inline ::mavsdk::rpc::winch::WinchResult* DeliverResponse::release_winch_result() { + + ::mavsdk::rpc::winch::WinchResult* temp = winch_result_; + winch_result_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mavsdk::rpc::winch::WinchResult* DeliverResponse::unsafe_arena_release_winch_result() { + // @@protoc_insertion_point(field_release:mavsdk.rpc.winch.DeliverResponse.winch_result) + + ::mavsdk::rpc::winch::WinchResult* temp = winch_result_; + winch_result_ = nullptr; + return temp; +} +inline ::mavsdk::rpc::winch::WinchResult* DeliverResponse::_internal_mutable_winch_result() { + + if (winch_result_ == nullptr) { + auto* p = CreateMaybeMessage<::mavsdk::rpc::winch::WinchResult>(GetArenaForAllocation()); + winch_result_ = p; + } + return winch_result_; +} +inline ::mavsdk::rpc::winch::WinchResult* DeliverResponse::mutable_winch_result() { + ::mavsdk::rpc::winch::WinchResult* _msg = _internal_mutable_winch_result(); + // @@protoc_insertion_point(field_mutable:mavsdk.rpc.winch.DeliverResponse.winch_result) + return _msg; +} +inline void DeliverResponse::set_allocated_winch_result(::mavsdk::rpc::winch::WinchResult* winch_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete winch_result_; + } + if (winch_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(winch_result); + if (message_arena != submessage_arena) { + winch_result = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, winch_result, submessage_arena); + } + + } else { + + } + winch_result_ = winch_result; + // @@protoc_insertion_point(field_set_allocated:mavsdk.rpc.winch.DeliverResponse.winch_result) +} + +// ------------------------------------------------------------------- + +// HoldRequest + +// uint32 instance = 1; +inline void HoldRequest::clear_instance() { + instance_ = 0u; +} +inline uint32_t HoldRequest::_internal_instance() const { + return instance_; +} +inline uint32_t HoldRequest::instance() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.HoldRequest.instance) + return _internal_instance(); +} +inline void HoldRequest::_internal_set_instance(uint32_t value) { + + instance_ = value; +} +inline void HoldRequest::set_instance(uint32_t value) { + _internal_set_instance(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.HoldRequest.instance) +} + +// ------------------------------------------------------------------- + +// HoldResponse + +// .mavsdk.rpc.winch.WinchResult winch_result = 1; +inline bool HoldResponse::_internal_has_winch_result() const { + return this != internal_default_instance() && winch_result_ != nullptr; +} +inline bool HoldResponse::has_winch_result() const { + return _internal_has_winch_result(); +} +inline void HoldResponse::clear_winch_result() { + if (GetArenaForAllocation() == nullptr && winch_result_ != nullptr) { + delete winch_result_; + } + winch_result_ = nullptr; +} +inline const ::mavsdk::rpc::winch::WinchResult& HoldResponse::_internal_winch_result() const { + const ::mavsdk::rpc::winch::WinchResult* p = winch_result_; + return p != nullptr ? *p : reinterpret_cast( + ::mavsdk::rpc::winch::_WinchResult_default_instance_); +} +inline const ::mavsdk::rpc::winch::WinchResult& HoldResponse::winch_result() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.HoldResponse.winch_result) + return _internal_winch_result(); +} +inline void HoldResponse::unsafe_arena_set_allocated_winch_result( + ::mavsdk::rpc::winch::WinchResult* winch_result) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(winch_result_); + } + winch_result_ = winch_result; + if (winch_result) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mavsdk.rpc.winch.HoldResponse.winch_result) +} +inline ::mavsdk::rpc::winch::WinchResult* HoldResponse::release_winch_result() { + + ::mavsdk::rpc::winch::WinchResult* temp = winch_result_; + winch_result_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mavsdk::rpc::winch::WinchResult* HoldResponse::unsafe_arena_release_winch_result() { + // @@protoc_insertion_point(field_release:mavsdk.rpc.winch.HoldResponse.winch_result) + + ::mavsdk::rpc::winch::WinchResult* temp = winch_result_; + winch_result_ = nullptr; + return temp; +} +inline ::mavsdk::rpc::winch::WinchResult* HoldResponse::_internal_mutable_winch_result() { + + if (winch_result_ == nullptr) { + auto* p = CreateMaybeMessage<::mavsdk::rpc::winch::WinchResult>(GetArenaForAllocation()); + winch_result_ = p; + } + return winch_result_; +} +inline ::mavsdk::rpc::winch::WinchResult* HoldResponse::mutable_winch_result() { + ::mavsdk::rpc::winch::WinchResult* _msg = _internal_mutable_winch_result(); + // @@protoc_insertion_point(field_mutable:mavsdk.rpc.winch.HoldResponse.winch_result) + return _msg; +} +inline void HoldResponse::set_allocated_winch_result(::mavsdk::rpc::winch::WinchResult* winch_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete winch_result_; + } + if (winch_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(winch_result); + if (message_arena != submessage_arena) { + winch_result = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, winch_result, submessage_arena); + } + + } else { + + } + winch_result_ = winch_result; + // @@protoc_insertion_point(field_set_allocated:mavsdk.rpc.winch.HoldResponse.winch_result) +} + +// ------------------------------------------------------------------- + +// RetractRequest + +// uint32 instance = 1; +inline void RetractRequest::clear_instance() { + instance_ = 0u; +} +inline uint32_t RetractRequest::_internal_instance() const { + return instance_; +} +inline uint32_t RetractRequest::instance() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.RetractRequest.instance) + return _internal_instance(); +} +inline void RetractRequest::_internal_set_instance(uint32_t value) { + + instance_ = value; +} +inline void RetractRequest::set_instance(uint32_t value) { + _internal_set_instance(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.RetractRequest.instance) +} + +// ------------------------------------------------------------------- + +// RetractResponse + +// .mavsdk.rpc.winch.WinchResult winch_result = 1; +inline bool RetractResponse::_internal_has_winch_result() const { + return this != internal_default_instance() && winch_result_ != nullptr; +} +inline bool RetractResponse::has_winch_result() const { + return _internal_has_winch_result(); +} +inline void RetractResponse::clear_winch_result() { + if (GetArenaForAllocation() == nullptr && winch_result_ != nullptr) { + delete winch_result_; + } + winch_result_ = nullptr; +} +inline const ::mavsdk::rpc::winch::WinchResult& RetractResponse::_internal_winch_result() const { + const ::mavsdk::rpc::winch::WinchResult* p = winch_result_; + return p != nullptr ? *p : reinterpret_cast( + ::mavsdk::rpc::winch::_WinchResult_default_instance_); +} +inline const ::mavsdk::rpc::winch::WinchResult& RetractResponse::winch_result() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.RetractResponse.winch_result) + return _internal_winch_result(); +} +inline void RetractResponse::unsafe_arena_set_allocated_winch_result( + ::mavsdk::rpc::winch::WinchResult* winch_result) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(winch_result_); + } + winch_result_ = winch_result; + if (winch_result) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mavsdk.rpc.winch.RetractResponse.winch_result) +} +inline ::mavsdk::rpc::winch::WinchResult* RetractResponse::release_winch_result() { + + ::mavsdk::rpc::winch::WinchResult* temp = winch_result_; + winch_result_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mavsdk::rpc::winch::WinchResult* RetractResponse::unsafe_arena_release_winch_result() { + // @@protoc_insertion_point(field_release:mavsdk.rpc.winch.RetractResponse.winch_result) + + ::mavsdk::rpc::winch::WinchResult* temp = winch_result_; + winch_result_ = nullptr; + return temp; +} +inline ::mavsdk::rpc::winch::WinchResult* RetractResponse::_internal_mutable_winch_result() { + + if (winch_result_ == nullptr) { + auto* p = CreateMaybeMessage<::mavsdk::rpc::winch::WinchResult>(GetArenaForAllocation()); + winch_result_ = p; + } + return winch_result_; +} +inline ::mavsdk::rpc::winch::WinchResult* RetractResponse::mutable_winch_result() { + ::mavsdk::rpc::winch::WinchResult* _msg = _internal_mutable_winch_result(); + // @@protoc_insertion_point(field_mutable:mavsdk.rpc.winch.RetractResponse.winch_result) + return _msg; +} +inline void RetractResponse::set_allocated_winch_result(::mavsdk::rpc::winch::WinchResult* winch_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete winch_result_; + } + if (winch_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(winch_result); + if (message_arena != submessage_arena) { + winch_result = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, winch_result, submessage_arena); + } + + } else { + + } + winch_result_ = winch_result; + // @@protoc_insertion_point(field_set_allocated:mavsdk.rpc.winch.RetractResponse.winch_result) +} + +// ------------------------------------------------------------------- + +// LoadLineRequest + +// uint32 instance = 1; +inline void LoadLineRequest::clear_instance() { + instance_ = 0u; +} +inline uint32_t LoadLineRequest::_internal_instance() const { + return instance_; +} +inline uint32_t LoadLineRequest::instance() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.LoadLineRequest.instance) + return _internal_instance(); +} +inline void LoadLineRequest::_internal_set_instance(uint32_t value) { + + instance_ = value; +} +inline void LoadLineRequest::set_instance(uint32_t value) { + _internal_set_instance(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.LoadLineRequest.instance) +} + +// ------------------------------------------------------------------- + +// LoadLineResponse + +// .mavsdk.rpc.winch.WinchResult winch_result = 1; +inline bool LoadLineResponse::_internal_has_winch_result() const { + return this != internal_default_instance() && winch_result_ != nullptr; +} +inline bool LoadLineResponse::has_winch_result() const { + return _internal_has_winch_result(); +} +inline void LoadLineResponse::clear_winch_result() { + if (GetArenaForAllocation() == nullptr && winch_result_ != nullptr) { + delete winch_result_; + } + winch_result_ = nullptr; +} +inline const ::mavsdk::rpc::winch::WinchResult& LoadLineResponse::_internal_winch_result() const { + const ::mavsdk::rpc::winch::WinchResult* p = winch_result_; + return p != nullptr ? *p : reinterpret_cast( + ::mavsdk::rpc::winch::_WinchResult_default_instance_); +} +inline const ::mavsdk::rpc::winch::WinchResult& LoadLineResponse::winch_result() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.LoadLineResponse.winch_result) + return _internal_winch_result(); +} +inline void LoadLineResponse::unsafe_arena_set_allocated_winch_result( + ::mavsdk::rpc::winch::WinchResult* winch_result) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(winch_result_); + } + winch_result_ = winch_result; + if (winch_result) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mavsdk.rpc.winch.LoadLineResponse.winch_result) +} +inline ::mavsdk::rpc::winch::WinchResult* LoadLineResponse::release_winch_result() { + + ::mavsdk::rpc::winch::WinchResult* temp = winch_result_; + winch_result_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mavsdk::rpc::winch::WinchResult* LoadLineResponse::unsafe_arena_release_winch_result() { + // @@protoc_insertion_point(field_release:mavsdk.rpc.winch.LoadLineResponse.winch_result) + + ::mavsdk::rpc::winch::WinchResult* temp = winch_result_; + winch_result_ = nullptr; + return temp; +} +inline ::mavsdk::rpc::winch::WinchResult* LoadLineResponse::_internal_mutable_winch_result() { + + if (winch_result_ == nullptr) { + auto* p = CreateMaybeMessage<::mavsdk::rpc::winch::WinchResult>(GetArenaForAllocation()); + winch_result_ = p; + } + return winch_result_; +} +inline ::mavsdk::rpc::winch::WinchResult* LoadLineResponse::mutable_winch_result() { + ::mavsdk::rpc::winch::WinchResult* _msg = _internal_mutable_winch_result(); + // @@protoc_insertion_point(field_mutable:mavsdk.rpc.winch.LoadLineResponse.winch_result) + return _msg; +} +inline void LoadLineResponse::set_allocated_winch_result(::mavsdk::rpc::winch::WinchResult* winch_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete winch_result_; + } + if (winch_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(winch_result); + if (message_arena != submessage_arena) { + winch_result = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, winch_result, submessage_arena); + } + + } else { + + } + winch_result_ = winch_result; + // @@protoc_insertion_point(field_set_allocated:mavsdk.rpc.winch.LoadLineResponse.winch_result) +} + +// ------------------------------------------------------------------- + +// AbandonLineRequest + +// uint32 instance = 1; +inline void AbandonLineRequest::clear_instance() { + instance_ = 0u; +} +inline uint32_t AbandonLineRequest::_internal_instance() const { + return instance_; +} +inline uint32_t AbandonLineRequest::instance() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.AbandonLineRequest.instance) + return _internal_instance(); +} +inline void AbandonLineRequest::_internal_set_instance(uint32_t value) { + + instance_ = value; +} +inline void AbandonLineRequest::set_instance(uint32_t value) { + _internal_set_instance(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.AbandonLineRequest.instance) +} + +// ------------------------------------------------------------------- + +// AbandonLineResponse + +// .mavsdk.rpc.winch.WinchResult winch_result = 1; +inline bool AbandonLineResponse::_internal_has_winch_result() const { + return this != internal_default_instance() && winch_result_ != nullptr; +} +inline bool AbandonLineResponse::has_winch_result() const { + return _internal_has_winch_result(); +} +inline void AbandonLineResponse::clear_winch_result() { + if (GetArenaForAllocation() == nullptr && winch_result_ != nullptr) { + delete winch_result_; + } + winch_result_ = nullptr; +} +inline const ::mavsdk::rpc::winch::WinchResult& AbandonLineResponse::_internal_winch_result() const { + const ::mavsdk::rpc::winch::WinchResult* p = winch_result_; + return p != nullptr ? *p : reinterpret_cast( + ::mavsdk::rpc::winch::_WinchResult_default_instance_); +} +inline const ::mavsdk::rpc::winch::WinchResult& AbandonLineResponse::winch_result() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.AbandonLineResponse.winch_result) + return _internal_winch_result(); +} +inline void AbandonLineResponse::unsafe_arena_set_allocated_winch_result( + ::mavsdk::rpc::winch::WinchResult* winch_result) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(winch_result_); + } + winch_result_ = winch_result; + if (winch_result) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mavsdk.rpc.winch.AbandonLineResponse.winch_result) +} +inline ::mavsdk::rpc::winch::WinchResult* AbandonLineResponse::release_winch_result() { + + ::mavsdk::rpc::winch::WinchResult* temp = winch_result_; + winch_result_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mavsdk::rpc::winch::WinchResult* AbandonLineResponse::unsafe_arena_release_winch_result() { + // @@protoc_insertion_point(field_release:mavsdk.rpc.winch.AbandonLineResponse.winch_result) + + ::mavsdk::rpc::winch::WinchResult* temp = winch_result_; + winch_result_ = nullptr; + return temp; +} +inline ::mavsdk::rpc::winch::WinchResult* AbandonLineResponse::_internal_mutable_winch_result() { + + if (winch_result_ == nullptr) { + auto* p = CreateMaybeMessage<::mavsdk::rpc::winch::WinchResult>(GetArenaForAllocation()); + winch_result_ = p; + } + return winch_result_; +} +inline ::mavsdk::rpc::winch::WinchResult* AbandonLineResponse::mutable_winch_result() { + ::mavsdk::rpc::winch::WinchResult* _msg = _internal_mutable_winch_result(); + // @@protoc_insertion_point(field_mutable:mavsdk.rpc.winch.AbandonLineResponse.winch_result) + return _msg; +} +inline void AbandonLineResponse::set_allocated_winch_result(::mavsdk::rpc::winch::WinchResult* winch_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete winch_result_; + } + if (winch_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(winch_result); + if (message_arena != submessage_arena) { + winch_result = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, winch_result, submessage_arena); + } + + } else { + + } + winch_result_ = winch_result; + // @@protoc_insertion_point(field_set_allocated:mavsdk.rpc.winch.AbandonLineResponse.winch_result) +} + +// ------------------------------------------------------------------- + +// LoadPayloadRequest + +// uint32 instance = 1; +inline void LoadPayloadRequest::clear_instance() { + instance_ = 0u; +} +inline uint32_t LoadPayloadRequest::_internal_instance() const { + return instance_; +} +inline uint32_t LoadPayloadRequest::instance() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.LoadPayloadRequest.instance) + return _internal_instance(); +} +inline void LoadPayloadRequest::_internal_set_instance(uint32_t value) { + + instance_ = value; +} +inline void LoadPayloadRequest::set_instance(uint32_t value) { + _internal_set_instance(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.LoadPayloadRequest.instance) +} + +// ------------------------------------------------------------------- + +// LoadPayloadResponse + +// .mavsdk.rpc.winch.WinchResult winch_result = 1; +inline bool LoadPayloadResponse::_internal_has_winch_result() const { + return this != internal_default_instance() && winch_result_ != nullptr; +} +inline bool LoadPayloadResponse::has_winch_result() const { + return _internal_has_winch_result(); +} +inline void LoadPayloadResponse::clear_winch_result() { + if (GetArenaForAllocation() == nullptr && winch_result_ != nullptr) { + delete winch_result_; + } + winch_result_ = nullptr; +} +inline const ::mavsdk::rpc::winch::WinchResult& LoadPayloadResponse::_internal_winch_result() const { + const ::mavsdk::rpc::winch::WinchResult* p = winch_result_; + return p != nullptr ? *p : reinterpret_cast( + ::mavsdk::rpc::winch::_WinchResult_default_instance_); +} +inline const ::mavsdk::rpc::winch::WinchResult& LoadPayloadResponse::winch_result() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.LoadPayloadResponse.winch_result) + return _internal_winch_result(); +} +inline void LoadPayloadResponse::unsafe_arena_set_allocated_winch_result( + ::mavsdk::rpc::winch::WinchResult* winch_result) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(winch_result_); + } + winch_result_ = winch_result; + if (winch_result) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:mavsdk.rpc.winch.LoadPayloadResponse.winch_result) +} +inline ::mavsdk::rpc::winch::WinchResult* LoadPayloadResponse::release_winch_result() { + + ::mavsdk::rpc::winch::WinchResult* temp = winch_result_; + winch_result_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::mavsdk::rpc::winch::WinchResult* LoadPayloadResponse::unsafe_arena_release_winch_result() { + // @@protoc_insertion_point(field_release:mavsdk.rpc.winch.LoadPayloadResponse.winch_result) + + ::mavsdk::rpc::winch::WinchResult* temp = winch_result_; + winch_result_ = nullptr; + return temp; +} +inline ::mavsdk::rpc::winch::WinchResult* LoadPayloadResponse::_internal_mutable_winch_result() { + + if (winch_result_ == nullptr) { + auto* p = CreateMaybeMessage<::mavsdk::rpc::winch::WinchResult>(GetArenaForAllocation()); + winch_result_ = p; + } + return winch_result_; +} +inline ::mavsdk::rpc::winch::WinchResult* LoadPayloadResponse::mutable_winch_result() { + ::mavsdk::rpc::winch::WinchResult* _msg = _internal_mutable_winch_result(); + // @@protoc_insertion_point(field_mutable:mavsdk.rpc.winch.LoadPayloadResponse.winch_result) + return _msg; +} +inline void LoadPayloadResponse::set_allocated_winch_result(::mavsdk::rpc::winch::WinchResult* winch_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete winch_result_; + } + if (winch_result) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(winch_result); + if (message_arena != submessage_arena) { + winch_result = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, winch_result, submessage_arena); + } + + } else { + + } + winch_result_ = winch_result; + // @@protoc_insertion_point(field_set_allocated:mavsdk.rpc.winch.LoadPayloadResponse.winch_result) +} + +// ------------------------------------------------------------------- + +// WinchResult + +// .mavsdk.rpc.winch.WinchResult.Result result = 1; +inline void WinchResult::clear_result() { + result_ = 0; +} +inline ::mavsdk::rpc::winch::WinchResult_Result WinchResult::_internal_result() const { + return static_cast< ::mavsdk::rpc::winch::WinchResult_Result >(result_); +} +inline ::mavsdk::rpc::winch::WinchResult_Result WinchResult::result() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.WinchResult.result) + return _internal_result(); +} +inline void WinchResult::_internal_set_result(::mavsdk::rpc::winch::WinchResult_Result value) { + + result_ = value; +} +inline void WinchResult::set_result(::mavsdk::rpc::winch::WinchResult_Result value) { + _internal_set_result(value); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.WinchResult.result) +} + +// string result_str = 2; +inline void WinchResult::clear_result_str() { + result_str_.ClearToEmpty(); +} +inline const std::string& WinchResult::result_str() const { + // @@protoc_insertion_point(field_get:mavsdk.rpc.winch.WinchResult.result_str) + return _internal_result_str(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void WinchResult::set_result_str(ArgT0&& arg0, ArgT... args) { + + result_str_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:mavsdk.rpc.winch.WinchResult.result_str) +} +inline std::string* WinchResult::mutable_result_str() { + std::string* _s = _internal_mutable_result_str(); + // @@protoc_insertion_point(field_mutable:mavsdk.rpc.winch.WinchResult.result_str) + return _s; +} +inline const std::string& WinchResult::_internal_result_str() const { + return result_str_.Get(); +} +inline void WinchResult::_internal_set_result_str(const std::string& value) { + + result_str_.Set(value, GetArenaForAllocation()); +} +inline std::string* WinchResult::_internal_mutable_result_str() { + + return result_str_.Mutable(GetArenaForAllocation()); +} +inline std::string* WinchResult::release_result_str() { + // @@protoc_insertion_point(field_release:mavsdk.rpc.winch.WinchResult.result_str) + return result_str_.Release(); +} +inline void WinchResult::set_allocated_result_str(std::string* result_str) { + if (result_str != nullptr) { + + } else { + + } + result_str_.SetAllocated(result_str, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (result_str_.IsDefault()) { + result_str_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:mavsdk.rpc.winch.WinchResult.result_str) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace winch +} // namespace rpc +} // namespace mavsdk + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::mavsdk::rpc::winch::WinchResult_Result> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::mavsdk::rpc::winch::WinchResult_Result>() { + return ::mavsdk::rpc::winch::WinchResult_Result_descriptor(); +} +template <> struct is_proto_enum< ::mavsdk::rpc::winch::WinchAction> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::mavsdk::rpc::winch::WinchAction>() { + return ::mavsdk::rpc::winch::WinchAction_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_winch_2fwinch_2eproto diff --git a/src/mavsdk_server/src/grpc_server.cpp b/src/mavsdk_server/src/grpc_server.cpp index 0a77688cce..cc6c71907e 100644 --- a/src/mavsdk_server/src/grpc_server.cpp +++ b/src/mavsdk_server/src/grpc_server.cpp @@ -70,6 +70,10 @@ int GrpcServer::run() builder.RegisterService(&_gimbal_service); #endif +#ifdef GRIPPER_ENABLED + builder.RegisterService(&_gripper_service); +#endif + #ifdef INFO_ENABLED builder.RegisterService(&_info_service); #endif @@ -142,6 +146,10 @@ int GrpcServer::run() builder.RegisterService(&_tune_service); #endif +#ifdef WINCH_ENABLED + builder.RegisterService(&_winch_service); +#endif + #ifdef ENABLE_PROTO_REFLECTION grpc::reflection::InitProtoReflectionServerBuilderPlugin(); #endif @@ -221,6 +229,10 @@ void GrpcServer::stop() _gimbal_service.stop(); #endif +#ifdef GRIPPER_ENABLED + _gripper_service.stop(); +#endif + #ifdef INFO_ENABLED _info_service.stop(); #endif @@ -293,6 +305,10 @@ void GrpcServer::stop() _tune_service.stop(); #endif +#ifdef WINCH_ENABLED + _winch_service.stop(); +#endif + _server->Shutdown(); } else { LogWarn() << "Calling 'stop()' on a non-existing server. Did you call 'run()' before?"; diff --git a/src/mavsdk_server/src/grpc_server.h b/src/mavsdk_server/src/grpc_server.h index d5b7d9139a..4ca514a13c 100644 --- a/src/mavsdk_server/src/grpc_server.h +++ b/src/mavsdk_server/src/grpc_server.h @@ -74,6 +74,11 @@ #include "gimbal/gimbal_service_impl.h" #endif +#ifdef GRIPPER_ENABLED +#include "plugins/gripper/gripper.h" +#include "gripper/gripper_service_impl.h" +#endif + #ifdef INFO_ENABLED #include "plugins/info/info.h" #include "info/info_service_impl.h" @@ -164,6 +169,11 @@ #include "tune/tune_service_impl.h" #endif +#ifdef WINCH_ENABLED +#include "plugins/winch/winch.h" +#include "winch/winch_service_impl.h" +#endif + namespace mavsdk { namespace mavsdk_server { @@ -232,6 +242,11 @@ class GrpcServer { _gimbal_service(_gimbal_lazy_plugin), #endif +#ifdef GRIPPER_ENABLED + _gripper_lazy_plugin(mavsdk), + _gripper_service(_gripper_lazy_plugin), +#endif + #ifdef INFO_ENABLED _info_lazy_plugin(mavsdk), _info_service(_info_lazy_plugin), @@ -319,7 +334,12 @@ class GrpcServer { #ifdef TUNE_ENABLED _tune_lazy_plugin(mavsdk), - _tune_service(_tune_lazy_plugin) + _tune_service(_tune_lazy_plugin), +#endif + +#ifdef WINCH_ENABLED + _winch_lazy_plugin(mavsdk), + _winch_service(_winch_lazy_plugin) #endif {} @@ -418,6 +438,13 @@ class GrpcServer { GimbalServiceImpl<> _gimbal_service; #endif +#ifdef GRIPPER_ENABLED + + LazyPlugin _gripper_lazy_plugin; + + GripperServiceImpl<> _gripper_service; +#endif + #ifdef INFO_ENABLED LazyPlugin _info_lazy_plugin; @@ -544,6 +571,13 @@ class GrpcServer { TuneServiceImpl<> _tune_service; #endif +#ifdef WINCH_ENABLED + + LazyPlugin _winch_lazy_plugin; + + WinchServiceImpl<> _winch_service; +#endif + std::unique_ptr _server; int _port{0}; diff --git a/src/mavsdk_server/src/plugins/gripper/gripper_service_impl.h b/src/mavsdk_server/src/plugins/gripper/gripper_service_impl.h new file mode 100644 index 0000000000..4f113b7b5f --- /dev/null +++ b/src/mavsdk_server/src/plugins/gripper/gripper_service_impl.h @@ -0,0 +1,220 @@ +// WARNING: THIS FILE IS AUTOGENERATED! As such, it should not be edited. +// Edits need to be made to the proto files +// (see https://github.com/mavlink/MAVSDK-Proto/blob/master/protos/gripper/gripper.proto) + +#include "gripper/gripper.grpc.pb.h" +#include "plugins/gripper/gripper.h" + +#include "mavsdk.h" + +#include "lazy_plugin.h" + +#include "log.h" +#include +#include +#include +#include +#include +#include +#include + +namespace mavsdk { +namespace mavsdk_server { + +template> + +class GripperServiceImpl final : public rpc::gripper::GripperService::Service { +public: + GripperServiceImpl(LazyPlugin& lazy_plugin) : _lazy_plugin(lazy_plugin) {} + + template + void fillResponseWithResult(ResponseType* response, mavsdk::Gripper::Result& result) const + { + auto rpc_result = translateToRpcResult(result); + + auto* rpc_gripper_result = new rpc::gripper::GripperResult(); + rpc_gripper_result->set_result(rpc_result); + std::stringstream ss; + ss << result; + rpc_gripper_result->set_result_str(ss.str()); + + response->set_allocated_gripper_result(rpc_gripper_result); + } + + static rpc::gripper::GripperAction + translateToRpcGripperAction(const mavsdk::Gripper::GripperAction& gripper_action) + { + switch (gripper_action) { + default: + LogErr() << "Unknown gripper_action enum value: " + << static_cast(gripper_action); + // FALLTHROUGH + case mavsdk::Gripper::GripperAction::Release: + return rpc::gripper::GRIPPER_ACTION_RELEASE; + case mavsdk::Gripper::GripperAction::Grab: + return rpc::gripper::GRIPPER_ACTION_GRAB; + } + } + + static mavsdk::Gripper::GripperAction + translateFromRpcGripperAction(const rpc::gripper::GripperAction gripper_action) + { + switch (gripper_action) { + default: + LogErr() << "Unknown gripper_action enum value: " + << static_cast(gripper_action); + // FALLTHROUGH + case rpc::gripper::GRIPPER_ACTION_RELEASE: + return mavsdk::Gripper::GripperAction::Release; + case rpc::gripper::GRIPPER_ACTION_GRAB: + return mavsdk::Gripper::GripperAction::Grab; + } + } + + static rpc::gripper::GripperResult::Result + translateToRpcResult(const mavsdk::Gripper::Result& result) + { + switch (result) { + default: + LogErr() << "Unknown result enum value: " << static_cast(result); + // FALLTHROUGH + case mavsdk::Gripper::Result::Unknown: + return rpc::gripper::GripperResult_Result_RESULT_UNKNOWN; + case mavsdk::Gripper::Result::Success: + return rpc::gripper::GripperResult_Result_RESULT_SUCCESS; + case mavsdk::Gripper::Result::NoSystem: + return rpc::gripper::GripperResult_Result_RESULT_NO_SYSTEM; + case mavsdk::Gripper::Result::Busy: + return rpc::gripper::GripperResult_Result_RESULT_BUSY; + case mavsdk::Gripper::Result::Timeout: + return rpc::gripper::GripperResult_Result_RESULT_TIMEOUT; + case mavsdk::Gripper::Result::Unsupported: + return rpc::gripper::GripperResult_Result_RESULT_UNSUPPORTED; + case mavsdk::Gripper::Result::Failed: + return rpc::gripper::GripperResult_Result_RESULT_FAILED; + } + } + + static mavsdk::Gripper::Result + translateFromRpcResult(const rpc::gripper::GripperResult::Result result) + { + switch (result) { + default: + LogErr() << "Unknown result enum value: " << static_cast(result); + // FALLTHROUGH + case rpc::gripper::GripperResult_Result_RESULT_UNKNOWN: + return mavsdk::Gripper::Result::Unknown; + case rpc::gripper::GripperResult_Result_RESULT_SUCCESS: + return mavsdk::Gripper::Result::Success; + case rpc::gripper::GripperResult_Result_RESULT_NO_SYSTEM: + return mavsdk::Gripper::Result::NoSystem; + case rpc::gripper::GripperResult_Result_RESULT_BUSY: + return mavsdk::Gripper::Result::Busy; + case rpc::gripper::GripperResult_Result_RESULT_TIMEOUT: + return mavsdk::Gripper::Result::Timeout; + case rpc::gripper::GripperResult_Result_RESULT_UNSUPPORTED: + return mavsdk::Gripper::Result::Unsupported; + case rpc::gripper::GripperResult_Result_RESULT_FAILED: + return mavsdk::Gripper::Result::Failed; + } + } + + grpc::Status Grab( + grpc::ServerContext* /* context */, + const rpc::gripper::GrabRequest* request, + rpc::gripper::GrabResponse* response) override + { + if (_lazy_plugin.maybe_plugin() == nullptr) { + if (response != nullptr) { + auto result = mavsdk::Gripper::Result::NoSystem; + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + if (request == nullptr) { + LogWarn() << "Grab sent with a null request! Ignoring..."; + return grpc::Status::OK; + } + + auto result = _lazy_plugin.maybe_plugin()->grab(request->instance()); + + if (response != nullptr) { + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + grpc::Status Release( + grpc::ServerContext* /* context */, + const rpc::gripper::ReleaseRequest* request, + rpc::gripper::ReleaseResponse* response) override + { + if (_lazy_plugin.maybe_plugin() == nullptr) { + if (response != nullptr) { + auto result = mavsdk::Gripper::Result::NoSystem; + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + if (request == nullptr) { + LogWarn() << "Release sent with a null request! Ignoring..."; + return grpc::Status::OK; + } + + auto result = _lazy_plugin.maybe_plugin()->release(request->instance()); + + if (response != nullptr) { + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + void stop() + { + _stopped.store(true); + for (auto& prom : _stream_stop_promises) { + if (auto handle = prom.lock()) { + handle->set_value(); + } + } + } + +private: + void register_stream_stop_promise(std::weak_ptr> prom) + { + // If we have already stopped, set promise immediately and don't add it to list. + if (_stopped.load()) { + if (auto handle = prom.lock()) { + handle->set_value(); + } + } else { + _stream_stop_promises.push_back(prom); + } + } + + void unregister_stream_stop_promise(std::shared_ptr> prom) + { + for (auto it = _stream_stop_promises.begin(); it != _stream_stop_promises.end(); + /* ++it */) { + if (it->lock() == prom) { + it = _stream_stop_promises.erase(it); + } else { + ++it; + } + } + } + + LazyPlugin& _lazy_plugin; + + std::atomic _stopped{false}; + std::vector>> _stream_stop_promises{}; +}; + +} // namespace mavsdk_server +} // namespace mavsdk \ No newline at end of file diff --git a/src/mavsdk_server/src/plugins/winch/winch_service_impl.h b/src/mavsdk_server/src/plugins/winch/winch_service_impl.h new file mode 100644 index 0000000000..f2f4ccdd91 --- /dev/null +++ b/src/mavsdk_server/src/plugins/winch/winch_service_impl.h @@ -0,0 +1,635 @@ +// WARNING: THIS FILE IS AUTOGENERATED! As such, it should not be edited. +// Edits need to be made to the proto files +// (see https://github.com/mavlink/MAVSDK-Proto/blob/master/protos/winch/winch.proto) + +#include "winch/winch.grpc.pb.h" +#include "plugins/winch/winch.h" + +#include "mavsdk.h" + +#include "lazy_plugin.h" + +#include "log.h" +#include +#include +#include +#include +#include +#include +#include + +namespace mavsdk { +namespace mavsdk_server { + +template> + +class WinchServiceImpl final : public rpc::winch::WinchService::Service { +public: + WinchServiceImpl(LazyPlugin& lazy_plugin) : _lazy_plugin(lazy_plugin) {} + + template + void fillResponseWithResult(ResponseType* response, mavsdk::Winch::Result& result) const + { + auto rpc_result = translateToRpcResult(result); + + auto* rpc_winch_result = new rpc::winch::WinchResult(); + rpc_winch_result->set_result(rpc_result); + std::stringstream ss; + ss << result; + rpc_winch_result->set_result_str(ss.str()); + + response->set_allocated_winch_result(rpc_winch_result); + } + + static rpc::winch::WinchAction + translateToRpcWinchAction(const mavsdk::Winch::WinchAction& winch_action) + { + switch (winch_action) { + default: + LogErr() << "Unknown winch_action enum value: " << static_cast(winch_action); + // FALLTHROUGH + case mavsdk::Winch::WinchAction::Relaxed: + return rpc::winch::WINCH_ACTION_RELAXED; + case mavsdk::Winch::WinchAction::RelativeLengthControl: + return rpc::winch::WINCH_ACTION_RELATIVE_LENGTH_CONTROL; + case mavsdk::Winch::WinchAction::RateControl: + return rpc::winch::WINCH_ACTION_RATE_CONTROL; + case mavsdk::Winch::WinchAction::Lock: + return rpc::winch::WINCH_ACTION_LOCK; + case mavsdk::Winch::WinchAction::Deliver: + return rpc::winch::WINCH_ACTION_DELIVER; + case mavsdk::Winch::WinchAction::Hold: + return rpc::winch::WINCH_ACTION_HOLD; + case mavsdk::Winch::WinchAction::Retract: + return rpc::winch::WINCH_ACTION_RETRACT; + case mavsdk::Winch::WinchAction::LoadLine: + return rpc::winch::WINCH_ACTION_LOAD_LINE; + case mavsdk::Winch::WinchAction::AbandonLine: + return rpc::winch::WINCH_ACTION_ABANDON_LINE; + case mavsdk::Winch::WinchAction::LoadPayload: + return rpc::winch::WINCH_ACTION_LOAD_PAYLOAD; + } + } + + static mavsdk::Winch::WinchAction + translateFromRpcWinchAction(const rpc::winch::WinchAction winch_action) + { + switch (winch_action) { + default: + LogErr() << "Unknown winch_action enum value: " << static_cast(winch_action); + // FALLTHROUGH + case rpc::winch::WINCH_ACTION_RELAXED: + return mavsdk::Winch::WinchAction::Relaxed; + case rpc::winch::WINCH_ACTION_RELATIVE_LENGTH_CONTROL: + return mavsdk::Winch::WinchAction::RelativeLengthControl; + case rpc::winch::WINCH_ACTION_RATE_CONTROL: + return mavsdk::Winch::WinchAction::RateControl; + case rpc::winch::WINCH_ACTION_LOCK: + return mavsdk::Winch::WinchAction::Lock; + case rpc::winch::WINCH_ACTION_DELIVER: + return mavsdk::Winch::WinchAction::Deliver; + case rpc::winch::WINCH_ACTION_HOLD: + return mavsdk::Winch::WinchAction::Hold; + case rpc::winch::WINCH_ACTION_RETRACT: + return mavsdk::Winch::WinchAction::Retract; + case rpc::winch::WINCH_ACTION_LOAD_LINE: + return mavsdk::Winch::WinchAction::LoadLine; + case rpc::winch::WINCH_ACTION_ABANDON_LINE: + return mavsdk::Winch::WinchAction::AbandonLine; + case rpc::winch::WINCH_ACTION_LOAD_PAYLOAD: + return mavsdk::Winch::WinchAction::LoadPayload; + } + } + + static std::unique_ptr + translateToRpcStatusFlags(const mavsdk::Winch::StatusFlags& status_flags) + { + auto rpc_obj = std::make_unique(); + + rpc_obj->set_healthy(status_flags.healthy); + + rpc_obj->set_fully_retracted(status_flags.fully_retracted); + + rpc_obj->set_moving(status_flags.moving); + + rpc_obj->set_clutch_engaged(status_flags.clutch_engaged); + + rpc_obj->set_locked(status_flags.locked); + + rpc_obj->set_dropping(status_flags.dropping); + + rpc_obj->set_arresting(status_flags.arresting); + + rpc_obj->set_ground_sense(status_flags.ground_sense); + + rpc_obj->set_retracting(status_flags.retracting); + + rpc_obj->set_redeliver(status_flags.redeliver); + + rpc_obj->set_abandon_line(status_flags.abandon_line); + + rpc_obj->set_locking(status_flags.locking); + + rpc_obj->set_load_line(status_flags.load_line); + + rpc_obj->set_load_payload(status_flags.load_payload); + + return rpc_obj; + } + + static mavsdk::Winch::StatusFlags + translateFromRpcStatusFlags(const rpc::winch::StatusFlags& status_flags) + { + mavsdk::Winch::StatusFlags obj; + + obj.healthy = status_flags.healthy(); + + obj.fully_retracted = status_flags.fully_retracted(); + + obj.moving = status_flags.moving(); + + obj.clutch_engaged = status_flags.clutch_engaged(); + + obj.locked = status_flags.locked(); + + obj.dropping = status_flags.dropping(); + + obj.arresting = status_flags.arresting(); + + obj.ground_sense = status_flags.ground_sense(); + + obj.retracting = status_flags.retracting(); + + obj.redeliver = status_flags.redeliver(); + + obj.abandon_line = status_flags.abandon_line(); + + obj.locking = status_flags.locking(); + + obj.load_line = status_flags.load_line(); + + obj.load_payload = status_flags.load_payload(); + + return obj; + } + + static std::unique_ptr + translateToRpcStatus(const mavsdk::Winch::Status& status) + { + auto rpc_obj = std::make_unique(); + + rpc_obj->set_time_usec(status.time_usec); + + rpc_obj->set_line_length_m(status.line_length_m); + + rpc_obj->set_speed_m_s(status.speed_m_s); + + rpc_obj->set_tension_kg(status.tension_kg); + + rpc_obj->set_voltage_v(status.voltage_v); + + rpc_obj->set_current_a(status.current_a); + + rpc_obj->set_temperature_c(status.temperature_c); + + rpc_obj->set_allocated_status_flags( + translateToRpcStatusFlags(status.status_flags).release()); + + return rpc_obj; + } + + static mavsdk::Winch::Status translateFromRpcStatus(const rpc::winch::Status& status) + { + mavsdk::Winch::Status obj; + + obj.time_usec = status.time_usec(); + + obj.line_length_m = status.line_length_m(); + + obj.speed_m_s = status.speed_m_s(); + + obj.tension_kg = status.tension_kg(); + + obj.voltage_v = status.voltage_v(); + + obj.current_a = status.current_a(); + + obj.temperature_c = status.temperature_c(); + + obj.status_flags = translateFromRpcStatusFlags(status.status_flags()); + + return obj; + } + + static rpc::winch::WinchResult::Result translateToRpcResult(const mavsdk::Winch::Result& result) + { + switch (result) { + default: + LogErr() << "Unknown result enum value: " << static_cast(result); + // FALLTHROUGH + case mavsdk::Winch::Result::Unknown: + return rpc::winch::WinchResult_Result_RESULT_UNKNOWN; + case mavsdk::Winch::Result::Success: + return rpc::winch::WinchResult_Result_RESULT_SUCCESS; + case mavsdk::Winch::Result::NoSystem: + return rpc::winch::WinchResult_Result_RESULT_NO_SYSTEM; + case mavsdk::Winch::Result::Busy: + return rpc::winch::WinchResult_Result_RESULT_BUSY; + case mavsdk::Winch::Result::Timeout: + return rpc::winch::WinchResult_Result_RESULT_TIMEOUT; + case mavsdk::Winch::Result::Unsupported: + return rpc::winch::WinchResult_Result_RESULT_UNSUPPORTED; + case mavsdk::Winch::Result::Failed: + return rpc::winch::WinchResult_Result_RESULT_FAILED; + } + } + + static mavsdk::Winch::Result + translateFromRpcResult(const rpc::winch::WinchResult::Result result) + { + switch (result) { + default: + LogErr() << "Unknown result enum value: " << static_cast(result); + // FALLTHROUGH + case rpc::winch::WinchResult_Result_RESULT_UNKNOWN: + return mavsdk::Winch::Result::Unknown; + case rpc::winch::WinchResult_Result_RESULT_SUCCESS: + return mavsdk::Winch::Result::Success; + case rpc::winch::WinchResult_Result_RESULT_NO_SYSTEM: + return mavsdk::Winch::Result::NoSystem; + case rpc::winch::WinchResult_Result_RESULT_BUSY: + return mavsdk::Winch::Result::Busy; + case rpc::winch::WinchResult_Result_RESULT_TIMEOUT: + return mavsdk::Winch::Result::Timeout; + case rpc::winch::WinchResult_Result_RESULT_UNSUPPORTED: + return mavsdk::Winch::Result::Unsupported; + case rpc::winch::WinchResult_Result_RESULT_FAILED: + return mavsdk::Winch::Result::Failed; + } + } + + grpc::Status SubscribeStatus( + grpc::ServerContext* /* context */, + const mavsdk::rpc::winch::SubscribeStatusRequest* /* request */, + grpc::ServerWriter* writer) override + { + if (_lazy_plugin.maybe_plugin() == nullptr) { + return grpc::Status::OK; + } + + auto stream_closed_promise = std::make_shared>(); + auto stream_closed_future = stream_closed_promise->get_future(); + register_stream_stop_promise(stream_closed_promise); + + auto is_finished = std::make_shared(false); + auto subscribe_mutex = std::make_shared(); + + const mavsdk::Winch::StatusHandle handle = _lazy_plugin.maybe_plugin()->subscribe_status( + [this, &writer, &stream_closed_promise, is_finished, subscribe_mutex, &handle]( + const mavsdk::Winch::Status status) { + rpc::winch::StatusResponse rpc_response; + + rpc_response.set_allocated_status(translateToRpcStatus(status).release()); + + std::unique_lock lock(*subscribe_mutex); + if (!*is_finished && !writer->Write(rpc_response)) { + _lazy_plugin.maybe_plugin()->unsubscribe_status(handle); + + *is_finished = true; + unregister_stream_stop_promise(stream_closed_promise); + stream_closed_promise->set_value(); + } + }); + + stream_closed_future.wait(); + std::unique_lock lock(*subscribe_mutex); + *is_finished = true; + + return grpc::Status::OK; + } + + grpc::Status Relax( + grpc::ServerContext* /* context */, + const rpc::winch::RelaxRequest* request, + rpc::winch::RelaxResponse* response) override + { + if (_lazy_plugin.maybe_plugin() == nullptr) { + if (response != nullptr) { + auto result = mavsdk::Winch::Result::NoSystem; + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + if (request == nullptr) { + LogWarn() << "Relax sent with a null request! Ignoring..."; + return grpc::Status::OK; + } + + auto result = _lazy_plugin.maybe_plugin()->relax(request->instance()); + + if (response != nullptr) { + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + grpc::Status RelativeLengthControl( + grpc::ServerContext* /* context */, + const rpc::winch::RelativeLengthControlRequest* request, + rpc::winch::RelativeLengthControlResponse* response) override + { + if (_lazy_plugin.maybe_plugin() == nullptr) { + if (response != nullptr) { + auto result = mavsdk::Winch::Result::NoSystem; + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + if (request == nullptr) { + LogWarn() << "RelativeLengthControl sent with a null request! Ignoring..."; + return grpc::Status::OK; + } + + auto result = _lazy_plugin.maybe_plugin()->relative_length_control( + request->instance(), request->length_m(), request->rate_m_s()); + + if (response != nullptr) { + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + grpc::Status RateControl( + grpc::ServerContext* /* context */, + const rpc::winch::RateControlRequest* request, + rpc::winch::RateControlResponse* response) override + { + if (_lazy_plugin.maybe_plugin() == nullptr) { + if (response != nullptr) { + auto result = mavsdk::Winch::Result::NoSystem; + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + if (request == nullptr) { + LogWarn() << "RateControl sent with a null request! Ignoring..."; + return grpc::Status::OK; + } + + auto result = + _lazy_plugin.maybe_plugin()->rate_control(request->instance(), request->rate_m_s()); + + if (response != nullptr) { + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + grpc::Status Lock( + grpc::ServerContext* /* context */, + const rpc::winch::LockRequest* request, + rpc::winch::LockResponse* response) override + { + if (_lazy_plugin.maybe_plugin() == nullptr) { + if (response != nullptr) { + auto result = mavsdk::Winch::Result::NoSystem; + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + if (request == nullptr) { + LogWarn() << "Lock sent with a null request! Ignoring..."; + return grpc::Status::OK; + } + + auto result = _lazy_plugin.maybe_plugin()->lock(request->instance()); + + if (response != nullptr) { + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + grpc::Status Deliver( + grpc::ServerContext* /* context */, + const rpc::winch::DeliverRequest* request, + rpc::winch::DeliverResponse* response) override + { + if (_lazy_plugin.maybe_plugin() == nullptr) { + if (response != nullptr) { + auto result = mavsdk::Winch::Result::NoSystem; + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + if (request == nullptr) { + LogWarn() << "Deliver sent with a null request! Ignoring..."; + return grpc::Status::OK; + } + + auto result = _lazy_plugin.maybe_plugin()->deliver(request->instance()); + + if (response != nullptr) { + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + grpc::Status Hold( + grpc::ServerContext* /* context */, + const rpc::winch::HoldRequest* request, + rpc::winch::HoldResponse* response) override + { + if (_lazy_plugin.maybe_plugin() == nullptr) { + if (response != nullptr) { + auto result = mavsdk::Winch::Result::NoSystem; + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + if (request == nullptr) { + LogWarn() << "Hold sent with a null request! Ignoring..."; + return grpc::Status::OK; + } + + auto result = _lazy_plugin.maybe_plugin()->hold(request->instance()); + + if (response != nullptr) { + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + grpc::Status Retract( + grpc::ServerContext* /* context */, + const rpc::winch::RetractRequest* request, + rpc::winch::RetractResponse* response) override + { + if (_lazy_plugin.maybe_plugin() == nullptr) { + if (response != nullptr) { + auto result = mavsdk::Winch::Result::NoSystem; + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + if (request == nullptr) { + LogWarn() << "Retract sent with a null request! Ignoring..."; + return grpc::Status::OK; + } + + auto result = _lazy_plugin.maybe_plugin()->retract(request->instance()); + + if (response != nullptr) { + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + grpc::Status LoadLine( + grpc::ServerContext* /* context */, + const rpc::winch::LoadLineRequest* request, + rpc::winch::LoadLineResponse* response) override + { + if (_lazy_plugin.maybe_plugin() == nullptr) { + if (response != nullptr) { + auto result = mavsdk::Winch::Result::NoSystem; + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + if (request == nullptr) { + LogWarn() << "LoadLine sent with a null request! Ignoring..."; + return grpc::Status::OK; + } + + auto result = _lazy_plugin.maybe_plugin()->load_line(request->instance()); + + if (response != nullptr) { + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + grpc::Status AbandonLine( + grpc::ServerContext* /* context */, + const rpc::winch::AbandonLineRequest* request, + rpc::winch::AbandonLineResponse* response) override + { + if (_lazy_plugin.maybe_plugin() == nullptr) { + if (response != nullptr) { + auto result = mavsdk::Winch::Result::NoSystem; + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + if (request == nullptr) { + LogWarn() << "AbandonLine sent with a null request! Ignoring..."; + return grpc::Status::OK; + } + + auto result = _lazy_plugin.maybe_plugin()->abandon_line(request->instance()); + + if (response != nullptr) { + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + grpc::Status LoadPayload( + grpc::ServerContext* /* context */, + const rpc::winch::LoadPayloadRequest* request, + rpc::winch::LoadPayloadResponse* response) override + { + if (_lazy_plugin.maybe_plugin() == nullptr) { + if (response != nullptr) { + auto result = mavsdk::Winch::Result::NoSystem; + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + if (request == nullptr) { + LogWarn() << "LoadPayload sent with a null request! Ignoring..."; + return grpc::Status::OK; + } + + auto result = _lazy_plugin.maybe_plugin()->load_payload(request->instance()); + + if (response != nullptr) { + fillResponseWithResult(response, result); + } + + return grpc::Status::OK; + } + + void stop() + { + _stopped.store(true); + for (auto& prom : _stream_stop_promises) { + if (auto handle = prom.lock()) { + handle->set_value(); + } + } + } + +private: + void register_stream_stop_promise(std::weak_ptr> prom) + { + // If we have already stopped, set promise immediately and don't add it to list. + if (_stopped.load()) { + if (auto handle = prom.lock()) { + handle->set_value(); + } + } else { + _stream_stop_promises.push_back(prom); + } + } + + void unregister_stream_stop_promise(std::shared_ptr> prom) + { + for (auto it = _stream_stop_promises.begin(); it != _stream_stop_promises.end(); + /* ++it */) { + if (it->lock() == prom) { + it = _stream_stop_promises.erase(it); + } else { + ++it; + } + } + } + + LazyPlugin& _lazy_plugin; + + std::atomic _stopped{false}; + std::vector>> _stream_stop_promises{}; +}; + +} // namespace mavsdk_server +} // namespace mavsdk \ No newline at end of file diff --git a/src/plugins.txt b/src/plugins.txt index ce25bbc3ca..a948879239 100644 --- a/src/plugins.txt +++ b/src/plugins.txt @@ -10,6 +10,7 @@ follow_me ftp geofence gimbal +gripper info log_files manual_control @@ -28,3 +29,4 @@ telemetry_server tracking_server transponder tune +winch