public class Noteu
extends java.lang.Object
Constructor and Description |
---|
Noteu(java.lang.String comPort)
Constructs a Noteu instance with a given serial port.
|
Modifier and Type | Method and Description |
---|---|
void |
beep()
Sends beep command to Noteu.
|
java.lang.String |
getSerialNumber()
Queries Noteu for its serial number then waits and catches its response
|
void |
print(java.lang.String ln1,
java.lang.String ln2,
java.lang.String ln3,
java.lang.String ln4)
Prints 4 lines (80 characters) to Noteu.
|
void |
printCenter(java.lang.String ln1,
java.lang.String ln2,
java.lang.String ln3,
java.lang.String ln4)
Prints 4 full (80 characters) to Noteu and centres all text.
|
void |
write(java.lang.String string)
Write serial data to Noteu
|
public Noteu(java.lang.String comPort) throws SerialException
comPort
- - COM port Noteu is currently connected too.SerialException
- - If the serial port can't be set.public void write(java.lang.String string) throws SerialException
string
- Data that you want to sendSerialException
- if the port can't be opened, written too or closed.public void print(java.lang.String ln1, java.lang.String ln2, java.lang.String ln3, java.lang.String ln4) throws SerialException
ln1
- 20 character or less string that is sent to line1 of the Noteu displayln2
- 20 character or less string that is sent to line2 of the Noteu displayln3
- 20 character or less string that is sent to line3 of the Noteu displayln4
- 20 character or less string that is sent to line4 of the Noteu displaySerialException
- if the port can't be opened, written too or closed.public void printCenter(java.lang.String ln1, java.lang.String ln2, java.lang.String ln3, java.lang.String ln4) throws SerialException
ln1
- 20 character or less string that is sent to line1 of the Noteu displayln2
- 20 character or less string that is sent to line2 of the Noteu displayln3
- 20 character or less string that is sent to line3 of the Noteu displayln4
- 20 character or less string that is sent to line4 of the Noteu displaySerialException
- - if the port can't be opened, written too or closed.public void beep() throws SerialException
SerialException
- if port can't be opened or written too.public java.lang.String getSerialNumber() throws SerialException, java.lang.InterruptedException
SerialException
- if the port can't be opened, written too or closed.java.lang.InterruptedException
- if the method is interrupted while waiting for a response.