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<NeutralOut *
>(req.get());
32 if (reqCast !=
nullptr)
38 req = std::make_shared<NeutralOut>(*
this);
126 std::stringstream ss;
127 ss <<
"Control: NeutralOut" << 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_RequestControlNeutralOut(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
Request neutral output of actuator.
Definition NeutralOut.hpp:26
bool UseTimesync
Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro an...
Definition NeutralOut.hpp:56
NeutralOut & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the period at which this control will update at.
Definition NeutralOut.hpp:114
NeutralOut & WithUseTimesync(bool newUseTimesync)
Modifies this Control Request's UseTimesync parameter and returns itself for method-chaining and easi...
Definition NeutralOut.hpp:95
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
Definition NeutralOut.hpp:137
NeutralOut()
Request neutral output of actuator.
Definition NeutralOut.hpp:76
units::frequency::hertz_t UpdateFreqHz
The period at which this control will update at.
Definition NeutralOut.hpp:69
std::string ToString() const override
Returns a string representation of the object.
Definition NeutralOut.hpp:124
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:27
Definition MotionMagicExpoTorqueCurrentFOC.hpp:18