controller

package
v1.0.24 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: Unlicense Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrettyPrint

func PrettyPrint(input interface{})

func StringToInt added in v1.0.3

func StringToInt(input string) (result int)

func Test

func Test()

CONFIRMED WORKS FOR MUTE TOGGLE DON'T TOUCH

Types

type Adapter

type Adapter struct {
	Path string
	Comm string
}

type Controller

type Controller struct {
	Configuration          C.libcec_configuration
	Connection             C.libcec_connection_t
	ConnComm               *C.char
	Adapter                Adapter
	LogicalAddress         C.cec_logical_address
	LogicalPhysicalAddress C.cec_logical_address
	PhysicalAddress        [2]byte
}

func New

func New() (result Controller)

sudo find / -name cecc.h /usr/local/Cellar/libcec/6.0.2/include/libcec/cecc.h

func (Controller) GetActiveSource

func (ctrl Controller) GetActiveSource() (result Source)

func (Controller) GetPowerStatus

func (ctrl Controller) GetPowerStatus() (result bool)

func (Controller) GetSources

func (ctrl Controller) GetSources() (result []Source)

func (*Controller) Mute

func (ctrl *Controller) Mute() (result bool)

func (Controller) PowerOff

func (ctrl Controller) PowerOff() (result bool)

func (Controller) PowerOn

func (ctrl Controller) PowerOn() (result bool)

func (*Controller) SelectHDMI

func (ctrl *Controller) SelectHDMI(hdmi int) (result bool)

type Source

type Source struct {
	DeviceName   string
	Address      string
	HDMIInput    int
	ActiveSource bool
	Vendor       string
	OSDString    string
	PowerStatus  bool
}

echo 'scan' | cec-client -s -d 1

Jump to

Keyboard shortcuts

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