Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
can.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_CAN_HPP_
25#define TAPROOT_CAN_HPP_
26
27#include "tap/util_macros.hpp"
28
29#include "can_bus.hpp"
30
31namespace modm::can
32{
33class Message;
34}
35
36namespace tap
37{
38namespace can
39{
43class Can
44{
45public:
46 Can() = default;
48 mockable ~Can() = default;
49
59 mockable void initialize();
60
68 mockable bool isMessageAvailable(CanBus bus) const;
69
81 mockable bool getMessage(CanBus bus, modm::can::Message *message);
82
89 mockable bool isReadyToSend(CanBus bus) const;
90
105 mockable bool sendMessage(CanBus bus, const modm::can::Message &message);
106}; // class Can
107
108} // namespace can
109} // namespace tap
110
111#endif // TAPROOT_CAN_HPP_
Definition can.hpp:44
mockable void initialize()
Definition can.cpp:41
mockable bool sendMessage(CanBus bus, const modm::can::Message &message)
Definition can.cpp:118
mockable bool getMessage(CanBus bus, modm::can::Message *message)
Definition can.cpp:83
mockable bool isReadyToSend(CanBus bus) const
Definition can.cpp:100
Can()=default
mockable bool isMessageAvailable(CanBus bus) const
Definition can.cpp:65
Definition can.hpp:32
Definition can.hpp:32
CanBus
Definition can_bus.hpp:30
Definition ballistics.cpp:29
#define mockable
Wrap class functions that are not already virtual in this function if you wish to mock them.
Definition util_macros.hpp:38
#define DISALLOW_COPY_AND_ASSIGN(Typename)
Definition util_macros.hpp:27