ediplug

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2016 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteCommand

func ExecuteCommand(c Command, ip string, password string) error

Types

type Command

type Command interface {
	GetXML() ([]byte, error)
	Parse(in io.Reader) error
}

type GetEnergyCommand

type GetEnergyCommand struct {
	LastToggleTime time.Time
	NowCurrent     float64
	NowPower       float64
	DailyEnergy    float64
	WeeklyEnergy   float64
	MonthlyEnergy  float64
	// contains filtered or unexported fields
}

func (*GetEnergyCommand) GetXML

func (g *GetEnergyCommand) GetXML() ([]byte, error)

func (*GetEnergyCommand) Parse

func (g *GetEnergyCommand) Parse(in io.Reader) error

type GetStateCommand

type GetStateCommand struct {
	CurrentState string
	// contains filtered or unexported fields
}

func (*GetStateCommand) GetXML

func (g *GetStateCommand) GetXML() ([]byte, error)

func (*GetStateCommand) Parse

func (g *GetStateCommand) Parse(in io.Reader) error

type GetSystemInfoCommand

type GetSystemInfoCommand struct {
	Model           string
	FirmwareVersion string
	MacAddress      string
	SystemName      string
	DeviceTime      time.Time
	// contains filtered or unexported fields
}

func (*GetSystemInfoCommand) GetXML

func (g *GetSystemInfoCommand) GetXML() ([]byte, error)

func (*GetSystemInfoCommand) Parse

func (g *GetSystemInfoCommand) Parse(in io.Reader) error

type SetStateCommand

type SetStateCommand struct {
	DesiredState string
	Success      bool
}

func (*SetStateCommand) GetXML

func (s *SetStateCommand) GetXML() ([]byte, error)

func (*SetStateCommand) Parse

func (s *SetStateCommand) Parse(in io.Reader) error

Jump to

Keyboard shortcuts

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