Files
picomap/lib/client/types.go

38 lines
735 B
Go

package client
import "github.com/theater/picomap/lib/msgpack"
type RequestPICOBOOT struct{}
type ResponsePICOBOOT struct{}
type RequestInfo struct{}
type ResponseInfo struct {
BoardID [8]byte
MAC [6]byte
LinkLocal [16]byte
}
type DeviceError struct {
Code uint32
Message string
}
func (e *DeviceError) Error() string {
return e.Message
}
type Envelope struct {
MessageID uint32
Checksum uint32
Payload []byte
}
func init() {
msgpack.RegisterExt(0, (*Envelope)(nil))
msgpack.RegisterExt(1, (*DeviceError)(nil))
msgpack.RegisterExt(2, (*RequestPICOBOOT)(nil))
msgpack.RegisterExt(3, (*ResponsePICOBOOT)(nil))
msgpack.RegisterExt(4, (*RequestInfo)(nil))
msgpack.RegisterExt(5, (*ResponseInfo)(nil))
}