Files
picomap/lib/client/types.go

29 lines
530 B
Go
Raw Normal View History

package client
import "github.com/theater/picomap/lib/msgpack"
type ResponsePICOBOOT struct{}
type RequestPICOBOOT struct{}
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, (*ResponsePICOBOOT)(nil))
msgpack.RegisterExt(2, (*RequestPICOBOOT)(nil))
msgpack.RegisterExt(3, (*DeviceError)(nil))
}