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)
32 if (reqCast !=
nullptr)
38 req = std::make_shared<EmptyAnimation>(*
this);
89 Slot = std::move(newSlot);
118 std::stringstream ss;
119 ss <<
"Control: EmptyAnimation" << std::endl;
120 ss <<
" Slot: " <<
Slot << std::endl;
131 std::map<std::string, std::string> controlInfo;
132 std::stringstream ss;
133 controlInfo[
"Name"] =
GetName();
134 ss <<
Slot; controlInfo[
"Slot"] = ss.str(); ss.str(std::string{});
CTREXPORT int c_ctre_phoenix6_RequestControlEmptyAnimation(const char *canbus, uint32_t ecuEncoding, double updateFrequency, int Slot)
Abstract Control Request class that other control requests extend for use.
Definition ControlRequest.hpp:30
std::string const & GetName() const
Definition ControlRequest.hpp:53
An empty animation, clearing any animation in the specified slot.
Definition EmptyAnimation.hpp:26
units::frequency::hertz_t UpdateFreqHz
The period at which this control will update at.
Definition EmptyAnimation.hpp:63
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
Definition EmptyAnimation.hpp:129
std::string ToString() const override
Returns a string representation of the object.
Definition EmptyAnimation.hpp:116
EmptyAnimation(int Slot)
An empty animation, clearing any animation in the specified slot.
Definition EmptyAnimation.hpp:73
int Slot
The slot of this animation, within [0, 7].
Definition EmptyAnimation.hpp:50
EmptyAnimation & WithSlot(int newSlot)
Modifies this Control Request's Slot parameter and returns itself for method-chaining and easier to u...
Definition EmptyAnimation.hpp:87
EmptyAnimation & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the period at which this control will update at.
Definition EmptyAnimation.hpp:106
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:27
Definition Diff_PositionDutyCycle_Position.hpp:15