13#include <units/frequency.h>
14#include <units/time.h>
26 ctre::phoenix::StatusCode SendRequest(
const char *network, uint32_t deviceHash, std::shared_ptr<ControlRequest> &req)
const override
28 if (req.get() !=
this)
30 auto const reqCast =
dynamic_cast<StaticBrake *
>(req.get());
31 if (reqCast !=
nullptr)
37 req = std::make_shared<StaticBrake>(*
this);
124 std::stringstream ss;
125 ss <<
"Control: StaticBrake" << std::endl;
126 ss <<
" UseTimesync: " <<
UseTimesync << std::endl;
137 std::map<std::string, std::string> controlInfo;
138 std::stringstream ss;
139 controlInfo[
"Name"] =
GetName();
140 ss <<
UseTimesync; controlInfo[
"UseTimesync"] = ss.str(); ss.str(std::string{});
CTREXPORT int c_ctre_phoenix6_RequestControlStaticBrake(const char *canbus, uint32_t ecuEncoding, double updateTime, bool UseTimesync)
Abstract Control Request class that other control requests extend for use.
Definition ControlRequest.hpp:30
std::string const & GetName() const
Definition ControlRequest.hpp:53
Applies full neutral-brake by shorting motor leads together.
Definition StaticBrake.hpp:25
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
Definition StaticBrake.hpp:135
std::string ToString() const override
Returns a string representation of the object.
Definition StaticBrake.hpp:122
bool UseTimesync
Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro an...
Definition StaticBrake.hpp:55
StaticBrake()
Applies full neutral-brake by shorting motor leads together.
Definition StaticBrake.hpp:74
StaticBrake & WithUseTimesync(bool newUseTimesync)
Modifies this Control Request's UseTimesync parameter and returns itself for method-chaining and easi...
Definition StaticBrake.hpp:93
units::frequency::hertz_t UpdateFreqHz
The period at which this control will update at.
Definition StaticBrake.hpp:68
StaticBrake & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the period at which this control will update at.
Definition StaticBrake.hpp:112
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:27
Definition MotionMagicExpoTorqueCurrentFOC.hpp:18