config

package
v0.0.0-...-144e09d Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AlgorithmToString = [AlgorithmMax + 1]string{
	"passthrough",
	"golay24",
}

Functions

func NewReaderFromConfig

func NewReaderFromConfig(r ea.ByteBlockDiscardReader, config *FecConfig) (ea2.MessageReader, error)

func NewWriterFromConfig

func NewWriterFromConfig(w io.Writer, config *FecConfig) (ea2.MessageWriter, error)

Types

type AlgorithmE

type AlgorithmE uint16
const (
	AlgorithmPassthrough AlgorithmE = 0
	AlgorithmGolay24     AlgorithmE = 1
	AlgorithmMax         AlgorithmE = 1
)

type FecConfig

type FecConfig struct {
	FecAlgorithm                    uint16 `json:"algorithm"`
	NAnchorBytes                    uint8  `json:"nAnchorBytes"`
	AnchorMaxHammingDistPerByteIncl uint8  `json:"anchorMaxHammingDistPerByteIncl"`
	MaxMessageSize                  uint32 `json:"maxMessageSize"`
	// contains filtered or unexported fields
}

func (*FecConfig) FromContext

func (inst *FecConfig) FromContext(nameTransf config.NameTransformFunc, ctx *cli.Context) (nMessages int)

func (*FecConfig) ToCliFlags

func (inst *FecConfig) ToCliFlags(nameTransf config.NameTransformFunc, envVarNameTransf config.NameTransformFunc) []cli.Flag

func (*FecConfig) Validate

func (inst *FecConfig) Validate(force bool) (nMessages int)

Jump to

Keyboard shortcuts

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