Documentation
¶
Index ¶
- Constants
- Variables
- type Conn
- func (c *Conn) Close() error
- func (c *Conn) LocalAddr() net.Addr
- func (c *Conn) ReadFrom(p []byte) (n int, addr net.Addr, err error)
- func (c *Conn) SetDeadline(t time.Time) error
- func (c *Conn) SetReadDeadline(t time.Time) error
- func (c *Conn) SetWriteDeadline(t time.Time) error
- func (c *Conn) WriteTo(p []byte, _ net.Addr) (n int, err error)
- type SerialPacketAddr
Constants ¶
View Source
const ( HEADER_SIZE = 2 MAGIC_SIZE = 4 MTU = 240 )
Frame Definition
|MAGIC(4B) | LENGTH (1B) | RESERVE(1B) | DATA (LENGTH) |
Max Packet Size: 240
Variables ¶
View Source
var (
ErrNotImplemented = errors.New("not implemented")
)
View Source
var (
MagicBytes = []byte{0xFF, 0x00, 0xAA, 0x55}
)
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is the packet connection definition for a serial connection
type SerialPacketAddr ¶
type SerialPacketAddr struct {
// contains filtered or unexported fields
}
SerialPacketAddr is the address definition in net.Addr
func NewSerialPacketAddr ¶
func NewSerialPacketAddr(name string) *SerialPacketAddr
NewSerialPacketAddr creates an address with given name and port
func (*SerialPacketAddr) Network ¶
func (addr *SerialPacketAddr) Network() string
func (*SerialPacketAddr) String ¶
func (addr *SerialPacketAddr) String() string
Click to show internal directories.
Click to hide internal directories.