Class MockAdapter
Defined in File MockAdapter.hpp
Inheritance Relationships
Base Type
public std::enable_shared_from_this< MockAdapter >
Class Documentation
-
class MockAdapter : public std::enable_shared_from_this<MockAdapter>
This class is an alternative to the Adapter class, but made specifically for testing. It does not try to connect to a Schedule Node or to any Negotiation topics. It keeps its database internal.
Public Functions
-
MockAdapter(const std::string &node_name, const rclcpp::NodeOptions &node_options = rclcpp::NodeOptions())
Create a mock adapter.
-
std::shared_ptr<FleetUpdateHandle> add_fleet(const std::string &fleet_name, rmf_traffic::agv::VehicleTraits traits, rmf_traffic::agv::Graph navigation_graph, std::optional<std::string> server_uri = std::nullopt)
Add a fleet to test.
-
std::shared_ptr<rclcpp::Node> node()
Get the rclcpp Node for this adapter.
-
void start()
Start spinning this adapter.
-
void stop()
Stop this adapter from spinning.
-
void dispatch_task(std::string task_id, const nlohmann::json &request)
Submit a task request.
-
~MockAdapter()
-
MockAdapter(const std::string &node_name, const rclcpp::NodeOptions &node_options = rclcpp::NodeOptions())