.. _program_listing_file__tmp_ws_src_rmf_task_rmf_task_include_rmf_task_State.hpp: Program Listing for File State.hpp ================================== |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/rmf_task/rmf_task/include/rmf_task/State.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp /* * Copyright (C) 2020 Open Source Robotics Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #ifndef RMF_TASK__STATE_HPP #define RMF_TASK__STATE_HPP #include #include #include #include #include namespace rmf_task { //============================================================================== class State : public CompositeData { public: RMF_TASK_DEFINE_COMPONENT(std::size_t, CurrentWaypoint); std::optional waypoint() const; State& waypoint(std::size_t new_waypoint); RMF_TASK_DEFINE_COMPONENT(double, CurrentOrientation); std::optional orientation() const; State& orientation(double new_orientation); RMF_TASK_DEFINE_COMPONENT(rmf_traffic::Time, CurrentTime); std::optional time() const; State& time(rmf_traffic::Time new_time); // TODO(MXG): Consider removing this field and using some kind of // ChargingStrategy abstract interface to determine where and how the robots // should be charging. RMF_TASK_DEFINE_COMPONENT(std::size_t, DedicatedChargingPoint); std::optional dedicated_charging_waypoint() const; State& dedicated_charging_waypoint(std::size_t new_charging_waypoint); RMF_TASK_DEFINE_COMPONENT(double, CurrentBatterySoC); std::optional battery_soc() const; State& battery_soc(double new_battery_soc); State& load_basic( const rmf_traffic::agv::Plan::Start& location, std::size_t charging_point, double battery_soc); State& load(const rmf_traffic::agv::Plan::Start& location); std::optional project_plan_start( double default_orientation = 0.0, rmf_traffic::Time default_time = rmf_traffic::Time()) const; std::optional extract_plan_start() const; }; } // namespace rmf_task #endif // RMF_TASK__AGV__STATE_HPP