nec

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

README

nec-driver

CircleCI Apache 2 License

Driver to provide control over the NEC projector

Set Up for the NEC Projector

  • Projector needs to be in Network Standby for Standby mode. To ensure it is in this mode go to the projector menu>Setup>Options(2) there you should find the option to enable.

Reference Materials for the commands and inputs

For a list of all the commands: https://www.necdisplay.com/documents/UserManuals/RS232_PJ_ControlCommands.pdf

For more information on the inputs: https://www.necdisplay.com/documents/UserManuals/PJ-ControlCommands-Appendixes.pdf

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// BlankMuteStatus gets the blank & mute status of the projector
	BlankMuteStatus = []byte{0x00, 0x85, 0x00, 0x00, 0x01, 0x03, 0x89}

	// Blank blanks the projector
	Blank = []byte{0x02, 0x10, 0x00, 0x00, 0x00, 0x12}

	// Unblank unblanks the projector
	Unblank = []byte{0x02, 0x11, 0x00, 0x00, 0x00, 0x13}
)
View Source
var (
	// ActiveSignal whether or not the projector's input has signal or not
	ActiveSignal = []byte{0x00, 0xBF, 0x00, 0x00, 0x01, 0x02, 0xC2}

	// InputStatus returns the current input of the projector
	InputStatus = []byte{0x00, 0x85, 0x00, 0x00, 0x01, 0x02, 0x88}

	// ChangeInput changes the input of the projector
	ChangeInput = []byte{0x02, 0x03, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00}
)
View Source
var (
	// PowerStatus gets the projector's power status
	PowerStatus = []byte{0x00, 0x85, 0x00, 0x00, 0x01, 0x01, 0x87}

	// PowerOn powers on the projector
	PowerOn = []byte{0x02, 0x00, 0x00, 0x00, 0x00, 0x02}

	// PowerStandby powers off the projector
	PowerStandby = []byte{0x02, 0x01, 0x00, 0x00, 0x00, 0x03}
)

Functions

This section is empty.

Types

type Projector

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

func (*Projector) GetActiveSignal

func (p *Projector) GetActiveSignal(ctx context.Context, addr string) (bool, error)

func (*Projector) GetBlanked

func (p *Projector) GetBlanked(ctx context.Context, addr string) (bool, error)

func (*Projector) GetInfo

func (p *Projector) GetInfo(ctx context.Context, addr string) (interface{}, error)

func (*Projector) GetInput

func (p *Projector) GetInput(ctx context.Context, addr string) (string, error)

func (*Projector) GetPower

func (p *Projector) GetPower(ctx context.Context, addr string) (string, error)

func (*Projector) SendCommand

func (p *Projector) SendCommand(ctx context.Context, addr string, cmd []byte) ([]byte, error)

SendCommand sends the byte array to the desired address of projector

func (*Projector) SetBlanked

func (p *Projector) SetBlanked(ctx context.Context, addr string, blanked bool) error

func (*Projector) SetInput

func (p *Projector) SetInput(ctx context.Context, addr string, input string) error

func (*Projector) SetPower

func (p *Projector) SetPower(ctx context.Context, addr string, power string) error

Jump to

Keyboard shortcuts

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