nadapi

package
v0.0.0-...-1ccc566 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

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

Device is a generic nad receiver

func New

func New(addr, port string) (*Device, error)

New - create a new device object with an open connection

func (*Device) Disconnect

func (d *Device) Disconnect() error

Disconnect from device

func (*Device) GetBrightness

func (d *Device) GetBrightness() (string, error)

GetBrightness retrieve the brightness level from the device

func (*Device) GetModel

func (d *Device) GetModel() (string, error)

GetModel retrieves the model of the device

func (*Device) GetMuteStatus

func (d *Device) GetMuteStatus() (string, error)

GetMuteStatus -

func (*Device) GetPowerState

func (d *Device) GetPowerState() (string, error)

GetPowerState retrieves the current power state

func (*Device) GetRead

func (d *Device) GetRead() (*bufio.Reader, error)

GetRead return bufio reader for reading device messages

func (*Device) GetSource

func (d *Device) GetSource() (string, error)

GetSource retrieves the current source

func (*Device) GetVolume

func (d *Device) GetVolume() (string, error)

GetVolume retrieves the volume from the device

func (*Device) PowerOff

func (d *Device) PowerOff() error

PowerOff powers off the device

func (*Device) PowerOn

func (d *Device) PowerOn() error

PowerOn powers on the device

func (*Device) PowerToggle

func (d *Device) PowerToggle() error

PowerToggle power on/off

func (*Device) ToggleBrightness

func (d *Device) ToggleBrightness(direction Direction) error

ToggleBrightness change the screen brightness of the device

func (*Device) ToggleMute

func (d *Device) ToggleMute() error

ToggleMute -

func (*Device) ToggleSource

func (d *Device) ToggleSource(direction Direction) (string, error)

ToggleSource changes the input source

func (*Device) TuneVolume

func (d *Device) TuneVolume(direction Direction) error

TuneVolume increases or decreases the device volume

type Direction

type Direction int

Direction -

const (

	// DirectionUp -
	DirectionUp Direction = 1
	// DirectionDown -
	DirectionDown Direction = -1
)

Jump to

Keyboard shortcuts

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