pod_data

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: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DataType = "data"
View Source
const EnumType = "enum"

Variables

This section is empty.

Functions

This section is empty.

Types

type Board

type Board struct {
	Name    string   `json:"name"`
	Packets []Packet `json:"packets"`
}

type BooleanMeasurement

type BooleanMeasurement struct {
	Id   string `json:"id"`
	Name string `json:"name"`
	Type string `json:"type"`
}

func (BooleanMeasurement) GetId

func (m BooleanMeasurement) GetId() string

func (BooleanMeasurement) GetName

func (m BooleanMeasurement) GetName() string

func (BooleanMeasurement) GetType

func (m BooleanMeasurement) GetType() string

type EnumMeasurement

type EnumMeasurement struct {
	Id      string   `json:"id"`
	Name    string   `json:"name"`
	Type    string   `json:"type"`
	Options []string `json:"options"`
}

func (EnumMeasurement) GetId

func (m EnumMeasurement) GetId() string

func (EnumMeasurement) GetName

func (m EnumMeasurement) GetName() string

func (EnumMeasurement) GetType

func (m EnumMeasurement) GetType() string

type Measurement

type Measurement interface {
	GetId() string
	GetName() string
	GetType() string
}

type NumericMeasurement

type NumericMeasurement struct {
	Id           string      `json:"id"` // Remove json tags
	Name         string      `json:"name"`
	Type         string      `json:"type"`
	Units        string      `json:"units"`
	DisplayUnits utils.Units `json:"-"`
	PodUnits     utils.Units `json:"-"`
	SafeRange    []*float64  `json:"safeRange"`
	WarningRange []*float64  `json:"warningRange"`
}

func (NumericMeasurement) GetId

func (m NumericMeasurement) GetId() string

func (NumericMeasurement) GetName

func (m NumericMeasurement) GetName() string

func (NumericMeasurement) GetType

func (m NumericMeasurement) GetType() string

type Packet

type Packet struct {
	Id           uint16        `json:"id"`
	Name         string        `json:"name"`
	Type         string        `json:"type"` //TODO: add in front
	HexValue     string        `json:"hexValue"`
	Count        uint16        `json:"count"`
	CycleTime    int64         `json:"cycleTime"`
	Measurements []Measurement `json:"measurements"`
}

type PodData

type PodData struct {
	Boards []Board `json:"boards"`
}

func GetDataOnlyPodData

func GetDataOnlyPodData(podData PodData) PodData

func NewPodData

func NewPodData(adeBoards map[string]ade.Board, globalUnits map[string]utils.Operations) (PodData, error)

type SortablePacket

type SortablePacket []Packet

func (SortablePacket) Len

func (packets SortablePacket) Len() int

func (SortablePacket) Less

func (packets SortablePacket) Less(i, j int) bool

func (SortablePacket) Swap

func (packets SortablePacket) Swap(i, j int)

Jump to

Keyboard shortcuts

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