proc

package
v0.0.0-...-675dedd Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPacketSize

func GetPacketSize(packet TelemetryPacket) int

func TelemetryPacketReader

func TelemetryPacketReader(packet TelemetryPacket, outChannel chan []byte)

func TelemetryPacketWriter

func TelemetryPacketWriter(packet TelemetryPacket)

Types

type Configuration

type Configuration struct {
	Name             string            `yaml:"name"`
	Measurements     []Measurement     `yaml:"measurements"`
	TelemetryPackets []TelemetryPacket `yaml:"telemetry_packets"`
}
var GswConfig Configuration

TODO: Make global safer

func ParseConfig

func ParseConfig(filename string) (*Configuration, error)

type Measurement

type Measurement struct {
	Name       string `yaml:"name"`
	Size       int    `yaml:"size"`
	Type       string `yaml:"type,omitempty"`
	Unsigned   bool   `yaml:"unsigned,omitempty"`
	Endianness string `yaml:"endianness,omitempty"`
}

func FindMeasurementByName

func FindMeasurementByName(measurements []Measurement, name string) (*Measurement, error)

TODO: Map

func (Measurement) String

func (m Measurement) String() string

type TelemetryPacket

type TelemetryPacket struct {
	Name         string   `yaml:"name"`
	Port         int      `yaml:"port"`
	Measurements []string `yaml:"measurements"`
}

Jump to

Keyboard shortcuts

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