wonderly.jeaprs
Interface TNC

All Superinterfaces:
APRSInput, APRSOutput, IOModule
All Known Implementing Classes:
IGATEStream, JeAPRS.SocketAPRS, TNCStream

public interface TNC
extends APRSInput, APRSOutput, IOModule

This interface defines the methods that must be implemented by a class wishing to provide access to a TNC in JeAPRS.

Version:
1.0
Author:
Gregg Wonderly - The information contained in this document is Copyright 2001-2003, Gregg Wonderly, all rights reserved.

Field Summary
static int TNC_TYPE_EHF
          This TNC is an EHF connected TNC.
static int TNC_TYPE_HF
          This TNC is an HF connected TNC.
static int TNC_TYPE_NET
          This TNC is an internet connected TNC.
static int TNC_TYPE_UHF
          This TNC is an UHF connected TNC.
static int TNC_TYPE_VHF
          This TNC is a VHF connected TNC.
 
Method Summary
 void flush()
           
 java.io.InputStream getInputStream()
          Returns the input stream for the TNC.
 java.io.OutputStream getOutputStream()
          Returns the output stream for the TNC
 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 lock)
          Causes this object to block/release access to the TNC stream
 void setKiss(boolean how)
          sets the use of KISS mode based on the passed parameter
 void setTNCType(int type)
          Sets what type this TNC should be recognized as providing (TNC_TYPE_*).
 void waitReady()
          Waits until the TNC stream is ready to be used
 
Methods inherited from interface wonderly.jeaprs.io.aprs.APRSInput
close, readPacket
 
Methods inherited from interface wonderly.jeaprs.io.aprs.APRSOutput
close, write, write
 
Methods inherited from interface wonderly.jeaprs.io.IOModule
getModuleId, setModuleId
 

Field Detail

TNC_TYPE_VHF

public static final int TNC_TYPE_VHF
This TNC is a VHF connected TNC.

See Also:
Constant Field Values

TNC_TYPE_HF

public static final int TNC_TYPE_HF
This TNC is an HF connected TNC.

See Also:
Constant Field Values

TNC_TYPE_UHF

public static final int TNC_TYPE_UHF
This TNC is an UHF connected TNC.

See Also:
Constant Field Values

TNC_TYPE_EHF

public static final int TNC_TYPE_EHF
This TNC is an EHF connected TNC.

See Also:
Constant Field Values

TNC_TYPE_NET

public static final int TNC_TYPE_NET
This TNC is an internet connected TNC.

See Also:
Constant Field Values
Method Detail

setTNCType

public void setTNCType(int type)
                throws ModeNotSupportedException
Sets what type this TNC should be recognized as providing (TNC_TYPE_*).

ModeNotSupportedException

getTNCType

public int getTNCType()
Returns what type this TNC was configured for (TNC_TYPE_*).


isKiss

public boolean isKiss()
Returns:
true if this TNC is in KISS mode

setKiss

public void setKiss(boolean how)
             throws ModeNotSupportedException
sets the use of KISS mode based on the passed parameter

ModeNotSupportedException

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Returns the input stream for the TNC.

java.io.IOException

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Returns the output stream for the TNC

java.io.IOException

lockTNC

public void lockTNC(boolean lock)
Causes this object to block/release access to the TNC stream


initialize

public void initialize(wonderly.jeaprs.ui.JeAPRSUI ui)
                throws java.io.IOException
Set everything up, open ports etc

java.io.IOException

initTNC

public void initTNC()
             throws java.io.IOException
Send initialization commands to TNC

java.io.IOException

isInitialized

public boolean isInitialized()
Tracks whether initTNC has been called


waitReady

public void waitReady()
Waits until the TNC stream is ready to be used


flush

public void flush()
           throws java.io.IOException
java.io.IOException