message

package
v0.0.0-...-f636187 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataMessage

type DataMessage struct {
	Type      MessageType  `json:"type"`
	StationId uint64       `json:"station_id"`
	Samples   []DataSample `json:"samples"`
}

func DataMessageFromMap

func DataMessageFromMap(jsonMap map[string]json.RawMessage) (DataMessage, error)

func NewDataMessage

func NewDataMessage(stationId uint64, samples []DataSample) DataMessage

type DataSample

type DataSample struct {
	SatelliteId uint64    `json:"satellite_id"`
	Timestamp   time.Time `json:"timestamp"`
	Data        string    `json:"data"`
}

type MessageType

type MessageType int
const (
	DataMessageType MessageType = iota
	NextWindowMessageType
	UpdateTleMessageType
	PipelineMessageType
)

type NextWindowMessage

type NextWindowMessage struct {
	Type        MessageType   `json:"type"`
	StationId   uint64        `json:"station_id"`
	SatelliteId uint64        `json:"satellite_id"`
	Start       time.Time     `json:"start"`
	Duration    time.Duration `json:"duration"`
}

func NewNextWindowMessage

func NewNextWindowMessage(stationId, satelliteId uint64, start time.Time, duration time.Duration) NextWindowMessage

func NextWindowMessageFromMap

func NextWindowMessageFromMap(jsonMap map[string]json.RawMessage) (NextWindowMessage, error)

type PipelineMessage

type PipelineMessage struct {
	Type           MessageType `json:"type"`
	SatelliteId    uint64      `json:"satellite_id"`
	Frequency      uint64      `json:"frequency"`
	PipelinePath   string      `json:"pipeline_path"`
	PipelineConfig string      `json:"pipeline_config"`
}

func NewPipelineMessage

func NewPipelineMessage(satelliteId, frequency uint64, pipelinePath, pipelineConfig string) PipelineMessage

func PipelineMessageFromMap

func PipelineMessageFromMap(jsonMap map[string]json.RawMessage) (PipelineMessage, error)

type UpdateTleMessage

type UpdateTleMessage struct {
	Type        MessageType `json:"type"`
	SatelliteId uint64      `json:"satellite_id"`
	Tle         string      `json:"tle"`
}

func NewUpdateTleMessage

func NewUpdateTleMessage(satelliteId uint64, tle string) UpdateTleMessage

func UpdateTleMessageFromMap

func UpdateTleMessageFromMap(jsonMap map[string]json.RawMessage) (UpdateTleMessage, error)

Jump to

Keyboard shortcuts

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