122 template <
typename F>
127 int direction,
const struct HAL_Value* value) {
128 std::invoke(*
static_cast<F*
>(param), name, handle, direction, value);
145 template <
typename F>
void HALSIM_EnumerateSimValues(HAL_SimDeviceHandle device, void *param, HALSIM_SimValueCallback callback)
void HALSIM_EnumerateSimDevices(const char *prefix, void *param, HALSIM_SimDeviceCallback callback)
Class to control the simulation side of a SimDevice.
Definition: SimDeviceSim.h:19
hal::SimInt GetInt(const char *name) const
Get the property object with the given name.
static std::vector< std::string > GetEnumOptions(hal::SimEnum val)
Get all options for the given enum.
hal::SimEnum GetEnum(const char *name) const
Get the property object with the given name.
void EnumerateValues(F callback) const
Get all properties.
Definition: SimDeviceSim.h:123
SimDeviceSim(const char *name, int index)
Constructs a SimDeviceSim.
SimDeviceSim(const char *name)
Constructs a SimDeviceSim.
hal::SimBoolean GetBoolean(const char *name) const
Get the property object with the given name.
hal::SimDouble GetDouble(const char *name) const
Get the property object with the given name.
hal::SimLong GetLong(const char *name) const
Get the property object with the given name.
static void ResetData()
Reset all SimDevice data.
SimDeviceSim(const char *name, int index, int channel)
Constructs a SimDeviceSim.
SimDeviceSim(HAL_SimDeviceHandle handle)
Constructs a SimDeviceSim.
std::string GetName() const
Get the name of this object.
static void EnumerateDevices(const char *prefix, F callback)
Get all sim devices with the given prefix.
Definition: SimDeviceSim.h:146
hal::SimValue GetValue(const char *name) const
Get the property object with the given name.
C++ wrapper around a HAL simulator boolean value handle.
Definition: SimDevice.h:608
C++ wrapper around a HAL simulator double value handle.
Definition: SimDevice.h:533
C++ wrapper around a HAL simulator enum value handle.
Definition: SimDevice.h:574
C++ wrapper around a HAL simulator int value handle.
Definition: SimDevice.h:451
C++ wrapper around a HAL simulator long value handle.
Definition: SimDevice.h:492
C++ wrapper around a HAL simulator value handle.
Definition: SimDevice.h:399
HAL_Handle HAL_SimDeviceHandle
Definition: Types.h:53
HAL_Handle HAL_SimValueHandle
Definition: Types.h:55
Definition: XboxControllerSim.h:13
static constexpr const unit_t< compound_unit< charge::coulomb, inverse< substance::mol > > > F(N_A *e)
Faraday constant.
constexpr auto invoke(Fn &&f, Args &&...args) noexcept(noexcept(std::mem_fn(f)(std::forward< Args >(args)...))) -> decltype(std::mem_fn(f)(std::forward< Args >(args)...))
Definition: expected:287
HAL Entry Value.
Definition: Value.h:20