Documentation
¶
Index ¶
Constants ¶
View Source
const ( CmdCommunicateReq = 0xFE CmdCommunicateResp = 0xFF CmdStartReq = 0xB0 CmdResp = 0xF0 CmdRecodeReq = 0xBA CmdCheckResp = 0xE0 CmdCodingResult = 0xE1 CmdCodeReq = 0xB1 CmdLaserReq = 0xB2 )
Variables ¶
View Source
var (
CommunicateErr = errors.New("Serial error")
)
View Source
var (
ErrCommunication = errors.New("communication error")
)
Functions ¶
func BuildPacket ¶ added in v0.0.5
func NewPacketProcessor ¶ added in v0.0.4
func NewPacketProcessor() (pp stream.PacketProcessor)
Types ¶
type CheckResult ¶
type CheckResult struct {
Items []CheckItem
}
type CodingItem ¶
type CodingResult ¶
type CodingResult struct {
LineLength []byte
Items []CodingItem
}
type ProductionLine ¶
type ProductionLine struct {
}
type ProductionLinePacketProcessor ¶ added in v0.0.4
type ProductionLinePacketProcessor struct {
// contains filtered or unexported fields
}
func (*ProductionLinePacketProcessor) Data ¶ added in v0.0.4
func (ppp *ProductionLinePacketProcessor) Data(payload []byte) (n int)
func (*ProductionLinePacketProcessor) Listen ¶ added in v0.0.4
func (ppp *ProductionLinePacketProcessor) Listen(onPacket func(p []byte))
type Sdk ¶
type Sdk interface {
OnProcessStart(h func())
OnCheckConfirm(h func())
CheckReply(cr CheckResult) (err error)
Coding(h func())
Recoding(h func())
CodingReply(cr CodingResult) (err error)
OnCodingResultConfirm(h func())
OnProcessComplete(h func(result bool))
}
Click to show internal directories.
Click to hide internal directories.