|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgiovynet.nativelink.SerialPort
giovynet.serial.Com
public class Com
This class represents a serial port null moden.
| Nested Class Summary | |
|---|---|
class |
Com.ActionListenerReadPortException
Action Listener from read port exception. |
class |
Com.ComException
Com Exception. |
| Field Summary |
|---|
| Fields inherited from class giovynet.nativelink.SerialPort |
|---|
OS |
| Constructor Summary | |
|---|---|
Com(Parameters parameters)
Object that handles the serial null modem communication |
|
| Method Summary | |
|---|---|
void |
addActionListenerReadPort(ActionListenerReadPort actionListenerReadPort)
ONLY FOR WINDOWS O.S. |
void |
close()
Close seril port. |
char |
receiveSingleChar()
Read a character and it returns like type char. |
int |
receiveSingleDataInt()
Receives a single data, like integer representation. |
java.lang.String |
receiveSingleString()
Read a character and it returns like type String. |
java.lang.String |
receiveToString(int amount)
Receives data and returns them in String. |
void |
receiveToStringBuilder(int untilAmount,
java.lang.StringBuilder stringBuilder)
Receives data type "String" and stores them in an instance of the StringBuilder class. |
void |
removeActionListenerReadPort()
ONLY FOR WINDOWS O.S. |
void |
sendArrayChar(char[] data)
Write array char. |
void |
sendSingleData(char data)
Write a single chraracter like char type. |
void |
sendSingleData(int data)
Send a single data, like integer representation or hex representation with prefix Ox. |
void |
sendSingleData(java.lang.String data)
Write a single character like String type. |
void |
sendString(java.lang.String data)
ONLY FOR WINDOWS O.S. |
| Methods inherited from class giovynet.nativelink.SerialPort |
|---|
closePortC, getFreeSerialPort, getStateSerialPortC, openPortC, readDataInt, readPortC, readPortLikeCharC, setTimeOutSerialPortC, writeDataInt, writePortC, writePortC |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Com(Parameters parameters)
throws java.lang.Exception
parameters -
Com.ComException
java.lang.Exception| Method Detail |
|---|
public void sendString(java.lang.String data)
throws java.lang.Exception
data - String to send
Com.ComException
java.lang.Exception
public void sendArrayChar(char[] data)
throws java.lang.Exception
data - Array char to send.
Com.ComException
java.lang.Exception
public java.lang.String receiveToString(int amount)
throws java.lang.Exception
amount - Number of characters to receive.
java.lang.Exception
public void receiveToStringBuilder(int untilAmount,
java.lang.StringBuilder stringBuilder)
throws java.lang.Exception
untilAmount - Number of characters to receive.stringBuilder - StringBuilder to store characters received.
java.lang.Exception
public java.lang.String receiveSingleString()
throws java.lang.Exception
Com.ComException
java.lang.Exception
public char receiveSingleChar()
throws java.lang.Exception
Com.ComException
java.lang.Exception
public int receiveSingleDataInt()
throws java.lang.Exception
Com.ComException
java.lang.Exception
public void sendSingleData(java.lang.String data)
throws java.lang.Exception
data - String
Com.ComException
java.lang.Exception
public void sendSingleData(char data)
throws java.lang.Exception
data - char
Com.ComException
java.lang.Exception
public void sendSingleData(int data)
throws java.lang.Exception
data -
java.lang.Exception
public void close()
throws java.lang.Exception
java.lang.Exception
public void addActionListenerReadPort(ActionListenerReadPort actionListenerReadPort)
throws Com.ActionListenerReadPortException
actionListenerReadPort -
serial.Com.ActionListenerReadPortException
Com.ActionListenerReadPortException
public void removeActionListenerReadPort()
throws Com.ComException
serial.Com.ComException
Com.ComException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||