modemscrape

package module
v0.0.0-...-0dd1965 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: MIT Imports: 1 Imported by: 0

README

modemscrape

A halfbaked scraper for a single version of netgear modem. The CM1000 code is unfinished because I had to switch modems before I finished it. It's mostly there, thought it doesn't conform to the interface I created after.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownstreamChannel

type DownstreamChannel struct {
	Locked             bool // if this isn't set, many other values may also not be set
	Modulation         string
	BondedChannelID    int
	Frequency          int64
	Power              float64
	SNR                float64
	CorrectableWords   int64
	UncorrectableWords int64
}

type DownstreamOFDMChannel

type DownstreamOFDMChannel struct {
	Locked             bool
	BondedChannelID    int
	Frequency          int64
	Power              float64
	SNR                float64
	CorrectableWords   int64
	UncorrectableWords int64
}

type Log

type Log struct {
	SeverityCode int // should match syslog, which is netgear - 1
	Severity     string
	Timestamp    time.Time
	Message      string
}

type LogOutput

type LogOutput interface {
	PutLogs([]Log) error
}

type LoggableModem

type LoggableModem interface {
	// GetLogs should return all logs created since the last run of this function for an implementing modem.
	GetLogs() ([]Log, error)
}

LoggableModem should be implemented for modems that can retrieve logs in a syslog-like format as defined in this package.

type Modem

type Modem interface {
	GetStats() ([]UpstreamChannel, []DownstreamChannel, []UpstreamOFDMChannel, []DownstreamOFDMChannel, error)
}

type Output

type Output interface {
	PutStats([]UpstreamChannel, []DownstreamChannel, []UpstreamOFDMChannel, []DownstreamOFDMChannel) error
}

type UpstreamChannel

type UpstreamChannel struct {
	Locked          bool
	Modulation      string
	BondedChannelID int
	Frequency       int64
	Power           float64
}

type UpstreamOFDMChannel

type UpstreamOFDMChannel struct {
	Locked          bool
	BondedChannelID int
	Frequency       int64
	Power           float64
}

Directories

Path Synopsis
cmd
modemscrape command

Jump to

Keyboard shortcuts

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