-
Notifications
You must be signed in to change notification settings - Fork 1
proc
github-actions[bot] edited this page Mar 13, 2025
·
9 revisions
import "github.com/AarC10/GSW-V2/proc"- func DatabaseWriter(handler db.Handler, packet tlm.TelemetryPacket, channel chan []byte)
- func GetPacketSize(packet tlm.TelemetryPacket) int
- func ResetConfig()
- func TelemetryPacketReader(packet tlm.TelemetryPacket, outChannel chan []byte)
- func TelemetryPacketWriter(packet tlm.TelemetryPacket, outChannel chan []byte)
- type Configuration
func DatabaseWriter
func DatabaseWriter(handler db.Handler, packet tlm.TelemetryPacket, channel chan []byte)DatabaseWriter writes telemetry data to the database It reads data from the channel and writes it to the database
func GetPacketSize
func GetPacketSize(packet tlm.TelemetryPacket) intGetPacketSize returns the size of a telemetry packet in bytes
func ResetConfig
func ResetConfig()ResetConfig resets the global configuration
func TelemetryPacketReader(packet tlm.TelemetryPacket, outChannel chan []byte)TelemetryPacketReader is a goroutine that reads telemetry data from shared memory and sends it to an output channel
func TelemetryPacketWriter(packet tlm.TelemetryPacket, outChannel chan []byte)TelemetryPacketWriter is a goroutine that listens for telemetry data on a UDP port and writes it to shared memory
type Configuration
Configuration is a struct that holds the configuration for the GSW
type Configuration struct {
Name string `yaml:"name"` // Name of the configuration
Measurements map[string]tlm.Measurement `yaml:"measurements"` // Map of measurements
TelemetryPackets []tlm.TelemetryPacket `yaml:"telemetry_packets"` // List of telemetry packets
}var GswConfig Configurationfunc ParseConfig
func ParseConfig(filename string) (*Configuration, error)ParseConfig parses a YAML configuration file and returns a Configuration struct
func ParseConfigBytes
func ParseConfigBytes(data []byte) (*Configuration, error)ParseConfigBytes parses a YAML formatted byte slice and returns a Configuration struct
Generated by gomarkdoc