ubxcfgval

package
v0.0.0-...-0cb6901 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

TPKeyPairs maps TP1 keys to their TP2 equivalents. Each entry is [TP1, TP2]. Keys without a Tp1/Tp2 suffix (e.g. KTpPulseDef, KTpPulseLengthDef, KTpAntCabledelay) are shared and not included.

Functions

func AddItem

func AddItem[T comparable](items *[]Item, k TypedKey[T], v T)

func AddKey

func AddKey[T comparable](keys *[]Key, k TypedKey[T])

func KeyRemap

func KeyRemap(pairs [][2]AnyTypedKey, from, to int) map[Key]Key

KeyRemap builds a Key-to-Key mapping from a set of key pairs. from and to select which element of each pair is the source and destination: e.g. KeyRemap(pairs, 1, 0) maps from the second element to the first.

func MakeMsgoutGroup

func MakeMsgoutGroup() map[string]Desc

func MapGet

func MapGet[T comparable](m Map, k TypedKey[T]) (t T, ok bool)

func MapSet

func MapSet[T comparable](m Map, k TypedKey[T], v T)

func MarshalItems

func MarshalItems(items []Item) ([]byte, error)

func MarshalKeys

func MarshalKeys(keys []Key) []byte

func SortItems

func SortItems(items []Item)

Types

type AnyTypedKey

type AnyTypedKey interface {
	Key() Key
}

type Desc

type Desc interface {
	MarshalValue(v any) (uint64, error)
	UnmarshalValue(data uint64) (any, error)
	// contains filtered or unexported methods
}

type EDesc

type EDesc struct {
	// contains filtered or unexported fields
}

func E

func E(k uint32, values ...string) *EDesc

func (*EDesc) MarshalValue

func (d *EDesc) MarshalValue(v any) (uint64, error)

func (*EDesc) UnmarshalValue

func (d *EDesc) UnmarshalValue(data uint64) (any, error)

type EnumHwAntSupEngine

type EnumHwAntSupEngine uint8
const (
	EHwAntSupEngineExt EnumHwAntSupEngine = iota
	EHwAntSupEngineMadc
)

type EnumHwRfLnaMode

type EnumHwRfLnaMode uint8
const (
	EHwRfLnaModeNormal EnumHwRfLnaMode = iota
	EHwRfLnaModeLowgain
	EHwRfLnaModeBypass
)

type EnumNavhpgDgnssmode

type EnumNavhpgDgnssmode uint8
const (
	ENavhpgDgnssmodeRtkFloat EnumNavhpgDgnssmode
	ENavhpgDgnssmodeRtkFixed

	ENavhpgDgnssmodeRtkCar
)

type EnumNavspgDynmodel

type EnumNavspgDynmodel uint8
const (
	ENavspgDynmodelPort EnumNavspgDynmodel = iota

	ENavspgDynmodelStat
	ENavspgDynmodelPed
	ENavspgDynmodelAutomot
	ENavspgDynmodelSea
	ENavspgDynmodelAir1
	ENavspgDynmodelAir2
	ENavspgDynmodelAir4
	ENavspgDynmodelWrist
	ENavspgDynmodelBike
	ENavspgDynmodelMower
	ENavspgDynmodelEscooter
)

type EnumNavspgFixmode

type EnumNavspgFixmode uint8
const (
	ENavspgFixmode2donly EnumNavspgFixmode
	ENavspgFixmode3donly
	ENavspgFixmodeAuto
)

type EnumNavspgSigattcomp

