ade

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

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

Go to latest
Published: Nov 5, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InfoName    = "GLOBAL INFO" //TODO: change to INFO
	BoardPrefix = "BOARD "
)
View Source
const (
	PacketTable      = "Packets"
	MeasurementTable = "Measurements"
	Structures       = "Structures"
)
View Source
const (
	Addresses  = "addresses"
	Units      = "units"
	Ports      = "ports"
	BoardIds   = "board_ids"
	MessageIds = "message_ids"
	BackendKey = "Backend"
)
View Source
const TablePrefix = "[TABLE]"

Variables

View Source
var (
	PacketHeaders      = []string{"ID", "Name", "Type"}
	MeasurementHeaders = []string{"ID", "Name", "Type", "PodUnits", "DisplayUnits", "SafeRange", "WarningRange"}
)

Functions

func FilterMap

func FilterMap[K comparable, V any](myMap map[K]V, predicate func(key K, value V) bool) map[K]V

Types

type ADE

type ADE struct {
	Info   Info
	Boards map[string]Board
}

func CreateADE

func CreateADE(file *excelize.File) (ADE, error)

type Board

type Board struct {
	Name         string
	Packets      []Packet
	Measurements []Measurement
	Structures   []Structure
}

type Info

type Info struct {
	Addresses  map[string]string
	Units      map[string]string
	Ports      map[string]string
	BoardIds   map[string]string
	MessageIds map[string]string
}

type Measurement

type Measurement struct {
	Id           string
	Name         string
	Type         string
	PodUnits     string
	DisplayUnits string
	SafeRange    string
	WarningRange string
}

type Packet

type Packet struct {
	Id   string
	Name string
	Type string
}

type Structure

type Structure struct {
	Packet       string
	Measurements []string
}

type Table

type Table = [][]string

Jump to

Keyboard shortcuts

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