controller

package
v1.0.6 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 IRController

type IRController 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 IRController)

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

func (*IRController) PressKey

func (irc *IRController) PressKey(key string)

func (*IRController) PressKeyLinux

func (irc *IRController) PressKeyLinux(key_name string)

func (*IRController) Receive

func (irc *IRController) Receive()

func (*IRController) SaveKeyFile

func (irc *IRController) SaveKeyFile(key string)

func (*IRController) SaveKeyFileLinux

func (irc *IRController) SaveKeyFileLinux(save_path string)

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

func (*IRController) Scan

func (irc *IRController) Scan()

func (*IRController) ScanLinux

func (irc *IRController) ScanLinux()

func (*IRController) Transmit

func (irc *IRController) Transmit(code string)

func (*IRController) TransmitKeyFile

func (irc *IRController) TransmitKeyFile(key string)

func (*IRController) TransmitKeyFileLinux

func (irc *IRController) TransmitKeyFileLinux(save_path string)

func (*IRController) TransmitLinux

func (irc *IRController) 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