eepgen

package
v0.0.0-...-7f16780 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(xmlPath, outDir string) error

Generate generates Go profile metadata from EEP XML.

Types

type Case

type Case struct {
	Fields []Field `xml:"datafield"`
}

type EEP

type EEP struct {
	Rorgs       []Rorg `xml:"profile>rorg"`
	DirectRorgs []Rorg `xml:"rorg"`
}

func LoadRaw

func LoadRaw(path string) (EEP, error)

LoadRaw loads the raw EEP XML model.

type Enum

type Enum struct {
	Items []EnumItem `xml:"item"`
}

type EnumItem

type EnumItem struct {
	Value       string  `xml:"value"`
	Min         string  `xml:"min"`
	Max         string  `xml:"max"`
	Unit        string  `xml:"unit"`
	Description string  `xml:"description"`
	Scales      []Scale `xml:"scale"`
}

type Field

type Field struct {
	Data        string  `xml:"data"`
	Shortcut    string  `xml:"shortcut"`
	Description string  `xml:"description"`
	BitOff      string  `xml:"bitoffs"`
	BitSize     string  `xml:"bitsize"`
	Unit        string  `xml:"unit"`
	Enums       []Enum  `xml:"enum"`
	Ranges      []Range `xml:"range"`
	Scales      []Scale `xml:"scale"`
}

type Func

type Func struct {
	Number string `xml:"number"`
	Title  string `xml:"title"`
	Types  []Type `xml:"type"`
}

type OutEnum

type OutEnum struct {
	Raw         uint64
	Name        string
	Description string
}

type OutField

type OutField struct {
	Name, Shortcut, Unit string
	BitOff, BitSize      int
	RawMin, RawMax       int64
	ScaleMin, ScaleMax   float64
	Enums                []OutEnum
}

type OutProfile

type OutProfile struct {
	Key, Rorg, Func, Type, Title string
	Fields                       []OutField
}

func Load

func Load(path string) ([]OutProfile, error)

Load loads EEP profiles from XML.

type Range

type Range struct {
	Min string `xml:"min"`
	Max string `xml:"max"`
}

type Rorg

type Rorg struct {
	Number string `xml:"number"`
	Title  string `xml:"title"`
	Funcs  []Func `xml:"func"`
}

type Scale

type Scale struct {
	Min string `xml:"min"`
	Max string `xml:"max"`
}

type Type

type Type struct {
	Number string `xml:"number"`
	Title  string `xml:"title"`
	Cases  []Case `xml:"case"`
}

Jump to

Keyboard shortcuts

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