type EnumNavspgSigattcomp uint8
const (
	ENavspgSigattcompDis EnumNavspgSigattcomp = iota
	ENavspgSigattcomp01dbhz
	ENavspgSigattcomp02dbhz
	ENavspgSigattcomp03dbhz
	ENavspgSigattcomp04dbhz
	ENavspgSigattcomp05dbhz
	ENavspgSigattcomp06dbhz
	ENavspgSigattcomp07dbhz
	ENavspgSigattcomp08dbhz
	ENavspgSigattcomp09dbhz
	ENavspgSigattcomp10dbhz
	ENavspgSigattcomp11dbhz
	ENavspgSigattcomp12dbhz
	ENavspgSigattcomp13dbhz
	ENavspgSigattcomp14dbhz
	ENavspgSigattcomp15dbhz
	ENavspgSigattcomp16dbhz
	ENavspgSigattcomp17dbhz
	ENavspgSigattcomp18dbhz
	ENavspgSigattcomp19dbhz
	ENavspgSigattcomp20dbhz
	ENavspgSigattcomp21dbhz
	ENavspgSigattcomp22dbhz
	ENavspgSigattcomp23dbhz
	ENavspgSigattcomp24dbhz
	ENavspgSigattcomp25dbhz
	ENavspgSigattcomp26dbhz
	ENavspgSigattcomp27dbhz
	ENavspgSigattcomp28dbhz
	ENavspgSigattcomp29dbhz
	ENavspgSigattcomp30dbhz
	ENavspgSigattcomp31dbhz
	ENavspgSigattcomp32dbhz
	ENavspgSigattcomp33dbhz
	ENavspgSigattcomp34dbhz
	ENavspgSigattcomp35dbhz
	ENavspgSigattcomp36dbhz
	ENavspgSigattcomp37dbhz
	ENavspgSigattcomp38dbhz
	ENavspgSigattcomp39dbhz
	ENavspgSigattcomp40dbhz
	ENavspgSigattcomp41dbhz
	ENavspgSigattcomp42dbhz
	ENavspgSigattcomp43dbhz
	ENavspgSigattcomp44dbhz
	ENavspgSigattcomp45dbhz
	ENavspgSigattcomp46dbhz
	ENavspgSigattcomp47dbhz
	ENavspgSigattcomp48dbhz
	ENavspgSigattcomp49dbhz
	ENavspgSigattcomp50dbhz
	ENavspgSigattcomp51dbhz
	ENavspgSigattcomp52dbhz
	ENavspgSigattcomp53dbhz
	ENavspgSigattcomp54dbhz
	ENavspgSigattcomp55dbhz
	ENavspgSigattcomp56dbhz
	ENavspgSigattcomp57dbhz
	ENavspgSigattcomp58dbhz
	ENavspgSigattcomp59dbhz
	ENavspgSigattcomp60dbhz
	ENavspgSigattcomp61dbhz
	ENavspgSigattcomp62dbhz
	ENavspgSigattcomp63dbhz
	ENavspgSigattcompAuto EnumNavspgSigattcomp = 255
)

type EnumNavspgUtcstandard

type EnumNavspgUtcstandard uint8
const (
	ENavspgUtcstandardAuto EnumNavspgUtcstandard = iota

	ENavspgUtcstandardUsno

	ENavspgUtcstandardEu
	ENavspgUtcstandardSu
	ENavspgUtcstandardNtsc
	ENavspgUtcstandardNpli
	ENavspgUtcstandardNict
)

type EnumNmeaGsvtalkerid

type EnumNmeaGsvtalkerid uint8
const (
	ENmeaGsvtalkeridGnss EnumNmeaGsvtalkerid = iota
	ENmeaGsvtalkeridMain
)

type EnumNmeaMaintalkerid

type EnumNmeaMaintalkerid uint8
const (
	ENmeaMaintalkeridAuto EnumNmeaMaintalkerid = iota
	ENmeaMaintalkeridGp
	ENmeaMaintalkeridGl
	ENmeaMaintalkeridGn
	ENmeaMaintalkeridGa
	ENmeaMaintalkeridGb

	ENmeaMaintalkeridGq
)

type EnumNmeaMaxsvs

type EnumNmeaMaxsvs uint8
const (
	ENmeaMaxsvsUnlim EnumNmeaMaxsvs = iota
	ENmeaMaxsvs8svs  EnumNmeaMaxsvs = 8
	ENmeaMaxsvs12svs EnumNmeaMaxsvs = 12
	ENmeaMaxsvs16svs EnumNmeaMaxsvs = 16
)

type EnumNmeaProtver

type EnumNmeaProtver uint8
const (
	ENmeaProtverV21  EnumNmeaProtver = 21
	ENmeaProtverV23  EnumNmeaProtver = 23
	ENmeaProtverV40  EnumNmeaProtver = 40
	ENmeaProtverV41  EnumNmeaProtver = 41
	ENmeaProtverV411 EnumNmeaProtver = 42
)

type EnumNmeaSvnumbering

type EnumNmeaSvnumbering uint8
const (
	ENmeaSvnumberingStrict EnumNmeaSvnumbering = iota
	ENmeaSvnumberingExtended
)

type EnumRateTimeref

type EnumRateTimeref uint8
const (
	ERateTimerefUtc EnumRateTimeref = iota
	ERateTimerefGps
	ERateTimerefGlo
	ERateTimerefBds
	ERateTimerefGal
)

type EnumRtcmDf003InFilter

type EnumRtcmDf003InFilter uint8
const (
	ERtcmDf003InFilterDisabled EnumRtcmDf003InFilter = iota
	ERtcmDf003InFilterRelaxed
	ERtcmDf003InFilterStrict
)

type EnumTmodeMode

