Documentation ¶
Overview ¶
Package kpc3plus provides a transport layer for communicating with a JNOS BBS over RF, by way of a serial connection to a Kantronics KPC 3 Plus TNC. The Open function, if successful, returns a Transport that can be passed to jnos.Connect.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrBadEcho = errors.New("sent data not echoed correctly")
ErrBadEcho is returned when the echo of the sent data does not arrive within a reasonable amount of time.
Functions ¶
func Connect ¶
func Connect(serialPort, bbsAddress, mailbox, callsign string, log io.Writer) (c *jnos.Conn, err error)
Connect connects to the JNOS BBS at bbsAddress, by way of a Kantronics KPC-3 Plus TNC attached to serialPort, and returns an open jnos.Conn for interaction with it. (bbsAddress should consist of a call sign, a dash, and a small integer SSID.) It logs into the specified BBS mailbox. If callsign is set and is different from mailbox, it self-identifies periodically using that call sign for FCC compliance. (callsign should be the licensed FCC call sign of the calling user.) If log is set, all traffic except echo-backs is logged to it.
Types ¶
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Transport is the KPC-3 Plus transport to the JNOS BBS.
func Open ¶
Open opens a transport to the JNOS BBS at bbsAddress, by way of a Kantronics KPC-3 Plus TNC attached to serialPort. (bbsAddress should consist of a call sign, a dash, and a small integer SSID.) It logs into the mailbox corresponding to the specified callsign, which must be the licensed FCC call sign of the calling user. (For connecting to other mailboxes, see the Connect function.) If log is set, all traffic except echo-backs is logged to it.
func (*Transport) Close ¶
Close closes the connection to the BBS and resets the configuration of the TNC.
func (*Transport) ReadUntil ¶
ReadUntil reads data from the BBS until the specified string is seen, or a timeout occurs. It returns the data that was read (even if it returns an error).
func (*Transport) ReadUntilT ¶
ReadUntilT reads data from the BBS until the specified string is seen, or the specified timeout occurs. It returns the data that was read (even if it returns an error).
func (*Transport) UseVerboseReads ¶
UseVerboseReads returns whether it's appropriate to use verbose reads when communicating over this transport.