Documentation
¶
Index ¶
- Constants
- Variables
- type HardwareInfo
- type NetworkInfo
- type Projector
- func (p *Projector) GetActiveSignal(ctx context.Context, port string) (bool, error)
- func (p *Projector) GetAudioVideoInputs(ctx context.Context) (map[string]string, error)
- func (p *Projector) GetBlank(ctx context.Context) (bool, error)
- func (p *Projector) GetInfo(ctx context.Context) (interface{}, error)
- func (p *Projector) GetMutes(ctx context.Context, blocks []string) (map[string]bool, error)
- func (p *Projector) GetPower(ctx context.Context) (bool, error)
- func (p *Projector) GetVolumes(ctx context.Context, blocks []string) (map[string]int, error)
- func (p *Projector) SendCommand(ctx context.Context, addr string, cmd []byte) (string, error)
- func (p *Projector) SetAudioVideoInput(ctx context.Context, output, input string) error
- func (p *Projector) SetBlank(ctx context.Context, blanked bool) error
- func (p *Projector) SetMute(ctx context.Context, block string, muted bool) error
- func (p *Projector) SetPower(ctx context.Context, power bool) error
- func (p *Projector) SetVolume(ctx context.Context, block string, level int) error
Constants ¶
const ( // CR is a carriage return CR = '\r' // LF is a line feed LF = '\n' )
Variables ¶
var ( // BlankStatus is the command to ask the projector if it is blanked or not BlankStatus = []byte("blank ?\r\n") // Blank is the command to send to the projector to tell it to blank Blank = []byte("blank \"on\"\r\n") // Unblank is the command to send to the projector to tell it to unblank Unblank = []byte("blank \"off\"\r\n") )
var ( // InputStatus is the command to ask the projector what input it is on InputStatus = []byte("input ?\r\n") // ActiveSignal is the command to ask the projector if it has an active input signal ActiveSignal = []byte("signal ?\r\n") )
var ( // PowerStatus gets the projector's power status PowerStatus = []byte("power_status ?\r\n") // PowerOn powers on the projector PowerOn = []byte("power \"on\"\r\n") // PowerStandby powers off the projector PowerStandby = []byte("power \"standby\"\r\n") )
Functions ¶
This section is empty.
Types ¶
type HardwareInfo ¶
type HardwareInfo struct {
Hostname string `json:"hostname,omitempty"`
ModelName string `json:"model_name,omitempty"`
SerialNumber string `json:"serial_number,omitempty"`
BuildDate string `json:"build_date,omitempty"`
FirmwareVersion string `json:"firmware_version,omitempty"`
ProtocolVersion string `json:"protocol_version,omitempty"`
NetworkInfo NetworkInfo `json:"network_information,omitempty"`
FilterStatus string `json:"filter_status,omitempty"`
WarningStatus []string `json:"warning_status,omitempty"`
ErrorStatus []string `json:"error_status,omitempty"`
PowerStatus string `json:"power_status,omitempty"`
PowerSavingModeStatus string `json:"power_saving_mode_status,omitempty"`
TimerInfo []map[string]int `json:"timer_info,omitempty"`
Temperature string `json:"temperature,omitempty"`
}
HardwareInfo contains the common information for device hardware information
type NetworkInfo ¶
type NetworkInfo struct {
IPAddress string `json:"ip_address,omitempty"`
MACAddress string `json:"mac_address,omitempty"`
Gateway string `json:"gateway,omitempty"`
DNS []string `json:"dns,omitempty"`
}
NetworkInfo contains the network information for the device
type Projector ¶
type Projector struct {
Address string
// contains filtered or unexported fields
}
Projector is the base level object for a projector controlled over ADCP
func (*Projector) GetActiveSignal ¶
GetActiveSignal checks to see if the projector has an active input signal and returns the result
func (*Projector) GetAudioVideoInputs ¶ added in v0.1.1
GetAudioVideoInputs returns the current input that the projector is set to
func (*Projector) GetBlank ¶ added in v0.1.1
GetBlank asks the projector if it is blanked or not and returns the result
func (*Projector) GetVolumes ¶ added in v0.1.1
GetVolumes returns the volume level of the projector
func (*Projector) SendCommand ¶
SendCommand sends the byte array to the desired address of the projector
func (*Projector) SetAudioVideoInput ¶ added in v0.1.1
SetAudioVideoInput sets the current input of the projector to the given input
func (*Projector) SetBlank ¶ added in v0.1.1
SetBlank tells the projector to blank or unblank itself