arris

package module
v0.0.0-...-cc8b610 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2018 License: MIT Imports: 11 Imported by: 4

README

arris Build Status GoDoc Go Report Card

Package arris gathers statistics from the web interface of Arris cable modems. MIT Licensed.

This package is experimental and a work-in-progress. It has only been tested with an Arris TM822A modem, as that is the one Matt has at home.

Documentation

Overview

Package arris gathers statistics from the web interface of Arris cable modems.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

A Client is an HTTP client that can retrieve statistics from the web interface of an Arris modem.

func New

func New(addr string, c *http.Client) (*Client, error)

New creates a new Client pointed at the specified address. If a nil http.Client is specified, a default client will be used.

func (*Client) Status

func (c *Client) Status() (*Status, error)

Status fetches a Status structure from the modem.

type Downstream

type Downstream struct {
	Name          string  //
	DCID          int     //
	Frequency     float64 // MHz
	Power         float64 // dBmV
	SNR           float64 // dB
	Modulation    string  //
	Octets        uint64  //
	Corrected     uint64  //
	Uncorrectable uint64  //
}

Downstream indicates the status of a downstream connection.

type Interface

type Interface struct {
	Name        string
	Provisioned bool
	Up          bool
	Speed       string
	MAC         net.HardwareAddr
}

An Interface indicates the status of a network interface.

type Status

type Status struct {
	Downstream []Downstream
	Upstream   []Upstream
	Uptime     time.Duration
	Interfaces []Interface
}

Status is the status of an Arris modem.

func Parse

func Parse(r io.Reader) (*Status, error)

Parse parses Arris modem status from an input HTML document.

type Upstream

type Upstream struct {
	Name        string  //
	UCID        int     //
	Frequency   float64 // MHz
	Power       float64 // dBmV
	ChannelType string  //
	SymbolRate  int     // kSym/s
	Modulation  string  //
}

Upstream indicates the status of an upstream connection.

Jump to

Keyboard shortcuts

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