13#include <units/frequency.h>
14#include <units/time.h>
27 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash, std::shared_ptr<ControlRequest> &req)
const override
29 if (req.get() !=
this)
31 auto const reqCast =
dynamic_cast<CoastOut *
>(req.get());
32 if (reqCast !=
nullptr)
38 req = std::make_shared<CoastOut>(*
this);
126 std::stringstream ss;
127 ss <<
"Control: CoastOut" << std::endl;
128 ss <<
" UseTimesync: " <<
UseTimesync << std::endl;
139 std::map<std::string, std::string> controlInfo;
140 std::stringstream ss;
141 controlInfo[
"Name"] =
GetName();
142 ss <<
UseTimesync; controlInfo[
"UseTimesync"] = ss.str(); ss.str(std::string{});
CTREXPORT int c_ctre_phoenix6_RequestControlCoastOut(const char *canbus, uint32_t ecuEncoding, double updateTime, bool UseTimesync)
Request coast neutral output of actuator.
Definition CoastOut.hpp:26
std::string ToString() const override
Returns a string representation of the object.
Definition CoastOut.hpp:124
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
Definition CoastOut.hpp:137
units::frequency::hertz_t UpdateFreqHz
The period at which this control will update at.
Definition CoastOut.hpp:69
CoastOut & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the period at which this control will update at.
Definition CoastOut.hpp:114
bool UseTimesync
Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro an...
Definition CoastOut.hpp:56
CoastOut()
Request coast neutral output of actuator.
Definition CoastOut.hpp:76
CoastOut & WithUseTimesync(bool newUseTimesync)
Modifies this Control Request's UseTimesync parameter and returns itself for method-chaining and easi...
Definition CoastOut.hpp:95
Abstract Control Request class that other control requests extend for use.
Definition ControlRequest.hpp:30
std::string const & GetName() const
Definition ControlRequest.hpp:53
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:27
Definition MotionMagicExpoTorqueCurrentFOC.hpp:18