[sim] Add SimDeviceSim ctor overloads (#3134)

Better parallelism with SimDevice.create(), so teams don't have to mess with concatenating the index/channel themselves.
This commit is contained in:
Starlight220
2021-02-13 08:17:13 +02:00
committed by GitHub
parent 247420c9c1
commit d447c7dc32
3 changed files with 56 additions and 0 deletions

View File

@@ -28,6 +28,27 @@ public class SimDeviceSim {
m_handle = SimDeviceDataJNI.getSimDeviceHandle(name);
}
/**
* Constructs a SimDeviceSim.
*
* @param name name of the SimDevice
* @param index device index number to append to name
*/
public SimDeviceSim(String name, int index) {
this(name + "[" + index + "]");
}
/**
* Constructs a SimDeviceSim.
*
* @param name name of the SimDevice
* @param index device index number to append to name
* @param channel device channel number to append to name
*/
public SimDeviceSim(String name, int index, int channel) {
this(name + "[" + index + "," + channel + "]");
}
/**
* Get the property object with the given name.
*