Documentation ¶
Index ¶
- type Option
- type Serial
- func (m *Serial) Close() (err error)
- func (m *Serial) Closed() bool
- func (m *Serial) Len() int
- func (m *Serial) Open() (err error)
- func (m *Serial) OptionString() string
- func (m *Serial) Read(p []byte) (n int, err error)
- func (m *Serial) ReadTimeout(data []byte, timeout int) (num int, err error)
- func (m *Serial) Reset()
- func (m *Serial) Write(p []byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Serial ¶
type Serial struct { ReadBufSize int //读取数据的缓冲区 HaveRecv bool //是否开启数据接收线程 // contains filtered or unexported fields }
Serial 串口
func (*Serial) OptionString ¶
func (*Serial) ReadTimeout ¶
ReadTimeout 读取数据直到超时
Directories ¶
Path | Synopsis |
---|---|
* @Author: fuzhuang * @Date: 2023-12-11 09:23:21 * @LastEditTime: 2024-11-20 09:12:19 * @LastEditors: wangjun haodreams@163.com * @Description: * @FilePath: \golib\serialer\test\test.go
|
* @Author: fuzhuang * @Date: 2023-12-11 09:23:21 * @LastEditTime: 2024-11-20 09:12:19 * @LastEditors: wangjun haodreams@163.com * @Description: * @FilePath: \golib\serialer\test\test.go |
Click to show internal directories.
Click to hide internal directories.