Documentation ¶
Index ¶
- Constants
- Variables
- type Transport
- func (t *Transport) Close() error
- func (t *Transport) ID() api.TransportIdentifier
- func (t *Transport) Open(entry string, params api.ParamValues) (err error)
- func (t *Transport) Read(p []byte) (int, error)
- func (t *Transport) ReadyToRead() <-chan struct{}
- func (t *Transport) Write(p []byte) (int, error)
Constants ¶
View Source
const ( ParamNameBaudRate = "baudRate" ParamNameDataBits = "dataBits" ParamNameParity = "parity" ParamNameStopBits = "stopBits" ParamNameReadTimeout = "readTimeout" ParamNameWriteTimeout = "writeTimeout" )
serial transport parameters names
Variables ¶
View Source
var TransportInfo *defs.TransportInfo = &defs.TransportInfo{ Name: "Serial", Params: defs.Params{ ParamNameBaudRate: { Description: "The serial port bitrate", Type: defs.ParamTypeInt32, DefaultValue: "115200", }, ParamNameDataBits: { Description: "The size of the character, bits", Type: defs.ParamTypeEnum, DefaultValue: "8", EnumValues: []string{"5", "6", "7", "8"}, }, ParamNameParity: { Description: "The parity", Type: defs.ParamTypeEnum, DefaultValue: "none", EnumValues: []string{"none", "odd", "even", "mark", "space"}, }, ParamNameStopBits: { Description: "The number of stop bits", Type: defs.ParamTypeEnum, DefaultValue: "1", EnumValues: []string{"1", "1.5", "2"}, }, ParamNameReadTimeout: { Description: "The read timeout, millisecons", Type: defs.ParamTypeUint32, DefaultValue: "3000", }, ParamNameWriteTimeout: { Description: "The write timeout, millisecons", Type: defs.ParamTypeUint32, DefaultValue: "3000", }, }, }
Functions ¶
This section is empty.
Types ¶
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Transport struct - serial Transport implementation
func (*Transport) ID ¶
func (t *Transport) ID() api.TransportIdentifier
func (*Transport) Open ¶
func (t *Transport) Open(entry string, params api.ParamValues) (err error)
Open func
func (*Transport) ReadyToRead ¶
func (t *Transport) ReadyToRead() <-chan struct{}
ReadyToRead function, singal in the channel if something could be read from the port or port state has changed
Click to show internal directories.
Click to hide internal directories.