Exemple #1
0
 public static SerialPortAddress[] GetSerialPorts()
 {
     string[]            portNames = SerialPort.GetPortNames();
     SerialPortAddress[] ports     = new SerialPortAddress[portNames.Length];
     for (int i = 0; i < portNames.Length; i++)
     {
         ports[i] = new SerialPortAddress(portNames[i]);
     }
     Task.Factory.StartNew(() => UpdateSerialPortsWithDescriptions(ports));
     return(ports);
 }
Exemple #2
0
 public ArmConnector(SerialPortAddress portAddress) : this(portAddress.Name)
 {
 }