|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--wonderly.jeaprs.aprs.APRSStreamHandler
|
+--wonderly.jeaprs.net.aprs.IGATEStream
This class provides access to a Internet connected TNC stream. This is still under development and is not known to work correctly.
| Field Summary |
| Fields inherited from interface wonderly.jeaprs.TNC |
TNC_TYPE_EHF, TNC_TYPE_HF, TNC_TYPE_NET, TNC_TYPE_UHF, TNC_TYPE_VHF |
| Constructor Summary | |
IGATEStream()
|
|
| Method Summary | |
void |
close()
Close the stream when done |
void |
flush()
|
java.lang.String |
getHostName()
|
java.io.InputStream |
getInputStream()
Returns the input stream for the TNC. |
java.io.OutputStream |
getOutputStream()
Returns the output stream for the TNC |
int |
getPort()
|
int |
getTNCType()
Returns what type this TNC was configured for (TNC_TYPE_*). |
void |
initialize(wonderly.jeaprs.ui.JeAPRSUI ui)
Set everything up, open ports etc |
void |
initTNC()
Send initialization commands to TNC |
boolean |
isInitialized()
Tracks whether initTNC has been called |
boolean |
isKiss()
|
void |
lockTNC(boolean how)
Causes this object to block/release access to the TNC stream |
byte[] |
readPacket()
Reads a packet from the TNC. |
void |
setHostName(java.lang.String name)
|
void |
setInitialized(boolean how)
|
void |
setKiss(boolean how)
sets the use of KISS mode based on the passed parameter |
void |
setPort(int port)
|
void |
setTNCType(int type)
Sets what type this TNC should be recognized as providing (TNC_TYPE_*). |
java.lang.String |
toString()
|
void |
waitReady()
Waits until the TNC stream is ready to be used |
void |
write(wonderly.jeaprs.ByteString from,
wonderly.jeaprs.ByteString toCall,
wonderly.jeaprs.ByteString path,
byte[] arr)
Write the data in arr to the TNC 'device'. |
void |
write(wonderly.jeaprs.ByteString from,
wonderly.jeaprs.ByteString toCall,
wonderly.jeaprs.ByteString path,
wonderly.jeaprs.ByteString str)
Write the data in strstr to the TNC 'device' followed by a <CR>. |
| Methods inherited from class wonderly.jeaprs.aprs.APRSStreamHandler |
addAPRSEventListener, addAPRSStatusListener, addStreamListener, getAPRSEventListeners, getAPRSStatusListeners, getDebugging, getModuleId, processAPRSPacket, processTNCStream, removeAPRSEventListener, removeAPRSStatusListener, removeStreamListener, sendBadPacket, sendEOFStatus, setDebugging, setModuleId |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface wonderly.jeaprs.io.IOModule |
getModuleId, setModuleId |
| Constructor Detail |
public IGATEStream()
| Method Detail |
public java.lang.String toString()
toString in class APRSStreamHandlerpublic void close()
APRSInput
close in interface APRSInputpublic void setTNCType(int type)
TNC
setTNCType in interface TNCpublic int getTNCType()
TNC
getTNCType in interface TNC
public void flush()
throws java.io.IOException
flush in interface TNCjava.io.IOExceptionpublic boolean isKiss()
isKiss in interface TNCpublic void setKiss(boolean how)
TNC
setKiss in interface TNCpublic java.io.InputStream getInputStream()
TNC
getInputStream in interface TNCpublic void lockTNC(boolean how)
TNC
lockTNC in interface TNCpublic boolean isInitialized()
TNC
isInitialized in interface TNCpublic void setInitialized(boolean how)
public void waitReady()
TNC
waitReady in interface TNCpublic java.lang.String getHostName()
public void setHostName(java.lang.String name)
public void setPort(int port)
public int getPort()
public java.io.OutputStream getOutputStream()
TNC
getOutputStream in interface TNC
public void initialize(wonderly.jeaprs.ui.JeAPRSUI ui)
throws java.io.IOException
TNC
initialize in interface TNCjava.io.IOException
public void write(wonderly.jeaprs.ByteString from,
wonderly.jeaprs.ByteString toCall,
wonderly.jeaprs.ByteString path,
wonderly.jeaprs.ByteString str)
throws java.io.IOException
APRSOutputstrstr to the TNC 'device' followed by a <CR>.
If kissMode is 'true', then
callstr, toCall and pathstr are all used
to formulate a KISS mode packet, otherwise they are ignored.
write in interface APRSOutputtoCall - the to call/unproto field.
java.io.IOException
public void write(wonderly.jeaprs.ByteString from,
wonderly.jeaprs.ByteString toCall,
wonderly.jeaprs.ByteString path,
byte[] arr)
throws java.io.IOException
APRSOutputcallstr, toCall and pathstr are all used
to formulate a KISS mode packet, otherwise they are ignored.
write in interface APRSOutputtoCall - the to call/unproto field.arr - the contents of the packet.
java.io.IOException
public byte[] readPacket()
throws java.io.IOException
APRSInput
readPacket in interface APRSInputjava.io.IOExceptionAPRSStreamHandler,
wonderly.jeaprs.aprs.APRSEventListener,
APRSStatusListenerpublic void initTNC()
TNC
initTNC in interface TNC
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||