Class to control the simulation side of a SimDevice.
More...
#include <frc/simulation/SimDeviceSim.h>
Class to control the simulation side of a SimDevice.
◆ SimDeviceSim() [1/4]
frc::sim::SimDeviceSim::SimDeviceSim |
( |
const char * |
name | ) |
|
|
explicit |
Constructs a SimDeviceSim.
- Parameters
-
name | name of the SimDevice |
◆ SimDeviceSim() [2/4]
frc::sim::SimDeviceSim::SimDeviceSim |
( |
const char * |
name, |
|
|
int |
index |
|
) |
| |
Constructs a SimDeviceSim.
- Parameters
-
name | name of the SimDevice |
index | device index number to append to name |
◆ SimDeviceSim() [3/4]
frc::sim::SimDeviceSim::SimDeviceSim |
( |
const char * |
name, |
|
|
int |
index, |
|
|
int |
channel |
|
) |
| |
Constructs a SimDeviceSim.
- Parameters
-
name | name of the SimDevice |
index | device index number to append to name |
channel | device channel number to append to name |
◆ SimDeviceSim() [4/4]
Constructs a SimDeviceSim.
- Parameters
-
handle | the low level handle for the corresponding SimDevice. |
◆ EnumerateDevices()
template<typename F >
static void frc::sim::SimDeviceSim::EnumerateDevices |
( |
const char * |
prefix, |
|
|
F |
callback |
|
) |
| |
|
inlinestatic |
Get all sim devices with the given prefix.
- Parameters
-
prefix | the prefix to filter sim devices |
callback | callback function to call for each sim device |
◆ EnumerateValues()
template<typename F >
void frc::sim::SimDeviceSim::EnumerateValues |
( |
F |
callback | ) |
const |
|
inline |
Get all properties.
- Parameters
-
callback | callback called for each property (SimValue). Signature of the callback must be const char*, HAL_SimValueHandle, int, const HAL_Value* |
◆ GetBoolean()
hal::SimBoolean frc::sim::SimDeviceSim::GetBoolean |
( |
const char * |
name | ) |
const |
Get the property object with the given name.
- Parameters
-
- Returns
- the property object
◆ GetDouble()
hal::SimDouble frc::sim::SimDeviceSim::GetDouble |
( |
const char * |
name | ) |
const |
Get the property object with the given name.
- Parameters
-
- Returns
- the property object
◆ GetEnum()
hal::SimEnum frc::sim::SimDeviceSim::GetEnum |
( |
const char * |
name | ) |
const |
Get the property object with the given name.
- Parameters
-
- Returns
- the property object
◆ GetEnumOptions()
static std::vector< std::string > frc::sim::SimDeviceSim::GetEnumOptions |
( |
hal::SimEnum |
val | ) |
|
|
static |
Get all options for the given enum.
- Parameters
-
- Returns
- names of the different values for that enum
◆ GetInt()
hal::SimInt frc::sim::SimDeviceSim::GetInt |
( |
const char * |
name | ) |
const |
Get the property object with the given name.
- Parameters
-
- Returns
- the property object
◆ GetLong()
hal::SimLong frc::sim::SimDeviceSim::GetLong |
( |
const char * |
name | ) |
const |
Get the property object with the given name.
- Parameters
-
- Returns
- the property object
◆ GetName()
std::string frc::sim::SimDeviceSim::GetName |
( |
| ) |
const |
Get the name of this object.
- Returns
- name
◆ GetValue()
hal::SimValue frc::sim::SimDeviceSim::GetValue |
( |
const char * |
name | ) |
const |
Get the property object with the given name.
- Parameters
-
- Returns
- the property object
◆ operator HAL_SimDeviceHandle()
Get the raw handle of this object.
- Returns
- the handle used to refer to this object
◆ ResetData()
static void frc::sim::SimDeviceSim::ResetData |
( |
| ) |
|
|
static |
Reset all SimDevice data.
The documentation for this class was generated from the following file: