/// <summary> /// <para>Constructor.</para> /// </summary> /// <remarks> /// <para>Introduced with v2.0 of the framework.</para> /// </remarks> /// <param name="commLinkType">Indicates whether Bluetooth or USB should be used for the communication with the NXT brick.</param> /// <param name="serialPortNo">The COM port used. Only relevant for Bluetooth links.</param> public NxtBrick(NxtCommLinkType commLinkType, byte serialPortNo) : this() { switch (commLinkType) { case NxtCommLinkType.Bluetooth: CommLink = new NxtBluetoothConnection(serialPortNo); break; case NxtCommLinkType.USB: CommLink = new NxtUsbConnection(); break; default: throw new ArgumentException("Unknown commLinkType."); } }
public NxtBrick(string serialPortName) : this() { CommLink = new NxtBluetoothConnection(serialPortName); }
public NxtBrick(byte serialPortNo) : this() { CommLink = new NxtBluetoothConnection(serialPortNo); }