type EnumTmodeMode uint8
const (
	ETmodeModeDisabled EnumTmodeMode = iota
	ETmodeModeSurveyIn
	ETmodeModeFixed
)

type EnumTmodePosType

type EnumTmodePosType uint8
const (
	ETmodePosTypeEcef EnumTmodePosType = iota
	ETmodePosTypeLlh
)

type EnumTpDrstrTp1

type EnumTpDrstrTp1 uint8
const (
	ETpDrstrTp1DriveStrength2ma EnumTpDrstrTp1 = iota
	ETpDrstrTp1DriveStrength4ma
	ETpDrstrTp1DriveStrength8ma
	ETpDrstrTp1DriveStrength12ma
)

type EnumTpDrstrTp2

type EnumTpDrstrTp2 uint8
const (
	ETpDrstrTp2DriveStrength2ma EnumTpDrstrTp2 = iota
	ETpDrstrTp2DriveStrength4ma
	ETpDrstrTp2DriveStrength8ma
	ETpDrstrTp2DriveStrength12ma
)

type EnumTpPulseDef

type EnumTpPulseDef uint8
const (
	ETpPulseDefPeriod EnumTpPulseDef = iota
	ETpPulseDefFreq
)

type EnumTpPulseLengthDef

type EnumTpPulseLengthDef uint8
const (
	ETpPulseLengthDefRatio EnumTpPulseLengthDef = iota
	ETpPulseLengthDefLength
)

type EnumTpTimegridTp1

type EnumTpTimegridTp1 uint8
const (
	ETpTimegridTp1Utc EnumTpTimegridTp1 = iota
	ETpTimegridTp1Gps
	ETpTimegridTp1Glo
	ETpTimegridTp1Bds
	ETpTimegridTp1Gal
	ETpTimegridTp1Navic
)

type EnumTpTimegridTp2

type EnumTpTimegridTp2 uint8
const (
	ETpTimegridTp2Utc EnumTpTimegridTp2 = iota
	ETpTimegridTp2Gps
	ETpTimegridTp2Glo
	ETpTimegridTp2Bds
	ETpTimegridTp2Gal
	ETpTimegridTp2Navic
)

type EnumUart1Databits

type EnumUart1Databits uint8
const (
	EUart1DatabitsEight EnumUart1Databits = iota
	EUart1DatabitsSeven
)

type EnumUart1Parity

type EnumUart1Parity uint8
const (
	EUart1ParityNone EnumUart1Parity = iota
	EUart1ParityOdd
	EUart1ParityEven
)

type EnumUart1Stopbits

type EnumUart1Stopbits uint8
const (
	EUart1StopbitsHalf EnumUart1Stopbits = iota
	EUart1StopbitsOne
	EUart1StopbitsOnehalf
	EUart1StopbitsTwo
)

type EnumUart2Databits

type EnumUart2Databits uint8
const (
	EUart2DatabitsEight EnumUart2Databits = iota
	EUart2DatabitsSeven
)

type EnumUart2Parity

type EnumUart2Parity uint8
const (
	EUart2ParityNone EnumUart2Parity = iota
	EUart2ParityOdd
	EUart2ParityEven
)

type EnumUart2Stopbits

type EnumUart2Stopbits uint8
const (
	EUart2StopbitsHalf EnumUart2Stopbits = iota
	EUart2StopbitsOne
	EUart2StopbitsOnehalf
	EUart2StopbitsTwo
)

type I

type I uint32

func (I) MarshalValue

func (d I) MarshalValue(v any) (uint64, error)

func (I) UnmarshalValue

func (d I) UnmarshalValue(data uint64) (any, error)

type Item

type Item struct {
	Key   Key
	Value uint64
}

func MakeItem

func MakeItem[T comparable](k TypedKey[T], v T) Item

func RemapItems

func RemapItems(items []Item, remap map[Key]Key) []Item

RemapItems returns a copy of items with keys remapped according to remap. Keys not in remap are copied unchanged.

func UnmarshalItems

func UnmarshalItems(data []byte) ([]Item, error)

type Key

type Key uint32

func RemapKeys

func RemapKeys(keys []Key, remap map[Key]Key) []Key

RemapKeys returns a copy of keys with values remapped according to remap. Keys not in remap are copied unchanged.

func UnmarshalKeys

func UnmarshalKeys(data []byte) ([]Key, error)

func (Key) Group

func (k Key) Group() uint8

func (Key) GroupWildcard

func (k Key) GroupWildcard() Key

func (Key) MarshalBinary

func (k Key) MarshalBinary() ([]byte, error)

func (Key) String

func (k Key) String() string

