/*                                                                      *\
**                    SICU Stress Measurement System                    **
**                      Project P04  |  C380 Team A                     **
**          EBME 380: Biomedical Engineering Design Experience          **
**                    Case Western Reserve University                   **
**                          2016 Fall Semester                          **
\*                                                                      */

package edu.cwru.sicu_sms;

import javafx.scene.chart.XYChart;
import jssc.SerialPort;

/**
 * This class is an abstraction for building sub-controller classes to be most likely used by the main {@link Controller} to manage serial connections and other real-time activities pertaining to biomedical signal processing.
 *
 * @since December 3, 2016
 * @author Ted Frohlich <ttf10@case.edu>
 * @author Abby Walker <amw138@case.edu>
 */
abstract class BiosigController {
    
    SerialPort serialPort;
    final XYChart chart;
    final XYChart.Series series;
    
    BiosigController(XYChart chart,
                     XYChart.Series series)
    {
        this.chart = chart;
        this.series = series;
    }
    
}

@@ -605,16 +605,78 @@
 ialPort;
+%0Aimport jssc.SerialPortEvent;%0Aimport jssc.SerialPortException;
 %0A%0A/**%0A *
@@ -1299,10 +1299,1002 @@
  %7D%0A    %0A
+    boolean connect(String portName) %7B%0A        boolean success = false;%0A        final SerialPort serialPort = new SerialPort(portName);%0A        try %7B%0A            serialPort.openPort();%0A            serialPort.setParams(%0A                    SerialPort.BAUDRATE_9600,%0A                    SerialPort.DATABITS_8,%0A                    SerialPort.STOPBITS_1,%0A                    SerialPort.PARITY_NONE);%0A            serialPort.setEventsMask(SerialPort.MASK_RXCHAR);%0A            serialPort.addEventListener((SerialPortEvent serialPortEvent) -%3E %7B%0A                if (serialPortEvent.isRXCHAR()) onSerialPortEvent();%0A            %7D);%0A            this.serialPort = serialPort;%0A            success = true;%0A        %7D%0A        catch (SerialPortException e) %7B%0A            logSerialPortException(e);%0A        %7D%0A        return success;%0A    %7D%0A    %0A    void onSerialPortEvent() %7B%0A        // TODO: 12/4/2016%0A    %7D%0A    %0A    void logSerialPortException(SerialPortException spe) %7B%0A        // TODO: 12/4/2016%0A    %7D%0A    %0A
 %7D%0A

Add and implement 'connect' method, along with a couple other unimplemented methods as dependencies