14#include <units/time.h>
42 ctre::phoenix::StatusCode
SetConfigsPrivate(
const std::string &serializedString, units::time::second_t timeoutSeconds,
bool futureProofConfigs,
bool overrideIfDuplicate)
44 ctre::phoenix::StatusCode status;
46 std::lock_guard<std::mutex> lock{_m};
49 deviceIdentifier.
network.c_str(),
51 timeoutSeconds.to<
double>(),
59 std::stringstream location;
60 location << this->deviceIdentifier.
ToString() <<
" Apply Config";
65 ctre::phoenix::StatusCode
GetConfigsPrivate(std::string &serializedString, units::time::second_t timeoutSeconds)
const
67 ctre::phoenix::StatusCode status;
69 std::lock_guard<std::mutex> lock{_m};
72 deviceIdentifier.
network.c_str(),
74 timeoutSeconds.to<
double>(),
80 std::stringstream location;
81 location << this->deviceIdentifier.
ToString() <<
" Refresh Config";
CTREXPORT void c_ctre_phoenix_report_error(int isError, int32_t errorCode, int isLVCode, const char *details, const char *location, const char *callStack)
Definition: Configurator.hpp:22
ctre::phoenix::StatusCode SetConfigsPrivate(const std::string &serializedString, units::time::second_t timeoutSeconds, bool futureProofConfigs, bool overrideIfDuplicate)
Definition: Configurator.hpp:42
ParentConfigurator & operator=(ParentConfigurator &&)=default
ParentConfigurator(hardware::DeviceIdentifier deviceIdentifier)
Definition: Configurator.hpp:34
ParentConfigurator(ParentConfigurator &&)=default
ctre::phoenix::StatusCode GetConfigsPrivate(std::string &serializedString, units::time::second_t timeoutSeconds) const
Definition: Configurator.hpp:65
units::time::second_t DefaultTimeoutSeconds
The default amount of time to wait for a config.
Definition: Configurator.hpp:27
Definition: DeviceIdentifier.hpp:19
std::string ToString() const
Definition: DeviceIdentifier.hpp:34
uint32_t deviceHash
Definition: DeviceIdentifier.hpp:24
std::string network
Definition: DeviceIdentifier.hpp:21
static ctre::phoenix::StatusCode Device_GetConfigValues(const char *network, int deviceHash, double timeoutSeconds, std::string &serializedString)
Gets the config value of the device.
static ctre::phoenix::StatusCode Device_SetConfigValues(const char *network, int deviceHash, double timeoutSeconds, const std::string &serializedString, bool futureProofConfigs, bool overrideIfDuplicate)
Sets the config value of the device.
Definition: string_util.hpp:15