Files
esdi/cdashdisplay/transportPackets.go
T
esilva 6a37d7e97c Got a bunch of stuff going on here
the main is thing is that I hammered one a way of showing data from an
ibt
2026-02-20 21:51:57 +00:00

48 lines
1.2 KiB
Go

package cdashdisplay
// In this file we will place all structs that are 1:1 representation of the
// types in the device transport layer ->
const (
ShowIDFalse uint8 = 0
ShowIDTrue uint8 = 1
)
type UIDimensions struct {
X0 uint16 `yaml:"X0"`
Y0 uint16 `yaml:"Y0"`
Width uint16 `yaml:"Width"`
Height uint16 `yaml:"Height"`
}
type UIDecorations struct {
BGColour uint16 `yaml:"BGColour"`
FGColour uint16 `yaml:"FGColour"`
TitleColour uint16 `yaml:"TitleColour"`
BorderColour uint16 `yaml:"BorderColour"`
TitleSize uint8 `yaml:"TitleSize"`
TextSize uint8 `yaml:"TextSize"`
HasBorder uint8 `yaml:"HasBorder"`
Padding uint8 `yaml:"Padding"`
}
// NOTE: we can't use FString32 for this - too many bytes
// NOTE: use a bit flags for this options instead
type UIWindowOpts struct {
ShowID uint8 `yaml:"ShowID"`
WinType uint8 `yaml:"WinType"`
PreviewValue FString32 `yaml:"PreviewValue"`
}
type UIWindow struct {
Dims UIDimensions `yaml:"Dims"`
Decor UIDecorations `yaml:"Decor"`
Opts UIWindowOpts `yaml:"Opts"`
Title FString32 `yaml:"Title"`
}
type UIWindowUpdatePacket struct {
WinID int16
Window UIWindow
}