/********************************************************************* * * Software License Agreement (BSD License) * * recovery_core — plugin GIẢ mô phỏng một behavior build với header cũ: export `_abi` = 1 (và một * alias không có `_abi`). Chỉ để test ABI guard của RecoveryRegistry; không cài đặt. * * Author: DuongTD *********************************************************************/ #include #include #include namespace recovery_core { namespace testing { class StaleAbiRecovery final : public RecoveryBehavior { public: static RecoveryBehavior::RecoveryBehaviorPtr create() { return std::make_shared(); } RecoveryOutputType outputKind() const override { return RecoveryOutputType::kNone; } protected: bool onConfigure(robot::NodeHandle& /*nh*/) override { return true; } bool onStart(const RecoveryGoal& /*goal*/) override { return true; } RecoveryResult onUpdate(const robot::Time& /*now*/, double /*dt*/) override { return RecoveryResult::Succeeded(); } }; /// Phiên bản ABI "cũ" — lệch với kRecoveryAbiVersion của runtime. int staleAbiVersion() { return 1; } } // namespace testing } // namespace recovery_core BOOST_DLL_ALIAS(recovery_core::testing::StaleAbiRecovery::create, StaleAbiRecovery) BOOST_DLL_ALIAS(recovery_core::testing::staleAbiVersion, StaleAbiRecovery_abi) BOOST_DLL_ALIAS(recovery_core::testing::StaleAbiRecovery::create, NoAbiRecovery)