30 virtual ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash,
bool cancelOtherRequests, std::shared_ptr<ControlRequest> &req) = 0;
72 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash,
bool cancelOtherRequests, std::shared_ptr<ControlRequest> &req)
override
74 if (req.get() !=
this)
76 auto const reqCast =
dynamic_cast<EmptyControl *
>(req.get());
77 if (reqCast !=
nullptr)
83 req = std::make_shared<EmptyControl>(*
this);
105 std::map<std::string, std::string> controlInfo;
106 controlInfo[
"Name"] =
GetName();
112 std::stringstream ss;
113 ss <<
"class: EmptyControl" << std::endl;
CTREXPORT int c_ctre_phoenix6_RequestControlEmpty(const char *canbus, uint32_t ecuEncoding, double updateTime, bool cancelOtherRequests)
Abstract Control Request class that other control requests extend for use.
Definition: ControlRequest.hpp:28
ControlRequest & operator=(ControlRequest &&)=default
ControlRequest & operator=(ControlRequest const &)=default
std::string name
Definition: ControlRequest.hpp:33
std::string const & GetName() const
Definition: ControlRequest.hpp:51
ControlRequest(ControlRequest const &)=default
virtual std::map< std::string, std::string > GetControlInfo() const =0
Gets information about this control request.
ControlRequest(ControlRequest &&)=default
virtual std::string ToString() const =0
virtual ~ControlRequest()=default
ControlRequest(std::string name)
Constructs a new Control Request with the given name.
Definition: ControlRequest.hpp:47
Generic Empty Control class used to do nothing.
Definition: ControlRequest.hpp:71
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
Definition: ControlRequest.hpp:103
EmptyControl()
Constructs an empty control request.
Definition: ControlRequest.hpp:94
std::string ToString() const override
Definition: ControlRequest.hpp:110
Parent class for all devices.
Definition: ParentDevice.hpp:29
Definition: string_util.hpp:15