Documentation
¶
Overview ¶
Package myrtio adds support for MyrtIO APIs
Index ¶
Constants ¶
View Source
const ( // MaxMessageLength represents the maximum allowed length for a message. MaxMessageLength = 128 // MetaHeaderPadding represents header size (header (2) + length) MetaHeaderPadding = 3 // MinMessageLength represents the minimum allowed message length. // header + feature + action + tail MinMessageLength = MetaHeaderPadding + 3 )
View Source
const ( // FirstHeaderCode represents the first header code. FirstHeaderCode byte = 0xFE // SecondHeaderCode represents the second header code. SecondHeaderCode byte = 0xEF // TailCode represents the tail code. TailCode byte = 0xAF // SuccessCode represents the success code. SuccessCode byte = 0xEE // ErrorCode represents the error code. ErrorCode byte = 0xFF )
Variables ¶
View Source
var ErrWrongHeader = errors.New("unexpected header codes")
ErrWrongHeader is returned when given message contains wrong header codes
View Source
var ErrWrongLength = errors.New("message length is not correct")
ErrWrongLength is returned when given message has incorrect length
View Source
var ErrWrongTail = errors.New("unexpected tail code")
ErrWrongTail is returned when given message contains wrong tail code
Functions ¶
This section is empty.
Types ¶
type Message ¶
Message represent MyrtIO message
func ParseMessage ¶
ParseMessage parses message from raw bytes slice
func (*Message) SkipStatus ¶ added in v0.0.4
SkipStatus returns payload without first status value
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
load_testing
command
MyrtIO terminal example
|
MyrtIO terminal example |
|
terminal
command
MyrtIO terminal example
|
MyrtIO terminal example |
|
terminal/color
Package color adds CLI coloring
|
Package color adds CLI coloring |
|
terminal/repl
Package repl contains MyrtIO REPL core
|
Package repl contains MyrtIO REPL core |
|
Package serial contains utilities for MyrtIO API through serial connection
|
Package serial contains utilities for MyrtIO API through serial connection |
Click to show internal directories.
Click to hide internal directories.