type KeyE

type KeyE[E ~uint8] uint32
const KHwAntSupEngine KeyE[EnumHwAntSupEngine] = 0x20a30054
const KHwRfLnaMode KeyE[EnumHwRfLnaMode] = 0x20a30057
const KNavhpgDgnssmode KeyE[EnumNavhpgDgnssmode] = 0x20140011
const KNavspgDynmodel KeyE[EnumNavspgDynmodel] = 0x20110021
const KNavspgFixmode KeyE[EnumNavspgFixmode] = 0x20110011
const KNavspgSigattcomp KeyE[EnumNavspgSigattcomp] = 0x201100d6
const KNavspgUtcstandard KeyE[EnumNavspgUtcstandard] = 0x2011001c
const KNmeaGsvtalkerid KeyE[EnumNmeaGsvtalkerid] = 0x20930032
const KNmeaMaintalkerid KeyE[EnumNmeaMaintalkerid] = 0x20930031
const KNmeaMaxsvs KeyE[EnumNmeaMaxsvs] = 0x20930002
const KNmeaProtver KeyE[EnumNmeaProtver] = 0x20930001
const KNmeaSvnumbering KeyE[EnumNmeaSvnumbering] = 0x20930007
const KRateTimeref KeyE[EnumRateTimeref] = 0x20210003
const KRtcmDf003InFilter KeyE[EnumRtcmDf003InFilter] = 0x20090009
const KTmodeMode KeyE[EnumTmodeMode] = 0x20030001
const KTmodePosType KeyE[EnumTmodePosType] = 0x20030002
const KTpDrstrTp1 KeyE[EnumTpDrstrTp1] = 0x20050035
const KTpDrstrTp2 KeyE[EnumTpDrstrTp2] = 0x20050036
const KTpPulseDef KeyE[EnumTpPulseDef] = 0x20050023
const KTpPulseLengthDef KeyE[EnumTpPulseLengthDef] = 0x20050030
const KTpTimegridTp1 KeyE[EnumTpTimegridTp1] = 0x2005000c
const KTpTimegridTp2 KeyE[EnumTpTimegridTp2] = 0x20050017
const KUart1Databits KeyE[EnumUart1Databits] = 0x20520003
const KUart1Parity KeyE[EnumUart1Parity] = 0x20520004
const KUart1Stopbits KeyE[EnumUart1Stopbits] = 0x20520002
const KUart2Databits KeyE[EnumUart2Databits] = 0x20530003
const KUart2Parity KeyE[EnumUart2Parity] = 0x20530004
const KUart2Stopbits KeyE[EnumUart2Stopbits] = 0x20530002

func (KeyE[E]) Key

func (k KeyE[E]) Key() Key

func (KeyE[E]) Raw

func (k KeyE[E]) Raw(e E) uint64

func (KeyE[E]) Typed

func (k KeyE[E]) Typed(v uint64) E

type KeyI

type KeyI uint32
const KNavspgConstrAlt KeyI = 0x401100c1
const KNavspgInfilMinelev KeyI = 0x201100a4
const KTmodeEcefX KeyI = 0x40030003
const KTmodeEcefXHp KeyI = 0x20030006
const KTmodeEcefY KeyI = 0x40030004
const KTmodeEcefYHp KeyI = 0x20030007
const KTmodeEcefZ KeyI = 0x40030005
const KTmodeEcefZHp KeyI = 0x20030008
const KTmodeHeight KeyI = 0x4003000b
const KTmodeHeightHp KeyI = 0x2003000e
const KTmodeLat KeyI = 0x40030009
const KTmodeLatHp KeyI = 0x2003000c
const KTmodeLon KeyI = 0x4003000a
const KTmodeLonHp KeyI = 0x2003000d
const KTpAntCabledelay KeyI = 0x30050001
const KTpUserDelayTp1 KeyI = 0x40050006
const KTpUserDelayTp2 KeyI = 0x40050011

func (KeyI) Key

func (k KeyI) Key() Key

func (KeyI) Raw

func (k KeyI) Raw(i int64) uint64

func (KeyI) Typed

func (k KeyI) Typed(raw uint64) int64

type KeyL

