ramses

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Specification string = "SPU045-S2:6F"

Specification describes what version the current implementation follows

Functions

This section is empty.

Types

type LossFlag added in v0.1.0

type LossFlag uint8

LossFlag is used to indicate that a sqeunce discontinuity has been detected and that one or more dataunits may have been lost

const (
	// NoDiscontinuities detected
	NoDiscontinuities LossFlag = iota
	// Discontinuities detected
	Discontinuities
)

type QualityIndicator added in v0.1.0

type QualityIndicator uint8

QualityIndicator indicates whether the transported data is complete or partial

const (
	// CompletePacket ...
	CompletePacket QualityIndicator = iota
	// IncompletePacket ...
	IncompletePacket
)

type Ramses

type Ramses struct {
	Synch  uint16 // fixed to 0xEB90
	Length uint16 // payload length
	Port   uint16
	Type   uint8
	Secure uint8
	Time   uint32 // milliseconds since midnight
	Date   int32  // days since 2000-01-01 00:00:00.00
}

Ramses data header

func NewRamses added in v0.2.1

func NewRamses(buf io.Reader) (*Ramses, error)

NewRamses reads a Ramses from buffer

returns io.EOF is there was exactly 0 bytes to read since this indicates previous record was the last record of the buffer and thus not really an error.

for all other incomplete reads non EOF errors are produced.

func (*Ramses) CSVHeaders

func (ramses *Ramses) CSVHeaders() []string

CSVHeaders returns the field names

func (*Ramses) CSVRow

func (ramses *Ramses) CSVRow() []string

CSVRow returns the field values

func (*Ramses) CSVSpecifications

func (ramses *Ramses) CSVSpecifications() []string

CSVSpecifications returns the specs used in creating the struct

func (*Ramses) Created

func (ramses *Ramses) Created() time.Time

Created is when the package was created

func (*Ramses) MarshalJSON

func (ramses *Ramses) MarshalJSON() ([]byte, error)

MarshalJSON makes a custom json of what is of interest in the struct

func (*Ramses) Nanoseconds added in v0.1.0

func (ramses *Ramses) Nanoseconds() int64

Nanoseconds since epoch when packet was created

func (*Ramses) SetParquet added in v1.0.0

func (ramses *Ramses) SetParquet(row *parquetrow.ParquetRow)

SetParquet sets the parquet representation of the Ramses header

func (*Ramses) Valid

func (ramses *Ramses) Valid() bool

Valid as in correct version

type TMHeader added in v0.1.0

type TMHeader struct {
	QualityIndicator QualityIndicator `json:"qualityIndicator"` // QualityIndicator indicates whether the transported data is complete or partial (0 = Complete, 1 = partial)
	LossFlag         LossFlag         `json:"lossFlag"`         // LossFlag is used to indicate that a sequence discontinuity has been detected
	VCFrameCounter   uint8            `json:"vcFrameCounter"`   // VCFrameCounter is a counter of the transfer fram the payload packet arrived in
	// contains filtered or unexported fields
}

TMHeader is the OHBSE CCSDS TM Packet Header in the specification

func NewTMHeader added in v0.2.1

func NewTMHeader(buf io.Reader) (*TMHeader, error)

NewTMHeader reads a TMHeader from buffer

func (*TMHeader) CSVHeaders added in v0.1.0

func (header *TMHeader) CSVHeaders() []string

CSVHeaders returns the field names

func (*TMHeader) CSVRow added in v0.1.0

func (header *TMHeader) CSVRow() []string

CSVRow returns the field values

func (*TMHeader) SetParquet added in v1.0.0

func (header *TMHeader) SetParquet(row *parquetrow.ParquetRow)

SetParquet sets the parquet representation of the TMHeader

Jump to

Keyboard shortcuts

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