public class Controller
extends java.lang.Object
Constructor and Description |
---|
Controller(Model model)
Controller's constructor with a Model in parametter
|
Modifier and Type | Method and Description |
---|---|
void |
addView(View view)
Connect a view to this controller
|
void |
connect(java.lang.String selectedPortIdentifier)
Connect the interface to the selected COM port
|
void |
sendThreshold()
Send the new threshold temparature to the connected COM port
|
void |
serialWriter(java.lang.String message)
Send a message to the connected COM port.
|
public Controller(Model model)
model
- Model to link to this controllerpublic void addView(View view)
view
- View to link to this controllerpublic void sendThreshold()
public void connect(java.lang.String selectedPortIdentifier) throws gnu.io.PortInUseException
selectedPortIdentifier
- The name of the target COM portgnu.io.PortInUseException
- When the target COM port is already usedpublic void serialWriter(java.lang.String message)
message
- String any string without a CR or LF.