1package term 2 3import ( 4 "errors" 5) 6 7type Term struct { 8} 9 10var errNotSupported = errors.New("not supported") 11 12// Open opens an asynchronous communications port. 13func Open(name string, options ...func(*Term) error) (*Term, error) { 14 return nil, errNotSupported 15} 16 17// SetOption takes one or more option function and applies them in order to Term. 18func (t *Term) SetOption(options ...func(*Term) error) error { 19 return errNotSupported 20} 21 22// Read reads up to len(b) bytes from the terminal. It returns the number of 23// bytes read and an error, if any. EOF is signaled by a zero count with 24// err set to io.EOF. 25func (t *Term) Read(b []byte) (int, error) { 26 return 0, errNotSupported 27} 28 29// Write writes len(b) bytes to the terminal. It returns the number of bytes 30// written and an error, if any. Write returns a non-nil error when n != 31// len(b). 32func (t *Term) Write(b []byte) (int, error) { 33 return 0, errNotSupported 34} 35 36// Close closes the device and releases any associated resources. 37func (t *Term) Close() error { 38 return errNotSupported 39} 40 41// SetCbreak sets cbreak mode. 42func (t *Term) SetCbreak() error { 43 return errNotSupported 44} 45 46// CBreakMode places the terminal into cbreak mode. 47func CBreakMode(t *Term) error { 48 return errNotSupported 49} 50 51// SetRaw sets raw mode. 52func (t *Term) SetRaw() error { 53 return errNotSupported 54} 55 56// RawMode places the terminal into raw mode. 57func RawMode(t *Term) error { 58 return errNotSupported 59} 60 61// Speed sets the baud rate option for the terminal. 62func Speed(baud int) func(*Term) error { 63 return func(*Term) error { return errNotSupported } 64} 65 66// SetSpeed sets the receive and transmit baud rates. 67func (t *Term) SetSpeed(baud int) error { 68 return errNotSupported 69} 70 71// GetSpeed gets the transmit baud rate. 72func (t *Term) GetSpeed() (int, error) { 73 return 0, errNotSupported 74} 75 76// Flush flushes both data received but not read, and data written but not transmitted. 77func (t *Term) Flush() error { 78 return errNotSupported 79} 80 81// SendBreak sends a break signal. 82func (t *Term) SendBreak() error { 83 return errNotSupported 84} 85 86// SetDTR sets the DTR (data terminal ready) signal. 87func (t *Term) SetDTR(v bool) error { 88 return errNotSupported 89} 90 91// DTR returns the state of the DTR (data terminal ready) signal. 92func (t *Term) DTR() (bool, error) { 93 return false, errNotSupported 94} 95 96// SetRTS sets the RTS (data terminal ready) signal. 97func (t *Term) SetRTS(v bool) error { 98 return errNotSupported 99} 100 101// RTS returns the state of the RTS (data terminal ready) signal. 102func (t *Term) RTS() (bool, error) { 103 return false, errNotSupported 104} 105 106// Restore restores the state of the terminal captured at the point that 107// the terminal was originally opened. 108func (t *Term) Restore() error { 109 return errNotSupported 110} 111