Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeCtrlChar ¶
func EncodeCtrlChar(cc ControlChar, p uint32) (out []byte)
func EncodeDataBytes ¶
Types ¶
type ControlChar ¶
type ControlChar uint8
const ( ChNone ControlChar = 0x00 ChHandshake1 ControlChar = 0x80 ChHandshake2 ControlChar = 0x81 ChStartPacket ControlChar = 0x82 ChEndPacket ControlChar = 0x83 ChErrorPacket ControlChar = 0x84 ChFlowControl ControlChar = 0x85 ChKeepAlive ControlChar = 0x86 ChEscapeSym ControlChar = 0x87 // ChCodecError is an alias, because EscapeSym never needs to be passed to an upper layer ChCodecError = ChEscapeSym )
func (ControlChar) IsParametrized ¶
func (cc ControlChar) IsParametrized() bool
func (ControlChar) String ¶
func (cc ControlChar) String() string
func (ControlChar) Validate ¶
func (cc ControlChar) Validate(param uint32)
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
func MakeCharDecoder ¶
func MakeCharDecoder(readData func([]byte), readCtrl func(ControlChar)) *Decoder
func MakeDecoder ¶
func MakeDecoder(readData func([]byte), readCtrl func(ControlChar, uint32)) *Decoder
MakeDecoder is the same as MakeCharDecoder, but additionally decodes parametrized control characters.
Click to show internal directories.
Click to hide internal directories.