SimDevice_SimDevice

Function SimDevice_SimDevice 

Source
pub unsafe extern "C" fn SimDevice_SimDevice(
    this: *mut SimDevice,
    name: *const c_char,
    index: c_int,
)
Expand description

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.

If not in simulation, results in an “empty” object that evaluates to false in a boolean context.

@param name device name @param index device index number to append to name