Documentation ¶
Index ¶
- type FlyBuffer
- func (b *FlyBuffer) Bytes() []byte
- func (b *FlyBuffer) Cap() int
- func (b *FlyBuffer) Grow(n int)
- func (b *FlyBuffer) Len() int
- func (b *FlyBuffer) Next(n int) []byte
- func (b *FlyBuffer) Read(p []byte) (n int, err error)
- func (b *FlyBuffer) ReadByte() (c byte, err error)
- func (b *FlyBuffer) ReadBytes(delim byte) (line []byte, err error)
- func (b *FlyBuffer) ReadFrom(r io.Reader) (n int64, err error)
- func (b *FlyBuffer) ReadRune() (r rune, size int, err error)
- func (b *FlyBuffer) ReadString(delim byte) (line string, err error)
- func (b *FlyBuffer) Reset()
- func (b *FlyBuffer) String() string
- func (b *FlyBuffer) Truncate(n int)
- func (b *FlyBuffer) UnreadByte() error
- func (b *FlyBuffer) UnreadRune() error
- func (b *FlyBuffer) Write(p []byte) (n int, err error)
- func (b *FlyBuffer) WriteByte(c byte) error
- func (b *FlyBuffer) WriteRune(r rune) (n int, err error)
- func (b *FlyBuffer) WriteString(s string) (n int, err error)
- func (b *FlyBuffer) WriteTo(w io.Writer) (n int64, err error)
- type FlySerial
- func (serial *FlySerial) ClearBuffer()
- func (serial *FlySerial) Close() error
- func (serial *FlySerial) GetName() string
- func (serial *FlySerial) OnData(cb func([]byte))
- func (serial *FlySerial) OnErr(cb func(err interface{}))
- func (serial *FlySerial) Open(settings *FlySerialSettings) (io.ReadWriteCloser, error)
- func (serial *FlySerial) Print(data string) (int, error)
- func (serial *FlySerial) Println(data string) (int, error)
- func (serial *FlySerial) Read(p []byte) (int, error)
- func (serial *FlySerial) ReadLine(delim byte, delay_ms int64, timeout_ms int64) ([]byte, error)
- func (serial *FlySerial) ReadLineString(delim byte, delay_ms int64, timeout_ms int64) (string, error)
- func (serial *FlySerial) Write(data []byte) (int, error)
- type FlySerialSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FlyBuffer ¶
type FlyBuffer struct {
// contains filtered or unexported fields
}
func (*FlyBuffer) UnreadByte ¶
func (*FlyBuffer) UnreadRune ¶
type FlySerial ¶
type FlySerial struct { Settings *FlySerialSettings Port io.ReadWriteCloser IsOpen bool Buffer FlyBuffer Ready bool // contains filtered or unexported fields }
func NewFlySerial ¶
func NewFlySerial() *FlySerial
func (*FlySerial) Open ¶
func (serial *FlySerial) Open(settings *FlySerialSettings) (io.ReadWriteCloser, error)
打开串口
type FlySerialSettings ¶
type FlySerialSettings struct { Enable bool ConfigType string ConfigKey string Debug bool Port string BaudRate uint DataBits uint ParityMode string StopBits uint MinimumReadSize uint InterCharacterTimeout uint LoopDisable bool Ready bool }
func NewFlySerialSettings ¶
func NewFlySerialSettings() *FlySerialSettings
func (*FlySerialSettings) LoadIni ¶
func (s *FlySerialSettings) LoadIni(config *FlyConfigFile.FlyIni, key string) error
从ini加载配置信息
Click to show internal directories.
Click to hide internal directories.