models

package
v0.0.0-...-c9a03b5 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Band

type Band struct {
	Start int
	End   int
}

type BandsDownUp

type BandsDownUp struct {
	Downstream []Band
	Upstream   []Band
}

type Bins

type Bins struct {
	Mode Mode

	Bands BandsDownUp

	// PilotTones contains the bin indexes of all pilot tones
	PilotTones []int

	// Bits is the number of bits modulated onto the subcarrier, valid range: 0 to 15
	Bits BinsBitsDownUp

	// SNR is the signal-to-noise ratio in dB, valid range: -32 to 95
	SNR BinsFloatDownUp

	// QLN is the level of noise present on the line without any xDSL signal in dBm/Hz, valid range: -150 to -23
	QLN BinsFloatDownUp

	// Hlog is the channel characteristic and estimates the attenuation in dB, valid range: -96.2 to 6
	Hlog BinsFloatDownUp
}

type BinsBits

type BinsBits struct {
	Data []int8
}

type BinsBitsDownUp

type BinsBitsDownUp struct {
	Downstream BinsBits
	Upstream   BinsBits
}

type BinsFloat

type BinsFloat struct {
	// GroupSize specifies how many bins are grouped into a single value
	GroupSize int

	// Data contains the actual data, with multiple bins grouped
	Data []float64
}

type BinsFloatDownUp

type BinsFloatDownUp struct {
	Downstream BinsFloat
	Upstream   BinsFloat
}

type BinsFloatMinMax

type BinsFloatMinMax struct {
	GroupSize int

	Min []float64
	Max []float64
}

type BinsFloatMinMaxDownUp

type BinsFloatMinMaxDownUp struct {
	Downstream BinsFloatMinMax
	Upstream   BinsFloatMinMax
}

type BinsHistory

type BinsHistory struct {
	SNR BinsFloatMinMaxDownUp
}

type BoolValue

type BoolValue struct {
	Valid bool
	Bool  bool
}

func (BoolValue) String

func (v BoolValue) String() string

func (BoolValue) Unit

func (v BoolValue) Unit() string

func (*BoolValue) UnmarshalJSON

func (v *BoolValue) UnmarshalJSON(data []byte) error

func (BoolValue) Value

func (v BoolValue) Value() string

type Duration

type Duration struct {
	Valid    bool
	Duration time.Duration
}

func (Duration) String

func (d Duration) String() string

type ErrorsHistory

type ErrorsHistory struct {
	EndTime      time.Time
	PeriodLength time.Duration
	PeriodCount  int

	Showtime []BoolValue

	DownstreamRTXTXCount []IntValue
	UpstreamRTXTXCount   []IntValue

	DownstreamRTXCCount []IntValue
	UpstreamRTXCCount   []IntValue

	DownstreamRTXUCCount []IntValue
	UpstreamRTXUCCount   []IntValue

	DownstreamFECCount []IntValue
	UpstreamFECCount   []IntValue

	DownstreamCRCCount []IntValue
	UpstreamCRCCount   []IntValue

	DownstreamESCount []IntValue
	UpstreamESCount   []IntValue

	DownstreamSESCount []IntValue
	UpstreamSESCount   []IntValue
}

func (ErrorsHistory) String

func (h ErrorsHistory) String() string

type FloatValue

type FloatValue struct {
	Valid bool
	Float float64
}

func (FloatValue) String

func (v FloatValue) String() string

func (FloatValue) Unit

func (v FloatValue) Unit() string

func (*FloatValue) UnmarshalJSON

func (v *FloatValue) UnmarshalJSON(data []byte) error

func (FloatValue) Value

func (v FloatValue) Value() string

type IntValue

type IntValue struct {
	Valid bool
	Int   int64
}

func (IntValue) String

func (v IntValue) String() string

func (IntValue) Unit

func (v IntValue) Unit() string

func (*IntValue) UnmarshalJSON

func (v *IntValue) UnmarshalJSON(data []byte) error

func (IntValue) Value

func (v IntValue) Value() string

type Inventory

type Inventory struct {
	Vendor  string
	Version string
}

func (Inventory) String

func (i Inventory) String() string

type Mode

type Mode struct {
	Type    ModeType
	Subtype ModeSubtype
}

func (Mode) BinCount

func (m Mode) BinCount() int

func (Mode) CarrierSpacing

func (m Mode) CarrierSpacing() float64

func (Mode) String

func (m Mode) String() string

type ModeSubtype

type ModeSubtype int
const (
	ModeSubtypeUnknown ModeSubtype = iota

	ModeSubtypeAnnexA
	ModeSubtypeAnnexB
	ModeSubtypeAnnexI
	ModeSubtypeAnnexJ
	ModeSubtypeAnnexL
	ModeSubtypeAnnexM

	ModeSubtypeProfile8a
	ModeSubtypeProfile8b
	ModeSubtypeProfile8c
	ModeSubtypeProfile8d

	ModeSubtypeProfile12a
	ModeSubtypeProfile12b

	ModeSubtypeProfile17a

	ModeSubtypeProfile30a

	ModeSubtypeProfile35b
)

