controller

package
v1.0.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const RECEIVE_ONLY = 3
View Source
const TRANSMIT_AND_RECEIVE = 1
View Source
const TRANSMIT_ONLY = 2

Variables

This section is empty.

Functions

func LinuxFindDevices

func LinuxFindDevices()

func LinuxGetDeviceType

func LinuxGetDeviceType(device_path string) (result int)

func LinuxGetLIRCDevices

func LinuxGetLIRCDevices() (results []string)

Types

type Controller added in v1.0.7

type Controller struct {
	Config      *types.ConfigFile `yaml:"-"`
	Remote      string            `yaml:"remote"`
	DevicePaths []string          `yaml:"device_paths"`
	DevicePath  string            `yaml:"device_path"`
	DeviceType  int               `yaml:"device_type"`
}

func New

func New(config *types.ConfigFile) (result Controller)

2.) Get Features of USB Controller ir-ctl -f

func (*Controller) PressKey added in v1.0.7

func (irc *Controller) PressKey(key string)

func (*Controller) PressKeyLinux added in v1.0.7

func (irc *Controller) PressKeyLinux(key_name string)

func (*Controller) Receive added in v1.0.7

func (irc *Controller) Receive()

func (*Controller) SaveKeyFile added in v1.0.7

func (irc *Controller) SaveKeyFile(key string)

func (*Controller) SaveKeyFileLinux added in v1.0.7

func (irc *Controller) SaveKeyFileLinux(save_path string)

ir-ctl -d /dev/lirc0 --receive=samnsung_power.key

func (*Controller) Scan added in v1.0.7

func (irc *Controller) Scan()

func (*Controller) ScanLinux added in v1.0.7

func (irc *Controller) ScanLinux()

func (*Controller) Transmit added in v1.0.7

func (irc *Controller) Transmit(code string)

func (*Controller) TransmitKeyFile added in v1.0.7

func (irc *Controller) TransmitKeyFile(key string)

func (*Controller) TransmitKeyFileLinux added in v1.0.7

func (irc *Controller) TransmitKeyFileLinux(save_path string)

func (*Controller) TransmitLinux added in v1.0.7

func (irc *Controller) TransmitLinux(code string)

type USBDevice

type USBDevice struct {
	Manufacturer  string `yaml:"manufacturer"`
	Product       string `yaml:"product"`
	SerialNumber  string `yaml:"serial_number"`
	VendorID      string `yaml:"vendor_id"`
	ProductID     string `yaml:"product_id"`
	BusNumber     string `yaml:"bus_number"`
	AddressNumber string `yaml:"address_number"`
}

Jump to

Keyboard shortcuts

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