Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
command_mapper_format_generator.hpp
Go to the documentation of this file.
1/*****************************************************************************/
2/********** !!! WARNING: CODE GENERATED BY TAPROOT. DO NOT EDIT !!! **********/
3/*****************************************************************************/
4
5/*
6 * Copyright (c) 2020-2021 Advanced Robotics at the University of Washington <robomstr@uw.edu>
7 *
8 * This file is part of Taproot.
9 *
10 * Taproot is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * Taproot is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with Taproot. If not, see <https://www.gnu.org/licenses/>.
22 */
23
24#ifndef TAPROOT_COMMAND_MAPPER_FORMAT_GENERATOR_HPP_
25#define TAPROOT_COMMAND_MAPPER_FORMAT_GENERATOR_HPP_
26
27#include <string>
28#include <string_view>
29#include <vector>
30
32
33namespace tap
34{
35namespace control
36{
37class CommandMapper;
38class RemoteMapState;
39class Command;
40
46{
47public:
48 explicit CommandMapperFormatGenerator(const CommandMapper &mapper) : mapper(mapper) {}
50
57 const std::vector<std::string> generateMappings() const;
58
59private:
60 const CommandMapper &mapper;
61
62 const std::string formattedRemoteMapState(const RemoteMapState &ms) const;
63 const std::string formattedMappedCommands(const std::vector<Command *> mc) const;
64 constexpr std::string_view switchStateToString(
66 const std::string keyMapToString(uint16_t keys) const;
67}; // class CommandMapperFormatGenerator
68} // namespace control
69} // namespace tap
70
71#endif // TAPROOT_COMMAND_MAPPER_FORMAT_GENERATOR_HPP_
SwitchState
Definition remote.hpp:82
Definition command_mapper_format_generator.hpp:46
const std::vector< std::string > generateMappings() const
Definition command_mapper_format_generator.cpp:37
CommandMapperFormatGenerator(const CommandMapper &mapper)
Definition command_mapper_format_generator.hpp:48
Definition command_mapper.hpp:68
Definition remote_map_state.hpp:56
Definition ballistics.cpp:29