|
| SimDevice ()=default |
| Default constructor that results in an "empty" object that is false in a boolean context.
|
|
| SimDevice (const char *name) |
| Creates a simulated device.
|
|
| SimDevice (const char *name, int index) |
| Creates a simulated device.
|
|
| SimDevice (const char *name, int index, int channel) |
| Creates a simulated device.
|
|
| ~SimDevice () |
|
| SimDevice (const SimDevice &)=delete |
|
SimDevice & | operator= (const SimDevice &)=delete |
|
| SimDevice (SimDevice &&rhs) |
|
SimDevice & | operator= (SimDevice &&rhs) |
|
| operator bool () const |
| Determine if handle is empty.
|
|
| operator HAL_SimDeviceHandle () const |
| Get the internal device handle.
|
|
std::string | GetName () const |
| Get the name of the simulated device.
|
|
SimValue | CreateValue (const char *name, int32_t direction, const HAL_Value &initialValue) |
| Creates a value on the simulated device.
|
|
SimInt | CreateInt (const char *name, int32_t direction, int32_t initialValue) |
| Creates an int value on the simulated device.
|
|
SimLong | CreateLong (const char *name, int32_t direction, int64_t initialValue) |
| Creates a long value on the simulated device.
|
|
SimDouble | CreateDouble (const char *name, int32_t direction, double initialValue) |
| Creates a double value on the simulated device.
|
|
SimEnum | CreateEnum (const char *name, int32_t direction, std::initializer_list< const char * > options, int32_t initialValue) |
| Creates an enumerated value on the simulated device.
|
|
SimEnum | CreateEnum (const char *name, int32_t direction, std::span< const char *const > options, int32_t initialValue) |
| Creates an enumerated value on the simulated device.
|
|
SimEnum | CreateEnumDouble (const char *name, int32_t direction, std::initializer_list< const char * > options, std::initializer_list< double > optionValues, int32_t initialValue) |
| Creates an enumerated value on the simulated device with double values.
|
|
SimEnum | CreateEnumDouble (const char *name, int32_t direction, std::span< const char *const > options, std::span< const double > optionValues, int32_t initialValue) |
| Creates an enumerated value on the simulated device with double values.
|
|
SimBoolean | CreateBoolean (const char *name, int32_t direction, bool initialValue) |
| Creates a boolean value on the simulated device.
|
|
A move-only C++ wrapper around a HAL simulator device handle.
hal::SimDevice::SimDevice |
( |
const char * | name | ) |
|
|
inlineexplicit |
Creates a simulated device.
The device name must be unique. Returns null if the device name already exists. If multiple instances of the same device are desired, recommend appending the instance/unique identifier in brackets to the base name, e.g. "device[1]".
Using a device name of the form "Type:Name" will create a WebSockets node with a type value of "Type" and a device value of "Name"
If not in simulation, results in an "empty" object that evaluates to false in a boolean context.
- Parameters
-
hal::SimDevice::SimDevice |
( |
const char * | name, |
|
|
int | index ) |
Creates a simulated device.
The device name must be unique. Returns null if the device name already exists. This is a convenience method that appends index in brackets to the device name, e.g. passing index=1 results in "device[1]" for the device name.
Using a device name of the form "Type:Name" will create a WebSockets node with a type value of "Type" and a device value of "Name"
If not in simulation, results in an "empty" object that evaluates to false in a boolean context.
- Parameters
-
name | device name |
index | device index number to append to name |
hal::SimDevice::SimDevice |
( |
const char * | name, |
|
|
int | index, |
|
|
int | channel ) |
Creates a simulated device.
The device name must be unique. Returns null if the device name already exists. This is a convenience method that appends index and channel in brackets to the device name, e.g. passing index=1 and channel=2 results in "device[1,2]" for the device name.
Using a device name of the form "Type:Name" will create a WebSockets node with a type value of "Type" and a device value of "Name"
If not in simulation, results in an "empty" object that evaluates to false in a boolean context.
- Parameters
-
name | device name |
index | device index number to append to name |
channel | device channel number to append to name |