Documentation
¶
Index ¶
- Variables
- func AddItem[T comparable](items *[]Item, k TypedKey[T], v T)
- func AddKey[T comparable](keys *[]Key, k TypedKey[T])
- func KeyRemap(pairs [][2]AnyTypedKey, from, to int) map[Key]Key
- func MakeMsgoutGroup() map[string]Desc
- func MapGet[T comparable](m Map, k TypedKey[T]) (t T, ok bool)
- func MapSet[T comparable](m Map, k TypedKey[T], v T)
- func MarshalItems(items []Item) ([]byte, error)
- func MarshalKeys(keys []Key) []byte
- func SortItems(items []Item)
- type AnyTypedKey
- type Desc
- type EDesc
- type EnumHwAntSupEngine
- type EnumHwRfLnaMode
- type EnumNavhpgDgnssmode
- type EnumNavspgDynmodel
- type EnumNavspgFixmode
- type EnumNavspgSigattcomp
- type EnumNavspgUtcstandard
- type EnumNmeaGsvtalkerid
- type EnumNmeaMaintalkerid
- type EnumNmeaMaxsvs
- type EnumNmeaProtver
- type EnumNmeaSvnumbering
- type EnumRateTimeref
- type EnumRtcmDf003InFilter
- type EnumTmodeMode
- type EnumTmodePosType
- type EnumTpDrstrTp1
- type EnumTpDrstrTp2
- type EnumTpPulseDef
- type EnumTpPulseLengthDef
- type EnumTpTimegridTp1
- type EnumTpTimegridTp2
- type EnumUart1Databits
- type EnumUart1Parity
- type EnumUart1Stopbits
- type EnumUart2Databits
- type EnumUart2Parity
- type EnumUart2Stopbits
- type I
- type Item
- type Key
- type KeyE
- type KeyI
- type KeyL
- type KeyM
- type KeyR
- type KeyU
- type L
- type Map
- type NameDesc
- type Port
- type R
- type Schema
- func (s *Schema) AddGroup(groupName string, group map[string]Desc) *Schema
- func (s *Schema) Compile(cfg map[string]map[string]any) ([]Item, error)
- func (s *Schema) Marshal(cfg map[string]map[string]any) ([]byte, error)
- func (s *Schema) MustMarshal(cfg map[string]map[string]any) []byte
- func (s *Schema) UnmarshalItems(data []byte) (map[string]map[string]any, map[Key]uint64, error)
- func (s *Schema) UnmarshalItemsFlat(data []byte) ([]string, []any, error)
- func (s *Schema) UnmarshalKeysFlat(data []byte) ([]string, error)
- type TypedKey
- type U
Constants ¶
This section is empty.
Variables ¶
var TPKeyPairs = [][2]AnyTypedKey{ {KTpAlignToTowTp1, KTpAlignToTowTp2}, {KTpDrstrTp1, KTpDrstrTp2}, {KTpDutyLockTp1, KTpDutyLockTp2}, {KTpDutyTp1, KTpDutyTp2}, {KTpFreqLockTp1, KTpFreqLockTp2}, {KTpFreqTp1, KTpFreqTp2}, {KTpLenLockTp1, KTpLenLockTp2}, {KTpLenTp1, KTpLenTp2}, {KTpPeriodLockTp1, KTpPeriodLockTp2}, {KTpPeriodTp1, KTpPeriodTp2}, {KTpPolTp1, KTpPolTp2}, {KTpSyncGnssTp1, KTpSyncGnssTp2}, {KTpTimegridTp1, KTpTimegridTp2}, {KTpTp1Ena, KTpTp2Ena}, {KTpUseLockedTp1, KTpUseLockedTp2}, {KTpUserDelayTp1, KTpUserDelayTp2}, }
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 MapSet ¶
func MapSet[T comparable](m Map, k TypedKey[T], v T)
func MarshalItems ¶
func MarshalKeys ¶
Types ¶
type AnyTypedKey ¶
type AnyTypedKey interface {
Key() Key
}
type EnumHwAntSupEngine ¶
type EnumHwAntSupEngine uint8
const ( EHwAntSupEngineExt EnumHwAntSupEngine = iota EHwAntSupEngineMadc )
type EnumHwRfLnaMode ¶
type EnumHwRfLnaMode uint8
const ( EHwRfLnaModeNormal EnumHwRfLnaMode = iota EHwRfLnaModeLowgain EHwRfLnaModeBypass )
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 )
type EnumTpTimegridTp2 ¶
type EnumTpTimegridTp2 uint8
const ( ETpTimegridTp2Utc EnumTpTimegridTp2 = iota ETpTimegridTp2Gps ETpTimegridTp2Glo ETpTimegridTp2Bds ETpTimegridTp2Gal )
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 Item ¶
func MakeItem ¶
func MakeItem[T comparable](k TypedKey[T], v T) Item
func RemapItems ¶
RemapItems returns a copy of items with keys remapped according to remap. Keys not in remap are copied unchanged.
func UnmarshalItems ¶
type Key ¶
type Key uint32
func RemapKeys ¶
RemapKeys returns a copy of keys with values remapped according to remap. Keys not in remap are copied unchanged.
func UnmarshalKeys ¶
func (Key) GroupWildcard ¶
func (Key) MarshalBinary ¶
type KeyE ¶
const KHwAntSupEngine KeyE[EnumHwAntSupEngine] = 0x20a30054
const KHwRfLnaMode KeyE[EnumHwRfLnaMode] = 0x20a30057
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
type KeyI ¶
type KeyI uint32
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
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 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 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
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 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 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
type KeyR ¶
type KeyR uint32
const KTpDutyLockTp1 KeyR = 0x5005002b
const KTpDutyLockTp2 KeyR = 0x5005002d
const KTpDutyTp1 KeyR = 0x5005002a
const KTpDutyTp2 KeyR = 0x5005002c
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 KNmeaBdstalkerid KeyU = 0x30930033
const KRateMeas KeyU = 0x30210001
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
type Map ¶
func RemapMap ¶
RemapMap returns a copy of src with keys remapped according to remap. Keys not in remap are copied unchanged.
func (*Map) MarshalBinary ¶
func (*Map) UnmarshalBinary ¶
type Schema ¶
type Schema struct {
// contains filtered or unexported fields
}
func GetDfltSchema ¶
func GetDfltSchema() *Schema