122 template <
typename F>
128 std::invoke(*
static_cast<F*
>(param), name, handle, direction,
value);
145 template <
typename F>
150 std::invoke(*
static_cast<F*
>(param), name, handle);
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:610
C++ wrapper around a HAL simulator double value handle.
Definition: SimDevice.h:535
C++ wrapper around a HAL simulator enum value handle.
Definition: SimDevice.h:576
C++ wrapper around a HAL simulator int value handle.
Definition: SimDevice.h:453
C++ wrapper around a HAL simulator long value handle.
Definition: SimDevice.h:494
C++ wrapper around a HAL simulator value handle.
Definition: SimDevice.h:401
HAL_Handle HAL_SimDeviceHandle
Definition: Types.h:53
HAL_Handle HAL_SimValueHandle
Definition: Types.h:55
Definition: BatterySim.h:14
static constexpr const unit_t< compound_unit< charge::coulomb, inverse< substance::mol > > > F(N_A *e)
Faraday constant.
HAL Entry Value.
Definition: Value.h:20