Search in sources :

Example 1 with SerialPortIdentifier

use of com.infiniteautomation.mango.io.serial.SerialPortIdentifier in project ma-core-public by infiniteautomation.

the class BaseDwr method refreshCommPorts.

@DwrPermission(user = true)
public Set<String> refreshCommPorts() throws Exception {
    Set<String> portNames = new HashSet<String>();
    Common.serialPortManager.refreshFreeCommPorts();
    List<SerialPortIdentifier> ports = Common.serialPortManager.getAllCommPorts();
    for (SerialPortIdentifier proxy : ports) portNames.add(proxy.getName());
    return portNames;
}
Also used : SerialPortIdentifier(com.infiniteautomation.mango.io.serial.SerialPortIdentifier) HashSet(java.util.HashSet) DwrPermission(com.serotonin.m2m2.web.dwr.util.DwrPermission)

Aggregations

SerialPortIdentifier (com.infiniteautomation.mango.io.serial.SerialPortIdentifier)1 DwrPermission (com.serotonin.m2m2.web.dwr.util.DwrPermission)1 HashSet (java.util.HashSet)1