type KeyL uint32
const KBdsUseGeoPrn KeyL = 0x10340014
const KGalOsnmaTimesync KeyL = 0x10350009
const KGalUseOsnma KeyL = 0x10350005
const KGpsL5HealthOverride KeyL = 0x10320001
const KHwAntCfgOpendet KeyL = 0x10a30031
const KHwAntCfgOpendetPol KeyL = 0x10a30032
const KHwAntCfgPwrdown KeyL = 0x10a30033
const KHwAntCfgPwrdownPol KeyL = 0x10a30034
const KHwAntCfgRecover KeyL = 0x10a30035
const KHwAntCfgShortdet KeyL = 0x10a3002f
const KHwAntCfgShortdetPol KeyL = 0x10a30030
const KHwAntCfgVoltctrl KeyL = 0x10a3002e
const KNavspgAckaiding KeyL = 0x10110025
const KNavspgInifix3d KeyL = 0x10110013
const KNavspgOnlyAuthdata KeyL = 0x101100dd
const KNavspgPlEna KeyL = 0x101100d7
const KNavspgUseUsrdat KeyL = 0x10110061
const KNmeaCompat KeyL = 0x10930003
const KNmeaConsider KeyL = 0x10930004
const KNmeaFiltBds KeyL = 0x10930017
const KNmeaFiltGal KeyL = 0x10930013
const KNmeaFiltGlo KeyL = 0x10930016
const KNmeaFiltGps KeyL = 0x10930011
const KNmeaFiltQzss KeyL = 0x10930015
const KNmeaFiltSbas KeyL = 0x10930012
const KNmeaHighprec KeyL = 0x10930006
const KNmeaLimit82 KeyL = 0x10930005
const KNmeaOutFrozencog KeyL = 0x10930026
const KNmeaOutInvdate KeyL = 0x10930024
const KNmeaOutInvfix KeyL = 0x10930021
const KNmeaOutInvtime KeyL = 0x10930023
const KNmeaOutMskfix KeyL = 0x10930022
const KNmeaOutOnlygps KeyL = 0x10930025
const KSignalBdsB1Ena KeyL = 0x1031000d
const KSignalBdsB1cEna KeyL = 0x1031000f
const KSignalBdsB2Ena KeyL = 0x1031000e
const KSignalBdsB2aEna KeyL = 0x10310028
const KSignalBdsB3Ena KeyL = 0x10310010
const KSignalBdsEna KeyL = 0x10310022
const KSignalGalE1Ena KeyL = 0x10310007
const KSignalGalE5aEna KeyL = 0x10310009
const KSignalGalE5bEna KeyL = 0x1031000a
const KSignalGalE6Ena KeyL = 0x1031000b
const KSignalGalEna KeyL = 0x10310021
const KSignalGloEna KeyL = 0x10310025
const KSignalGloL1Ena KeyL = 0x10310018
const KSignalGloL2Ena KeyL = 0x1031001a
const KSignalGpsEna KeyL = 0x1031001f
const KSignalGpsL1caEna KeyL = 0x10310001
const KSignalGpsL2cEna KeyL = 0x10310003
const KSignalGpsL5Ena KeyL = 0x10310004
const KSignalNavicEna KeyL = 0x10310026
const KSignalNavicL5Ena KeyL = 0x1031001d
const KSignalQzssEna KeyL = 0x10310024
const KSignalQzssL1caEna KeyL = 0x10310012
const KSignalQzssL1sEna KeyL = 0x10310014
const KSignalQzssL2cEna KeyL = 0x10310015
const KSignalQzssL5Ena KeyL = 0x10310017
const KSignalSbasEna KeyL = 0x10310020
const KSignalSbasL1caEna KeyL = 0x10310005
const KTpAlignToTowTp1 KeyL = 0x1005000a
const KTpAlignToTowTp2 KeyL = 0x10050015
const KTpPolTp1 KeyL = 0x1005000b
const KTpPolTp2 KeyL = 0x10050016
const KTpSyncGnssTp1 KeyL = 0x10050008
const KTpSyncGnssTp2 KeyL = 0x10050013
const KTpTp1Ena KeyL = 0x10050007
const KTpTp2Ena KeyL = 0x10050012
const KTpUseLockedTp1 KeyL = 0x10050009
const KTpUseLockedTp2 KeyL = 0x10050014
const KUart1Enabled KeyL = 0x10520005
const KUart1inprotNmea KeyL = 0x10730002
const KUart1inprotRtcm3x KeyL = 0x10730004
const KUart1inprotUbx KeyL = 0x10730001
const KUart1outprotNmea KeyL = 0x10740002
const KUart1outprotRtcm3x KeyL = 0x10740004
const KUart1outprotUbx KeyL = 0x10740001
const KUart2Enabled KeyL = 0x10530005
const KUart2inprotNmea KeyL = 0x10750002
const KUart2inprotRtcm3x KeyL = 0x10750004
const KUart2inprotUbx KeyL = 0x10750001
const KUart2outprotNmea KeyL = 0x10760002
const KUart2outprotRtcm3x KeyL = 0x10760004
const KUart2outprotUbx KeyL = 0x10760001
const KUsbinprotNmea KeyL = 0x10770002
const KUsbinprotRtcm3x KeyL = 0x10770004
const KUsbinprotUbx KeyL = 0x10770001
const KUsboutprotNmea KeyL = 0x10780002
const KUsboutprotRtcm3x KeyL = 0x10780004
const KUsboutprotUbx KeyL = 0x10780001

