#include <SimSensorConfig.hpp>
|
| | SimSensorConfig (std::string name) |
| SimSensorConfig & | WithField (const std::string &name, std::function< double()> supplier, double defaultVal) |
| SimSensorConfig & | WithField (const std::string &name, std::function< int()> supplier, int defaultVal) |
| SimSensorConfig & | WithField (const std::string &name, std::function< bool()> supplier, bool defaultVal) |
| SimSensorConfig & | WithField (const std::string &name, std::function< int64_t()> supplier, int64_t defaultVal) |
| SimSensorConfig & | WithSimulatedValue (const std::string &fieldName, wpi::units::second_t start, wpi::units::second_t end, double value) |
| SimSensorConfig & | WithSimulatedValue (const std::string &fieldName, wpi::units::second_t start, wpi::units::second_t end, int value) |
| SimSensorConfig & | WithSimulatedValue (const std::string &fieldName, wpi::units::second_t start, wpi::units::second_t end, int64_t value) |
| SimSensorConfig & | WithSimulatedValue (const std::string &fieldName, wpi::units::second_t start, wpi::units::second_t end, bool value) |
| SimSensorConfig & | WithSimulatedValue (const std::string &fieldName, std::function< bool()> trigger, double value) |
| SimSensorConfig & | WithSimulatedValue (const std::string &fieldName, std::function< bool()> trigger, int value) |
| SimSensorConfig & | WithSimulatedValue (const std::string &fieldName, std::function< bool()> trigger, int64_t value) |
| SimSensorConfig & | WithSimulatedValue (const std::string &fieldName, std::function< bool()> trigger, bool value) |
| yams::motorcontrollers::simulation::Sensor & | GetSensor () |
| const std::string & | GetName () const |
| std::vector< SensorData > | GetFields () const |
Builder for a simulated yams::motorcontrollers::simulation::Sensor.
Mirrors the Java SensorConfig class. Add typed fields with WithField(), inject simulated values by match-time window or arbitrary trigger with WithSimulatedValue(), then call GetSensor() to obtain the ready-to-use Sensor instance (lazily constructed on first call).
◆ SensorData
◆ SimSensorConfig()
| yams::mechanisms::config::SimSensorConfig::SimSensorConfig |
( |
std::string | name | ) |
|
|
explicit |
◆ GetFields()
| std::vector< SensorData > yams::mechanisms::config::SimSensorConfig::GetFields |
( |
| ) |
const |
Direct access to the registered fields (used by Sensor constructor).
◆ GetName()
| const std::string & yams::mechanisms::config::SimSensorConfig::GetName |
( |
| ) |
const |
◆ GetSensor()
Build (or return cached) Sensor instance.
◆ WithField() [1/4]
| SimSensorConfig & yams::mechanisms::config::SimSensorConfig::WithField |
( |
const std::string & | name, |
|
|
std::function< bool()> | supplier, |
|
|
bool | defaultVal ) |
◆ WithField() [2/4]
| SimSensorConfig & yams::mechanisms::config::SimSensorConfig::WithField |
( |
const std::string & | name, |
|
|
std::function< double()> | supplier, |
|
|
double | defaultVal ) |
◆ WithField() [3/4]
| SimSensorConfig & yams::mechanisms::config::SimSensorConfig::WithField |
( |
const std::string & | name, |
|
|
std::function< int()> | supplier, |
|
|
int | defaultVal ) |
◆ WithField() [4/4]
| SimSensorConfig & yams::mechanisms::config::SimSensorConfig::WithField |
( |
const std::string & | name, |
|
|
std::function< int64_t()> | supplier, |
|
|
int64_t | defaultVal ) |
◆ WithSimulatedValue() [1/8]
| SimSensorConfig & yams::mechanisms::config::SimSensorConfig::WithSimulatedValue |
( |
const std::string & | fieldName, |
|
|
std::function< bool()> | trigger, |
|
|
bool | value ) |
◆ WithSimulatedValue() [2/8]
| SimSensorConfig & yams::mechanisms::config::SimSensorConfig::WithSimulatedValue |
( |
const std::string & | fieldName, |
|
|
std::function< bool()> | trigger, |
|
|
double | value ) |
◆ WithSimulatedValue() [3/8]
| SimSensorConfig & yams::mechanisms::config::SimSensorConfig::WithSimulatedValue |
( |
const std::string & | fieldName, |
|
|
std::function< bool()> | trigger, |
|
|
int | value ) |
◆ WithSimulatedValue() [4/8]
| SimSensorConfig & yams::mechanisms::config::SimSensorConfig::WithSimulatedValue |
( |
const std::string & | fieldName, |
|
|
std::function< bool()> | trigger, |
|
|
int64_t | value ) |
◆ WithSimulatedValue() [5/8]
| SimSensorConfig & yams::mechanisms::config::SimSensorConfig::WithSimulatedValue |
( |
const std::string & | fieldName, |
|
|
wpi::units::second_t | start, |
|
|
wpi::units::second_t | end, |
|
|
bool | value ) |
◆ WithSimulatedValue() [6/8]
| SimSensorConfig & yams::mechanisms::config::SimSensorConfig::WithSimulatedValue |
( |
const std::string & | fieldName, |
|
|
wpi::units::second_t | start, |
|
|
wpi::units::second_t | end, |
|
|
double | value ) |
◆ WithSimulatedValue() [7/8]
| SimSensorConfig & yams::mechanisms::config::SimSensorConfig::WithSimulatedValue |
( |
const std::string & | fieldName, |
|
|
wpi::units::second_t | start, |
|
|
wpi::units::second_t | end, |
|
|
int | value ) |
◆ WithSimulatedValue() [8/8]
| SimSensorConfig & yams::mechanisms::config::SimSensorConfig::WithSimulatedValue |
( |
const std::string & | fieldName, |
|
|
wpi::units::second_t | start, |
|
|
wpi::units::second_t | end, |
|
|
int64_t | value ) |
The documentation for this class was generated from the following file: