Program Listing for File Parameters.hpp
↰ Return to documentation for file (include/rmf_task/Parameters.hpp
)
/*
* Copyright (C) 2021 Open Source agentics 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__AGV__PARAMETERS_HPP
#define RMF_TASK__AGV__PARAMETERS_HPP
#include <rmf_battery/agv/BatterySystem.hpp>
#include <rmf_battery/MotionPowerSink.hpp>
#include <rmf_battery/DevicePowerSink.hpp>
#include <rmf_traffic/agv/Planner.hpp>
#include <rmf_utils/impl_ptr.hpp>
namespace rmf_task {
//==============================================================================
class Parameters
{
public:
Parameters(
std::shared_ptr<const rmf_traffic::agv::Planner> planner,
rmf_battery::agv::BatterySystem battery_system,
rmf_battery::ConstMotionPowerSinkPtr motion_sink,
rmf_battery::ConstDevicePowerSinkPtr ambient_sink,
rmf_battery::ConstDevicePowerSinkPtr tool_sink = nullptr);
const std::shared_ptr<const rmf_traffic::agv::Planner>& planner() const;
Parameters& planner(
std::shared_ptr<const rmf_traffic::agv::Planner> planner);
const rmf_battery::agv::BatterySystem& battery_system() const;
Parameters& battery_system(
rmf_battery::agv::BatterySystem battery_system);
const rmf_battery::ConstMotionPowerSinkPtr& motion_sink() const;
Parameters& motion_sink(
rmf_battery::ConstMotionPowerSinkPtr motion_sink);
const rmf_battery::ConstDevicePowerSinkPtr& ambient_sink() const;
Parameters& ambient_sink(
rmf_battery::ConstDevicePowerSinkPtr ambient_sink);
const rmf_battery::ConstDevicePowerSinkPtr& tool_sink() const;
Parameters& tool_sink(
rmf_battery::ConstDevicePowerSinkPtr tool_sink);
class Implementation;
private:
rmf_utils::impl_ptr<Implementation> _pimpl;
};
//==============================================================================
using ConstParametersPtr = std::shared_ptr<const Parameters>;
} // namespace rmf_task
#endif // RMF_TASK__AGV__PARAMETERS_HPP