func (KeyL) Key

func (k KeyL) Key() Key

func (KeyL) Raw

func (k KeyL) Raw(b bool) uint64

func (KeyL) Typed

func (k KeyL) Typed(raw uint64) bool

type KeyM

type KeyM uint16
const KNmeaIdDtm KeyM = 0x0A6
const KNmeaIdGbs KeyM = 0x0DD
const KNmeaIdGga KeyM = 0x0BA
const KNmeaIdGll KeyM = 0x0C9
const KNmeaIdGns KeyM = 0x0B5
const KNmeaIdGrs KeyM = 0x0CE
const KNmeaIdGsa KeyM = 0x0BF
const KNmeaIdGst KeyM = 0x0D3
const KNmeaIdGsv KeyM = 0x0C4
const KNmeaIdRlm KeyM = 0x400
const KNmeaIdRmc KeyM = 0x0AB
const KNmeaIdVlw KeyM = 0x0E7
const KNmeaIdVtg KeyM = 0x0B0
const KNmeaIdZda KeyM = 0x0D8
const KNmeaNav2IdGga KeyM = 0x661
const KNmeaNav2IdGll KeyM = 0x670
const KNmeaNav2IdGns KeyM = 0x65C
const KNmeaNav2IdGsa KeyM = 0x666
const KNmeaNav2IdRmc KeyM = 0x652
const KNmeaNav2IdVtg KeyM = 0x657
const KNmeaNav2IdZda KeyM = 0x67F
const KPubxIdPolyp KeyM = 0x0EC
const KPubxIdPolys KeyM = 0x0F1
const KPubxIdPolyt KeyM = 0x0F6
const KRtcm3xType1005 KeyM = 0x2BD
const KRtcm3xType1074 KeyM = 0x35E
const KRtcm3xType1077 KeyM = 0x2CC
const KRtcm3xType1084 KeyM = 0x363
const KRtcm3xType1087 KeyM = 0x2D1
const KRtcm3xType1094 KeyM = 0x368
const KRtcm3xType1097 KeyM = 0x318
const KRtcm3xType1124 KeyM = 0x36D
const KRtcm3xType1127 KeyM = 0x2D6
const KRtcm3xType1230 KeyM = 0x303
const KRtcm3xType40720 KeyM = 0x2FE
const KRtcm3xType40721 KeyM = 0x381
const KUbxLogInfo KeyM = 0x259
const KUbxMonComms KeyM = 0x34F
const KUbxMonHw KeyM = 0x1B4
const KUbxMonHw2 KeyM = 0x1B9
const KUbxMonHw3 KeyM = 0x354
const KUbxMonIo KeyM = 0x1A5
const KUbxMonMsgpp KeyM = 0x196
const KUbxMonRf KeyM = 0x359
const KUbxMonRxbuf KeyM = 0x1A0
const KUbxMonRxr KeyM = 0x187
const KUbxMonSpan KeyM = 0x38B
const KUbxMonSys KeyM = 0x69D
const KUbxMonTxbuf KeyM = 0x19B
const KUbxNav2Clock KeyM = 0x430
const KUbxNav2Cov KeyM = 0x435
const KUbxNav2Dop KeyM = 0x465
const KUbxNav2Eoe KeyM = 0x565
const KUbxNav2Odo KeyM = 0x475
const KUbxNav2Posecef KeyM = 0x480
const KUbxNav2Posllh KeyM = 0x485
const KUbxNav2Pvt KeyM = 0x490
const KUbxNav2Sat KeyM = 0x495
const KUbxNav2Sbas KeyM = 0x500
const KUbxNav2Sig KeyM = 0x505
const KUbxNav2Status KeyM = 0x515
const KUbxNav2Svin KeyM = 0x520
const KUbxNav2Timebds KeyM = 0x525
const KUbxNav2Timegal KeyM = 0x530
const KUbxNav2Timeglo KeyM = 0x535
const KUbxNav2Timegps KeyM = 0x540
const KUbxNav2Timels KeyM = 0x545
const KUbxNav2Timenavic KeyM = 0x6A7
const KUbxNav2Timeutc KeyM = 0x550
const KUbxNav2Velecef KeyM = 0x555
const KUbxNav2Velned KeyM = 0x560
const KUbxNavClock KeyM = 0x065
const KUbxNavCov KeyM = 0x083
const KUbxNavDop KeyM = 0x038
const KUbxNavEoe KeyM = 0x15F
const KUbxNavGeofence KeyM = 0x0A1
const KUbxNavHpposecef KeyM = 0x02E
const KUbxNavHpposllh KeyM = 0x033
const KUbxNavNmi KeyM = 0x590
const KUbxNavOdo KeyM = 0x07E
const KUbxNavOrb KeyM = 0x010
const KUbxNavPosecef KeyM = 0x024
const KUbxNavPosllh KeyM = 0x029
const KUbxNavPvt KeyM = 0x006
const KUbxNavSat KeyM = 0x015
const KUbxNavSbas KeyM = 0x06A
const KUbxNavSig KeyM = 0x345
const KUbxNavStatus KeyM = 0x01A
const KUbxNavSvin KeyM = 0x088
const KUbxNavTimebds KeyM = 0x051
const KUbxNavTimegal KeyM = 0x056
const KUbxNavTimeglo KeyM = 0x04C
const KUbxNavTimegps KeyM = 0x047
const KUbxNavTimels KeyM = 0x060
const KUbxNavTimenavic KeyM = 0x6A2
const KUbxNavTimetrusted KeyM = 0x3A8
const KUbxNavTimeutc KeyM = 0x05B
const KUbxNavVelecef KeyM = 0x03D
const KUbxNavVelned KeyM = 0x042
const KUbxRxmCor KeyM = 0x6B6
const KUbxRxmMeasx KeyM = 0x204
const KUbxRxmRawx KeyM = 0x2A4
const KUbxRxmRlm KeyM = 0x25E
const KUbxRxmRtcm KeyM = 0x268
const KUbxRxmSfrbx KeyM = 0x231
const KUbxRxmTm KeyM = 0x610
const KUbxSecOsnma KeyM = 0x6CA
const KUbxSecSig KeyM = 0x634
const KUbxSecSiglog KeyM = 0x689
const KUbxTimSvin KeyM = 0x097
const KUbxTimTm2 KeyM = 0x178
const KUbxTimTp KeyM = 0x17D
const KUbxTimVrfy KeyM = 0x092

func (KeyM) KeyU

func (k KeyM) KeyU(port Port) KeyU

type KeyR

type KeyR uint32
const KNavspgUsrdatDx KeyR = 0x40110064
const KNavspgUsrdatDy KeyR = 0x40110065
const KNavspgUsrdatDz KeyR = 0x40110066
const KNavspgUsrdatFlat KeyR = 0x50110063
const KNavspgUsrdatMaja KeyR = 0x50110062
const KNavspgUsrdatRotx KeyR = 0x40110067
const KNavspgUsrdatRoty KeyR = 0x40110068
const KNavspgUsrdatRotz KeyR = 0x40110069
const KNavspgUsrdatScale KeyR = 0x4011006a
const KTpDutyLockTp1 KeyR = 0x5005002b
const KTpDutyLockTp2 KeyR = 0x5005002d
const KTpDutyTp1 KeyR = 0x5005002a
const KTpDutyTp2 KeyR = 0x5005002c

func (KeyR) Key

func (k KeyR) Key() Key

func (KeyR) Raw

func (k KeyR) Raw(x float64) uint64

func (KeyR) Typed

func (k KeyR) Typed(raw uint64) float64

type KeyU

type KeyU uint32
const KGalOsnmaMintaglength KeyU = 0x20350007
const KHwAntSupOpenPin KeyU = 0x20a30038
const KHwAntSupOpenThr KeyU = 0x20a30056
const KHwAntSupShortPin KeyU = 0x20a30037
const KHwAntSupShortThr KeyU = 0x20a30055
const KHwAntSupSwitchPin KeyU = 0x20a30036
const KNavspgConstrAltvar KeyU = 0x401100c2
const KNavspgConstrDgnssto KeyU = 0x201100c4
const KNavspgInfilCnothrs KeyU = 0x201100ab
const KNavspgInfilMaxsvs KeyU = 0x201100a2
const KNavspgInfilMincno KeyU = 0x201100a3
const KNavspgInfilMinsvs KeyU = 0x201100a1
const KNavspgInfilNcnothrs KeyU = 0x201100aa
const KNavspgMaxTimetrustedAcc KeyU = 0x301100de
const KNavspgOutfilFacc KeyU = 0x301100b5
const KNavspgOutfilPacc KeyU = 0x301100b3
const KNavspgOutfilPdop KeyU = 0x301100b1
const KNavspgOutfilTacc KeyU = 0x301100b4
const KNavspgOutfilTdop KeyU = 0x301100b2
const KNavspgWknrollover KeyU = 0x30110017
const KNmeaBdstalkerid KeyU = 0x30930033
const KRateMeas KeyU = 0x30210001
const KRateNav KeyU = 0x30210002
const KRtcmDf003In KeyU = 0x30090008
const KRtcmDf003Out KeyU = 0x30090001
const KTmodeFixedPosAcc KeyU = 0x4003000f
const KTmodeSvinAccLimit KeyU = 0x40030011
const KTmodeSvinMinDur KeyU = 0x40030010
const KTpFreqLockTp1 KeyU = 0x40050025
const KTpFreqLockTp2 KeyU = 0x40050027
const KTpFreqTp1 KeyU = 0x40050024
const KTpFreqTp2 KeyU = 0x40050026
const KTpLenLockTp1 KeyU = 0x40050005
const KTpLenLockTp2 KeyU = 0x40050010
const KTpLenTp1 KeyU = 0x40050004
const KTpLenTp2 KeyU = 0x4005000f
const KTpPeriodLockTp1 KeyU = 0x40050003
const KTpPeriodLockTp2 KeyU = 0x4005000e
const KTpPeriodTp1 KeyU = 0x40050002
const KTpPeriodTp2 KeyU = 0x4005000d
const KUart1Baudrate KeyU = 0x40520001
const KUart2Baudrate KeyU = 0x40530001

func (KeyU) Key

func (k KeyU) Key() Key

func (KeyU) Raw

func (k KeyU) Raw(u uint64) uint64

func (KeyU) Typed

func (k KeyU) Typed(raw uint64) uint64

type L

type L uint32

func (L) MarshalValue

func (d L) MarshalValue(v any) (uint64, error)

func (L) UnmarshalValue

func (d L) UnmarshalValue(data uint64) (any, error)

type Map

type Map map[Key]uint64

func RemapMap

func RemapMap(src Map, remap map[Key]Key) Map

RemapMap returns a copy of src with keys remapped according to remap. Keys not in remap are copied unchanged.

func (*Map) AddItems

func (mp *Map) AddItems(items []Item)

func (*Map) Contains

func (mp *Map) Contains(k Key) bool

func (*Map) Items

func (mp *Map) Items() []Item

func (*Map) MarshalBinary

func (mp *Map) MarshalBinary() ([]byte, error)

func (*Map) UnmarshalBinary

func (mp *Map) UnmarshalBinary(data []byte) error

type NameDesc

type NameDesc struct {
	// contains filtered or unexported fields
}

type Port

type Port uint8
const (
	I2C Port = iota
	UART1
	UART2
	USB
	SPI
)

type R

type R uint32

func (R) MarshalValue

func (d R) MarshalValue(v any) (uint64, error)

func (R) UnmarshalValue

func (d R) UnmarshalValue(data uint64) (any, error)

type Schema

type Schema struct {
	// contains filtered or unexported fields
}

func GetDfltSchema

func GetDfltSchema() *Schema

func MustNewSchema

func MustNewSchema(groups map[string]map[string]Desc) *Schema

func NewSchema

func NewSchema(groups map[string]map[string]Desc) (*Schema, error)

func NewSchemaWithMsgout

func NewSchemaWithMsgout(schema *Schema) *Schema

func (*Schema) AddGroup

func (s *Schema) AddGroup(groupName string, group map[string]Desc) *Schema

func (*Schema) Compile

func (s *Schema) Compile(cfg map[string]map[string]any) ([]Item, error)

func (*Schema) Marshal

func (s *Schema) Marshal(cfg map[string]map[string]any) ([]byte, error)

func (*Schema) MustMarshal

func (s *Schema) MustMarshal(cfg map[string]map[string]any) []byte

func (*Schema) UnmarshalItems

func (s *Schema) UnmarshalItems(data []byte) (map[string]map[string]any, map[Key]uint64, error)

func (*Schema) UnmarshalItemsFlat

func (s *Schema) UnmarshalItemsFlat(data []byte) ([]string, []any, error)

func (*Schema) UnmarshalKeysFlat

func (s *Schema) UnmarshalKeysFlat(data []byte) ([]string, error)

type TypedKey

type TypedKey[T comparable] interface {
	Key() Key
	Typed(raw uint64) T
	Raw(t T) uint64
}

type U

type U uint32

func (U) MarshalValue

func (d U) MarshalValue(v any) (uint64, error)

func (U) UnmarshalValue

func (d U) UnmarshalValue(data uint64) (any, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL