Documentation ¶
Overview ¶
Package schema provides the data structures for internal use of nb1 app.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceDetail ¶
type DeviceDetail struct { // DeviceInfo is the general HID device information of the device. *hid.DeviceInfo // IsBlink1 is true if the device is a blink(1) device. IsBlink1 bool // FirmwareVersion is the blink(1) firmware version of the device. FirmwareVersion int }
DeviceDetail is a struct that contains the device info and extra information.
type PatternSet ¶
type PatternSet struct { Name string `json:"name,omitempty"` // Name of the pattern RepeatTimes uint `json:"repeat"` // How many times to repeat, 0 means infinite Sequence b1.StateSequence `json:"seq,omitempty"` // Slice of states to execute in pattern, non-empty patterns will be set to the device automatically Length uint `json:"len"` // Length of the sequence, it's not necessary to set this field, it will be set automatically }
PatternSet is a set of patterns to execute.
func (*PatternSet) AutoFill ¶
func (ps *PatternSet) AutoFill()
AutoFill fills the length of the sequence automatically.
func (*PatternSet) Validate ¶
func (ps *PatternSet) Validate() error
Validate validates the pattern set.
Click to show internal directories.
Click to hide internal directories.