func (ModeSubtype) String

func (s ModeSubtype) String() string

type ModeType

type ModeType int
const (
	ModeTypeUnknown ModeType = iota

	ModeTypeADSL
	ModeTypeADSL2
	ModeTypeADSL2Plus
	ModeTypeVDSL2
)

func (ModeType) String

func (t ModeType) String() string

type OLRValue

type OLRValue struct {
	Enabled  BoolValue
	Executed IntValue
}

func (*OLRValue) Normalize

func (v *OLRValue) Normalize()

func (OLRValue) String

func (v OLRValue) String() string

func (OLRValue) Unit

func (v OLRValue) Unit() string

func (OLRValue) Value

func (v OLRValue) Value() string

type State

type State int
const (
	StateUnknown State = iota
	StateDown
	StateDownIdle
	StateDownSilent
	StateInit
	StateInitHandshake
	StateInitChannelDiscovery
	StateInitTraining
	StateInitChannelAnalysisExchange
	StateShowtime
	StateError
)

func (State) String

func (s State) String() string

type Status

type Status struct {
	State  State
	Mode   Mode
	Uptime Duration

	DownstreamActualRate ValueBandwidth
	UpstreamActualRate   ValueBandwidth

	DownstreamAttainableRate ValueBandwidth
	UpstreamAttainableRate   ValueBandwidth

	DownstreamMinimumErrorFreeThroughput ValueBandwidth
	UpstreamMinimumErrorFreeThroughput   ValueBandwidth

	DownstreamBitswap OLRValue
	UpstreamBitswap   OLRValue

	DownstreamSeamlessRateAdaptation OLRValue
	UpstreamSeamlessRateAdaptation   OLRValue

	DownstreamInterleavingDelay ValueMilliseconds
	UpstreamInterleavingDelay   ValueMilliseconds

	DownstreamImpulseNoiseProtection ValueSymbols
	UpstreamImpulseNoiseProtection   ValueSymbols

	DownstreamRetransmissionEnabled BoolValue
	UpstreamRetransmissionEnabled   BoolValue

	DownstreamVectoringState VectoringValue
	UpstreamVectoringState   VectoringValue

	DownstreamAttenuation ValueDecibel
	UpstreamAttenuation   ValueDecibel

	DownstreamSNRMargin ValueDecibel
	UpstreamSNRMargin   ValueDecibel

	DownstreamPower ValuePower
	UpstreamPower   ValuePower

	DownstreamRTXTXCount IntValue
	UpstreamRTXTXCount   IntValue

	DownstreamRTXCCount IntValue
	UpstreamRTXCCount   IntValue

	DownstreamRTXUCCount IntValue
	UpstreamRTXUCCount   IntValue

	DownstreamFECCount IntValue
	UpstreamFECCount   IntValue

	DownstreamCRCCount IntValue
	UpstreamCRCCount   IntValue

	DownstreamESCount IntValue
	UpstreamESCount   IntValue

	DownstreamSESCount IntValue
	UpstreamSESCount   IntValue

	FarEndInventory  Inventory
	NearEndInventory Inventory
}

func (Status) Summary

func (s Status) Summary() string

type Value

type Value interface {
	String() string
	Value() string
	Unit() string
}

type ValueBandwidth

type ValueBandwidth struct {
	IntValue
}

func (ValueBandwidth) String

func (v ValueBandwidth) String() string

func (ValueBandwidth) Unit

func (v ValueBandwidth) Unit() string

type ValueDecibel

type ValueDecibel struct {
	FloatValue
}

func (ValueDecibel) String

func (v ValueDecibel) String() string

func (ValueDecibel) Unit

func (v ValueDecibel) Unit() string

type ValueMilliseconds

type ValueMilliseconds struct {
	FloatValue
}

func (ValueMilliseconds) String

func (v ValueMilliseconds) String() string

func (ValueMilliseconds) Unit

func (v ValueMilliseconds) Unit() string

func (ValueMilliseconds) Value

func (v ValueMilliseconds) Value() string

type ValuePower

type ValuePower struct {
	FloatValue
}

func (ValuePower) String

func (v ValuePower) String() string

func (ValuePower) Unit

func (v ValuePower) Unit() string

type ValueSymbols

type ValueSymbols struct {
	FloatValue
}

func (ValueSymbols) String

func (v ValueSymbols) String() string

func (ValueSymbols) Unit

func (v ValueSymbols) Unit() string

type VectoringState

type VectoringState int
const (
	VectoringStateOff VectoringState = iota
	VectoringStateFriendly
	VectoringStateFull
)

func (VectoringState) String

func (v VectoringState) String() string

type VectoringValue

type VectoringValue struct {
	Valid bool
	State VectoringState
}

func (VectoringValue) String

func (v VectoringValue) String() string

func (VectoringValue) Unit

func (v VectoringValue) Unit() string

func (VectoringValue) Value

func (v VectoringValue) Value() string

Jump to

Keyboard shortcuts

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