viewsonic

package module
v0.0.0-...-0eb5107 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: MIT Imports: 9 Imported by: 0

README

ViewSonic Projector

This library provides functionality to communicate with ViewSonic projectors using the RS-232 protocol as specified in the v1.19 documentation.

This library was tested against a ViewSonic LS920WU projector. Please note that in power off mode, all commands except for power will fail. In power on mode, more commands work, but still most fail. A valid source must be connected to the projector for most commands to work.

ViewSonic Projector RS-232 Command Parsing

This document outlines how to structure and parse command packets for communicating with ViewSonic projectors via the RS-232 protocol, based on the v1.19 specification.

3.1 Command Description

The communication flow is a simple request-reply model between the host (control unit) and the projector. The host sends either a Write command to set a value or a Read command to get a value, and the projector sends a corresponding response packet.

  • Write-Function: Used to control the projector and change its settings.
  • Read-Function: Used to query the projector for its current status or settings.
Length Byte Description (LSB, MSB)
  • LSB (Low Byte): The low byte of the length. The length is the total number of bytes in the command starting from BYTE 5 up to, but not including, the final Checksum byte.
  • MSB (High Byte): The high byte of the length. For this protocol, it is typically 0x00.

Packet Formats

Write-Function Packet Format

This format is used to send a command to the projector to perform an action or change a setting.

Byte Position Field Name Example Value Description
BYTE 0 Command Head 0x06 Start of a Write Packet. (Cmd1)
BYTE 1 Command Head 0x14 Protocol identifier.
BYTE 2 Command Head 0x00 Protocol identifier.
BYTE 3 LSB (Length) 0x04 Low byte of the payload length.
BYTE 4 MSB (Length) 0x00 High byte of the payload length.
BYTE 5 Command 0x34 Main command identifier.
BYTE 6 Payload Cmd2 First part of the specific command code.
BYTE 7 Payload Cmd3 Second part of the specific command code.
BYTE 8 Payload data Data value to be written for the command.
BYTE N+8 Checksum checksum The checksum calculated for the packet.
Read-Function Packet Format

This format is used to request information or a status value from the projector.

Byte Position Field Name Example Value Description
BYTE 0 Command Head 0x07 Start of a Read Packet. (Cmd1)
BYTE 1 Command Head 0x14 Protocol identifier.
BYTE 2 Command Head 0x00 Protocol identifier.
BYTE 3 LSB (Length) 0x05 Low byte of the payload length.
BYTE 4 MSB (Length) 0x00 High byte of the payload length.
BYTE 5 Command 0x34 Static value for Read commands.
BYTE 6 Command 0 Static value for Read commands.
BYTE 7 Command 0 Static value for Read commands.
BYTE 8 Payload Cmd2 First part of the command code to query.
BYTE 9 Payload Cmd3 Second part of the command code to query.
BYTE 10 Checksum checksum The checksum calculated for the packet.

Reply Formats

Write Response Packet (ACK)

This is the acknowledgment packet sent by the projector after a successful Write-Function command.

Byte Position Field Name Value Description
BYTE 0 Command Head 0x03 Start of a Write Response packet.
BYTE 1 Command Head 0x14 Protocol identifier.
BYTE 2 Command Head 0x00 Protocol identifier.
BYTE 3 Command Head 0x00 Static value.
BYTE 4 Command Head 0x00 Static value.
BYTE 5 Checksum 0x14 The checksum for the response packet.
Read Response Packet (1-byte data)

This is the response from the projector for a Read-Function command that returns a single byte of data.

Byte Position Field Name Value Description
BYTE 0 Command Head 0x05 Start of a Read Response packet.
BYTE 1 Command Head 0x14 Protocol identifier.
BYTE 2 Command Head 0x00 Protocol identifier.
BYTE 3 LSB (Length) LSB Low byte of the payload length.
BYTE 4 MSB (Length) MSB High byte of the payload length.
BYTE 5 Command 0 Static value.
BYTE 6 Command 0 Static value.
BYTE 7 Payload data The single-byte data value being returned.
BYTE 8 Checksum checksum The checksum for the response packet.
Read Response Packet (2-byte data)

This is the response from the projector for a Read-Function command that returns two bytes of data.

Byte Position Field Name Value Description
BYTE 0 Command Head 0x05 Start of a Read Response packet.
BYTE 1 Command Head 0x14 Protocol identifier.
BYTE 2 Command Head 0x00 Protocol identifier.
BYTE 3 LSB (Length) LSB Low byte of the payload length.
BYTE 4 MSB (Length) MSB High byte of the payload length.
BYTE 5 Command 0 Static value.
BYTE 6 Payload data (LSB) The low byte of the two-byte data value being returned.
BYTE 7 Payload data (MSB) The high byte of the two-byte data value.
BYTE 8 Checksum checksum The checksum for the response packet.

Application Notes

The following notes from the specification provide additional details for parsing specific responses and other contextual information.

1. Parsing Multi-Byte Data Responses

Some Read commands return a multi-byte value that must be converted from hexadecimal to decimal. The byte order is Little-Endian.

Operating Temperature (Note 1)
  • Value Bytes: BYTE 7 through BYTE 10.
  • Formula: HEX2DEC(ddccbbaa) / 10 where aa is BYTE 7, bb is BYTE 8, etc.
  • Example: If the response bytes are 0x29 0x01 0x00 0x00, the value is 0x00000129.
    • HEX2DEC(0x00000129) = 297
    • 297 / 10 = 29.7°C
Light Source Usage Time (Note 4)
  • Value Bytes: BYTE 7 through BYTE 10.
  • Formula: HEX2DEC(ddccbbaa) where aa is BYTE 7, bb is BYTE 8, etc.
  • Example: If the response bytes are 0xB8 0x0B 0x00 0x00, the value is 0x00000BB8.
    • HEX2DEC(0x00000BB8) = 3000 hours
2. Special Response Formats
Error Status (Note 3)
  • For service debugging, a read command for error status returns a 32-byte packet.
  • The response starts with 0x05 0x14 0x00 0x16 0x00 0x00 0x00...
  • The payload contains 20 items detailing various error states.
Function Disabled Response (Note 5)
  • If a function is disabled or "greyed out" (e.g., Aspect Ratio when no source is active), the projector will return a specific response.
  • Identifier: The first byte of the response is 0x00.
  • Full Response: 0x00 0x14 0x00 0x00 0x00 0x14
3. Contextual Information
LAN Control (Note 2)
  • When controlling the projector over a LAN, use the same command codes but remove the 0x prefix.
  • Communication occurs via port 4661.
HDMI Range (Note 6)
  • Enhanced (PC Level): Represents a full 0-255 signal range.
  • Normal (Video Level): Represents a limited 16-235 signal range.
Projector Status Definitions (Note 7)
  • Power On: The system is fully initialized and ready to display a source.
  • Warm Up: The system is initializing. Do not send other commands during this stage.
  • Cool Down: The fan is cooling the lamp after shutdown. Do not send other commands during this stage.
  • Power Off: The system is turned off. For rebooting via LAN, the "Standby LAN Control" setting must be set to "ON".
Function-Specific Notes (Notes 8 & 9)
  • Mute: The "Mute" function is only active when there is an input source applied.
  • Auto Adjust: This function is only active with non-digital input sources, such as VGA/Computer/D-sub.
  • Reset to Factory Default: After sending this command, the user must reboot the projector for the parameters to be cleared.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFunctionDisabled = fmt.Errorf("function is disabled (greyed out) on the projector")

ErrFunctionDisabled is returned when the projector indicates that a function is disabled (greyed out). This typically occurs when there are no source inputs to the projector, making certain functions like "Aspect Ratio" unavailable via OSD menu or remote control.

Functions

This section is empty.

Types

type AspectRatio

type AspectRatio int8

Aspect ratio

const (
	AspectRatioAuto       AspectRatio = 0x00
	AspectRatio4To3       AspectRatio = 0x02
	AspectRatio16To9      AspectRatio = 0x03
	AspectRatio16To10     AspectRatio = 0x04
	AspectRatioAnamorphic AspectRatio = 0x05
	AspectRatioWide       AspectRatio = 0x06
	AspectRatio235To1     AspectRatio = 0x07
	AspectRatioPanorama   AspectRatio = 0x08
	AspectRatioNative     AspectRatio = 0x09
)

type ColorMode

type ColorMode int8

Color mode

const (
	ColorModeBrightest     ColorMode = 0x00
	ColorModeMovie         ColorMode = 0x01
	ColorModeStandard      ColorMode = 0x04
	ColorModeSRGBViewMatch ColorMode = 0x05
	ColorModeDynamic       ColorMode = 0x08
	ColorModeRec709        ColorMode = 0x09
	ColorModeDICOMSIM      ColorMode = 0x0A
	ColorModeSports        ColorMode = 0x11
	ColorModePhoto         ColorMode = 0x13
	ColorModePresentation  ColorMode = 0x14
	ColorModeGaming        ColorMode = 0x12
	ColorModeVivid         ColorMode = 0x15
	ColorModeISFDay        ColorMode = 0x16
	ColorModeISFNight      ColorMode = 0x17
)

type ColorTemperature

type ColorTemperature int8

Color temperature

const (
	ColorTemperatureWarm    ColorTemperature = 0x00
	ColorTemperatureNormal  ColorTemperature = 0x01
	ColorTemperatureNeutral ColorTemperature = 0x02
	ColorTemperatureCool    ColorTemperature = 0x03
)

type ErrorStatus

type ErrorStatus struct {
	LampFailCount               uint8
	LampLitErrorCount           uint8
	Fan1ErrorCount              uint8
	Fan2ErrorCount              uint8
	Fan3ErrorCount              uint8
	Fan4ErrorCount              uint8
	Diode1OpenErrorCount        uint8
	Diode2OpenErrorCount        uint8
	Diode1ShortErrorCount       uint8
	Diode2ShortErrorCount       uint8
	TemperatureErrorCount       uint8
	Temperature2ErrorCount      uint8
	FanIC1ErrorCount            uint8
	ColorWheelErrorCount        uint8
	ColorWheelStartupErrorCount uint8
	UART1ErrorCount             uint8
	AbnormalPowerdown           uint8
	FirstBurnInErrorMinute      uint32
	LampStatus                  LampModeStatus
	LampErrorStatus             LampModeErrorStatus
}

type HdmiFormat

type HdmiFormat int8

HDMI Format

const (
	HdmiFormatRGB  HdmiFormat = 0x00
	HdmiFormatYUV  HdmiFormat = 0x01
	HdmiFormatAuto HdmiFormat = 0x02
)

type HdmiRange

type HdmiRange int8

Hdmi Range

const (
	HdmiRangeEnhanced HdmiRange = 0x00 // 0-255
	HdmiRangeNormal   HdmiRange = 0x01 // 16-235
	HdmiRangeAuto     HdmiRange = 0x02
)

type LampModeErrorStatus

type LampModeErrorStatus uint16
const (
	LampModeErrorStatusNoError                         LampModeErrorStatus = 0x00
	LampModeErrorStatusTemperatureShutdown             LampModeErrorStatus = 0x01
	LampModeErrorStatusShortCircuit                    LampModeErrorStatus = 0x02
	LampModeErrorStatusEndOfLampLife                   LampModeErrorStatus = 0x03
	LampModeErrorStatusLampDidNotIgnite                LampModeErrorStatus = 0x04
	LampModeErrorStatusLampExtinguishedDuringOperation LampModeErrorStatus = 0x05
	LampModeErrorStatusLampExtinguishedDuringRunUp     LampModeErrorStatus = 0x06
	LampModeErrorStatusEEPROMWriteError                LampModeErrorStatus = 0x07
	LampModeErrorStatusEEPROMWriteBufferOverflow       LampModeErrorStatus = 0x08
	LampModeErrorStatusUARTBufferOverflow              LampModeErrorStatus = 0x09
	LampModeErrorStatusLampCurrentCalculationError     LampModeErrorStatus = 0x0A
	LampModeErrorStatusCorruptedSoftwareConfiguration  LampModeErrorStatus = 0x0B
	LampModeErrorStatusLampVoltageTooLow               LampModeErrorStatus = 0x0C
	LampModeErrorStatusEEPROMConfigMismatch            LampModeErrorStatus = 0x0F
	LampModeErrorStatusMaxPreHeatingTimeElapsed        LampModeErrorStatus = 0x10
)

type LampModeStatus

type LampModeStatus int8

Error status

const (
	LampModeStatusStandby                    LampModeStatus = 0x00
	LampModeStatusIgnition                   LampModeStatus = 0x01 // 0x01, 0x02, 0x03
	LampModeStatusLampRunUp                  LampModeStatus = 0x04
	LampModeStatusCoolDown                   LampModeStatus = 0x05
	LampModeStatusNormalLampOperation        LampModeStatus = 0x06
	LampModeStatusShutdownUnrecoverableError LampModeStatus = 0x08
	LampModeStatusPreHeatingPhase            LampModeStatus = 0x09 // 0x09, 0x0C
)

type Language

type Language int8

Language

const (
	LanguageEnglish     Language = 0x00
	LanguageFrench      Language = 0x01
	LanguageGerman      Language = 0x02
	LanguageItalian     Language = 0x03
	LanguageSpanish     Language = 0x04
	LanguageRussian     Language = 0x05
	LanguageTradChinese Language = 0x06
	LanguageSimpChinese Language = 0x07
	LanguageJapanese    Language = 0x08
	LanguageKorean      Language = 0x09
	LanguageSwedish     Language = 0x0A
	LanguageDutch       Language = 0x0B
	LanguageTurkish     Language = 0x0C
	LanguageCzech       Language = 0x0D
	LanguagePortuguese  Language = 0x0E
	LanguageThai        Language = 0x0F
	LanguagePolish      Language = 0x10
	LanguageFinnish     Language = 0x11
	LanguageArabic      Language = 0x12
	LanguageIndonesian  Language = 0x13
	LanguageHindi       Language = 0x14
	LanguageVietnamese  Language = 0x15
)

type LightSourceMode

type LightSourceMode int8
const (
	LightSourceModeNormal     LightSourceMode = 0x00
	LightSourceModeEco        LightSourceMode = 0x01
	LightSourceModeDynamicEco LightSourceMode = 0x02
	LightSourceModeSuperEco   LightSourceMode = 0x03
)

type PowerState

type PowerState int8

Power and Status

const (
	PowerStateOn  PowerState = 0x01
	PowerStateOff PowerState = 0x00
)

type PrimaryColor

type PrimaryColor int8

Primary Color

const (
	PrimaryColorR PrimaryColor = 0x00
	PrimaryColorG PrimaryColor = 0x01
	PrimaryColorB PrimaryColor = 0x02
	PrimaryColorC PrimaryColor = 0x03
	PrimaryColorM PrimaryColor = 0x04
	PrimaryColorY PrimaryColor = 0x05
)

type ProjectorPosition

type ProjectorPosition int8

Projector Position

const (
	ProjectorPositionFrontTable   ProjectorPosition = 0x00
	ProjectorPositionRearTable    ProjectorPosition = 0x01
	ProjectorPositionRearCeiling  ProjectorPosition = 0x02
	ProjectorPositionFrontCeiling ProjectorPosition = 0x03
)

type ProjectorStatusValue

type ProjectorStatusValue int8
const (
	ProjectorStatusPowerOff ProjectorStatusValue = 0x00
	ProjectorStatusWarmUp   ProjectorStatusValue = 0x01
	ProjectorStatusPowerOn  ProjectorStatusValue = 0x02
	ProjectorStatusCoolDown ProjectorStatusValue = 0x03
)

type RemoteKey

type RemoteKey int8

Remote Key

const (
	RemoteKeyMenu     RemoteKey = 0x0F
	RemoteKeyExit     RemoteKey = 0x13
	RemoteKeyTop      RemoteKey = 0x0B
	RemoteKeyBottom   RemoteKey = 0x0C
	RemoteKeyLeft     RemoteKey = 0x0D
	RemoteKeyRight    RemoteKey = 0x0E
	RemoteKeySource   RemoteKey = 0x04
	RemoteKeyEnter    RemoteKey = 0x15
	RemoteKeyAuto     RemoteKey = 0x08
	RemoteKeyMyButton RemoteKey = 0x11
)

type ScreenColor

type ScreenColor int8

Screen Color

const (
	ScreenColorOff        ScreenColor = 0x00
	ScreenColorBlackboard ScreenColor = 0x01
	ScreenColorGreenboard ScreenColor = 0x02
	ScreenColorWhiteboard ScreenColor = 0x03
	ScreenColorBlueboard  ScreenColor = 0x04
)

type SourceInput

type SourceInput int8

Source input

const (
	SourceInputDSub1      SourceInput = 0x00
	SourceInputDSub2      SourceInput = 0x08
	SourceInputHDMI1      SourceInput = 0x03
	SourceInputHDMI2      SourceInput = 0x07
	SourceInputHDMI3      SourceInput = 0x09
	SourceInputHDMIMHL4   SourceInput = 0x0E
	SourceInputComposite  SourceInput = 0x05
	SourceInputSVideo     SourceInput = 0x06
	SourceInputDVI        SourceInput = 0x0A
	SourceInputComponent  SourceInput = 0x0B
	SourceInputHDBaseT    SourceInput = 0x0C
	SourceInputUSBC       SourceInput = 0x0F
	SourceInputUSBReader  SourceInput = 0x1A
	SourceInputLANWiFi    SourceInput = 0x1B
	SourceInputUSBDisplay SourceInput = 0x1C
)

type SplashScreen

type SplashScreen int8

Splash Screen

const (
	SplashScreenBlack     SplashScreen = 0x00
	SplashScreenBlue      SplashScreen = 0x01
	SplashScreenViewSonic SplashScreen = 0x02
	SplashScreenCapture   SplashScreen = 0x03
	SplashScreenOff       SplashScreen = 0x04
)

type ThreeDSyncMode

type ThreeDSyncMode int8

3D Sync Mode

const (
	ThreeDSyncOff             ThreeDSyncMode = 0x00
	ThreeDSyncAuto            ThreeDSyncMode = 0x01
	ThreeDSyncFrameSequential ThreeDSyncMode = 0x02
	ThreeDSyncFramePacking    ThreeDSyncMode = 0x03
	ThreeDSyncTopBottom       ThreeDSyncMode = 0x04
	ThreeDSyncSideBySide      ThreeDSyncMode = 0x05
)

type ViewSonic

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

ViewSonic is a connection to the projector. It is designed to be thread-safe. It automatically handles reconnects in the background.

func New

func New(ip string) *ViewSonic

New generates a Connection and starts a background goroutine to maintain the connection.

func (*ViewSonic) AutoAdjust

func (conn *ViewSonic) AutoAdjust() error

Auto Adjust

func (*ViewSonic) Close

func (conn *ViewSonic) Close()

Close closes the connection to the projector and stops the reconnect loop.

func (*ViewSonic) CycleAspectRatio

func (conn *ViewSonic) CycleAspectRatio() error

func (*ViewSonic) CycleAudioMode

func (conn *ViewSonic) CycleAudioMode() error

Audio mode cycle

func (*ViewSonic) CycleColorMode

func (conn *ViewSonic) CycleColorMode() error

func (*ViewSonic) CycleLampMode

func (conn *ViewSonic) CycleLampMode() error

func (*ViewSonic) DecreaseBrightness

func (conn *ViewSonic) DecreaseBrightness() error

func (*ViewSonic) DecreaseContrast

func (conn *ViewSonic) DecreaseContrast() error

func (*ViewSonic) DecreaseGain

func (conn *ViewSonic) DecreaseGain() error

func (*ViewSonic) DecreaseHue

func (conn *ViewSonic) DecreaseHue() error

func (*ViewSonic) DecreaseKeystoneHorizontal

func (conn *ViewSonic) DecreaseKeystoneHorizontal() error

func (*ViewSonic) DecreaseKeystoneVertical

func (conn *ViewSonic) DecreaseKeystoneVertical() error

func (*ViewSonic) DecreaseSaturation

func (conn *ViewSonic) DecreaseSaturation() error

func (*ViewSonic) DecreaseSharpness

func (conn *ViewSonic) DecreaseSharpness() error

func (*ViewSonic) DecreaseVolume

func (conn *ViewSonic) DecreaseVolume() error

func (*ViewSonic) GetAspectRatio

func (conn *ViewSonic) GetAspectRatio() (AspectRatio, error)

func (*ViewSonic) GetBlank

func (conn *ViewSonic) GetBlank() (bool, error)

func (*ViewSonic) GetBrightness

func (conn *ViewSonic) GetBrightness() (int16, error)

func (*ViewSonic) GetBrilliantColor

func (conn *ViewSonic) GetBrilliantColor() (int8, error)

func (*ViewSonic) GetCEC

func (conn *ViewSonic) GetCEC() (bool, error)

func (*ViewSonic) GetColorMode

func (conn *ViewSonic) GetColorMode() (ColorMode, error)

func (*ViewSonic) GetColorTemperature

func (conn *ViewSonic) GetColorTemperature() (ColorTemperature, error)

func (*ViewSonic) GetContrast

func (conn *ViewSonic) GetContrast() (int16, error)

func (*ViewSonic) GetErrorStatus

func (conn *ViewSonic) GetErrorStatus() (*ErrorStatus, error)

GetErrorStatus returns the decoded error status.

func (*ViewSonic) GetFreeze

func (conn *ViewSonic) GetFreeze() (bool, error)

func (*ViewSonic) GetGain

func (conn *ViewSonic) GetGain() (int16, error)

func (*ViewSonic) GetHdmiFormat

func (conn *ViewSonic) GetHdmiFormat() (HdmiFormat, error)

func (*ViewSonic) GetHdmiRange

func (conn *ViewSonic) GetHdmiRange() (HdmiRange, error)

func (*ViewSonic) GetHighAltitudeMode

func (conn *ViewSonic) GetHighAltitudeMode() (bool, error)

func (*ViewSonic) GetHorizontalPosition

func (conn *ViewSonic) GetHorizontalPosition() (int8, error)

func (*ViewSonic) GetHue

func (conn *ViewSonic) GetHue() (int16, error)

func (*ViewSonic) GetKeystoneHorizontal

func (conn *ViewSonic) GetKeystoneHorizontal() (int8, error)

func (*ViewSonic) GetKeystoneVertical

func (conn *ViewSonic) GetKeystoneVertical() (int8, error)

func (*ViewSonic) GetLanguage

func (conn *ViewSonic) GetLanguage() (Language, error)

func (*ViewSonic) GetLightSourceMode

func (conn *ViewSonic) GetLightSourceMode() (LightSourceMode, error)

func (*ViewSonic) GetLightSourceUsageTime

func (conn *ViewSonic) GetLightSourceUsageTime() (uint32, error)

func (*ViewSonic) GetMessageDisplay

func (conn *ViewSonic) GetMessageDisplay() (bool, error)

func (*ViewSonic) GetMute

func (conn *ViewSonic) GetMute() (bool, error)

func (*ViewSonic) GetOperatingTemperature

func (conn *ViewSonic) GetOperatingTemperature() (float32, float32, error)

Temperature status

func (*ViewSonic) GetOverScan

func (conn *ViewSonic) GetOverScan() (int8, error)

func (*ViewSonic) GetPower

func (conn *ViewSonic) GetPower() (PowerState, error)

func (*ViewSonic) GetProjectorPosition

func (conn *ViewSonic) GetProjectorPosition() (ProjectorPosition, error)

func (*ViewSonic) GetProjectorStatus

func (conn *ViewSonic) GetProjectorStatus() (ProjectorStatusValue, error)

func (*ViewSonic) GetQuickAutoSearch

func (conn *ViewSonic) GetQuickAutoSearch() (bool, error)

func (*ViewSonic) GetQuickPowerOff

func (conn *ViewSonic) GetQuickPowerOff() (bool, error)

func (*ViewSonic) GetRemoteControlCode

func (conn *ViewSonic) GetRemoteControlCode() (int8, error)

func (*ViewSonic) GetSaturation

func (conn *ViewSonic) GetSaturation() (int16, error)

func (*ViewSonic) GetScreenColor

func (conn *ViewSonic) GetScreenColor() (ScreenColor, error)

func (*ViewSonic) GetSelectedPrimaryColor

func (conn *ViewSonic) GetSelectedPrimaryColor() (PrimaryColor, error)

GetSelectedPrimaryColor returns inconsistent results use with caution. The documentation states that the Generic Read Return is 1 byte longer then the documentet values. However, testing indicates that its most of the time a 2 byte Read Returns some data.

func (*ViewSonic) GetSharpness

func (conn *ViewSonic) GetSharpness() (int16, error)

func (*ViewSonic) GetSourceInput

func (conn *ViewSonic) GetSourceInput() (SourceInput, error)

func (*ViewSonic) GetSplashScreen

func (conn *ViewSonic) GetSplashScreen() (SplashScreen, error)

func (*ViewSonic) GetThreeDSyncInvert

func (conn *ViewSonic) GetThreeDSyncInvert() (bool, error)

func (*ViewSonic) GetThreeDSyncMode

func (conn *ViewSonic) GetThreeDSyncMode() (ThreeDSyncMode, error)

func (*ViewSonic) GetVerticalPosition

func (conn *ViewSonic) GetVerticalPosition() (int8, error)

func (*ViewSonic) GetVolume

func (conn *ViewSonic) GetVolume() (int8, error)

func (*ViewSonic) IncreaseBrightness

func (conn *ViewSonic) IncreaseBrightness() error

Brightness

func (*ViewSonic) IncreaseContrast

func (conn *ViewSonic) IncreaseContrast() error

Contrast

func (*ViewSonic) IncreaseGain

func (conn *ViewSonic) IncreaseGain() error

Gain

func (*ViewSonic) IncreaseHue

func (conn *ViewSonic) IncreaseHue() error

Hue/Tint

func (*ViewSonic) IncreaseKeystoneHorizontal

func (conn *ViewSonic) IncreaseKeystoneHorizontal() error

func (*ViewSonic) IncreaseKeystoneVertical

func (conn *ViewSonic) IncreaseKeystoneVertical() error

Keystone

func (*ViewSonic) IncreaseSaturation

func (conn *ViewSonic) IncreaseSaturation() error

Saturation

func (*ViewSonic) IncreaseSharpness

func (conn *ViewSonic) IncreaseSharpness() error

Sharpness

func (*ViewSonic) IncreaseVolume

func (conn *ViewSonic) IncreaseVolume() error

Volume

func (*ViewSonic) Read

func (conn *ViewSonic) Read(command uint16) (int8, error)

Read sends a read command to the projector and returns a single byte. If the connection is down, it will return an error. The background process is responsible for reconnecting. The caller may choose to retry the command after a short delay.

func (*ViewSonic) Read2Bytes

func (conn *ViewSonic) Read2Bytes(command uint16) (int16, error)

Read2Bytes sends a read command and returns two bytes as an int16. If the connection is down, it will return an error. The background process is responsible for reconnecting. The caller may choose to retry the command after a short delay.

func (*ViewSonic) ReadNBytes

func (conn *ViewSonic) ReadNBytes(command uint16) ([]byte, error)

ReadNBytes sends a read command and returns N bytes of data. If the connection is down, it will return an error. The background process is responsible for reconnecting. The caller may choose to retry the command after a short delay.

func (*ViewSonic) ResetAllSettings

func (conn *ViewSonic) ResetAllSettings() error

Reset All Settings

func (*ViewSonic) ResetCurrentColorSettings

func (conn *ViewSonic) ResetCurrentColorSettings() error

func (*ViewSonic) ResetLightSourceUsageTime

func (conn *ViewSonic) ResetLightSourceUsageTime() error

Light Source

func (*ViewSonic) SelectPrimaryColor

func (conn *ViewSonic) SelectPrimaryColor(color PrimaryColor) error

func (*ViewSonic) SendRemoteKey

func (conn *ViewSonic) SendRemoteKey(key RemoteKey) error

0x02 0x14 0x00 0x04 0x00 | 0x34 | 0x02 0x04 0x0F 0x61

func (*ViewSonic) SetAspectRatio

func (conn *ViewSonic) SetAspectRatio(ratio AspectRatio) error

func (*ViewSonic) SetBlank

func (conn *ViewSonic) SetBlank(blank bool) error

Blank

func (*ViewSonic) SetBrilliantColor

func (conn *ViewSonic) SetBrilliantColor(level int8) error

Brilliant Color SetBrilliantColor sets the brilliant color level (0-10)

func (*ViewSonic) SetCEC

func (conn *ViewSonic) SetCEC(enable bool) error

HDMI CEC

func (*ViewSonic) SetColorMode

func (conn *ViewSonic) SetColorMode(mode ColorMode) error

func (*ViewSonic) SetColorTemperature

func (conn *ViewSonic) SetColorTemperature(temp ColorTemperature) error

func (*ViewSonic) SetFreeze

func (conn *ViewSonic) SetFreeze(freeze bool) error

Freeze

func (*ViewSonic) SetHdmiFormat

func (conn *ViewSonic) SetHdmiFormat(format HdmiFormat) error

func (*ViewSonic) SetHdmiRange

func (conn *ViewSonic) SetHdmiRange(r HdmiRange) error

func (*ViewSonic) SetHighAltitudeMode

func (conn *ViewSonic) SetHighAltitudeMode(enable bool) error

High Altitude Mode

func (*ViewSonic) SetLanguage

func (conn *ViewSonic) SetLanguage(lang Language) error

func (*ViewSonic) SetLightSourceMode

func (conn *ViewSonic) SetLightSourceMode(mode LightSourceMode) error

func (*ViewSonic) SetMessageDisplay

func (conn *ViewSonic) SetMessageDisplay(enable bool) error

Message

func (*ViewSonic) SetMute

func (conn *ViewSonic) SetMute(mute bool) error

Mute

func (*ViewSonic) SetOverScan

func (conn *ViewSonic) SetOverScan(value int8) error

Over Scan (0-5)

func (*ViewSonic) SetPower

func (conn *ViewSonic) SetPower(state PowerState) error

func (*ViewSonic) SetProjectorPosition

func (conn *ViewSonic) SetProjectorPosition(pos ProjectorPosition) error

func (*ViewSonic) SetQuickAutoSearch

func (conn *ViewSonic) SetQuickAutoSearch(enable bool) error

Quick Auto Search

func (*ViewSonic) SetQuickPowerOff

func (conn *ViewSonic) SetQuickPowerOff(enable bool) error

Quick Power Off

func (*ViewSonic) SetRemoteControlCode

func (conn *ViewSonic) SetRemoteControlCode(code int8) error

Remote Control Code (1-8)

func (*ViewSonic) SetScreenColor

func (conn *ViewSonic) SetScreenColor(color ScreenColor) error

func (*ViewSonic) SetSourceInput

func (conn *ViewSonic) SetSourceInput(input SourceInput) error

func (*ViewSonic) SetSplashScreen

func (conn *ViewSonic) SetSplashScreen(screen SplashScreen) error

func (*ViewSonic) SetThreeDSyncInvert

func (conn *ViewSonic) SetThreeDSyncInvert(enable bool) error

func (*ViewSonic) SetThreeDSyncMode

func (conn *ViewSonic) SetThreeDSyncMode(mode ThreeDSyncMode) error

func (*ViewSonic) SetVolume

func (conn *ViewSonic) SetVolume(level int8) error

func (*ViewSonic) ShiftHorizontalPosition

func (conn *ViewSonic) ShiftHorizontalPosition(right bool) error

Image Position

func (*ViewSonic) ShiftVerticalPosition

func (conn *ViewSonic) ShiftVerticalPosition(up bool) error

func (*ViewSonic) Write

func (conn *ViewSonic) Write(command uint16, value int8) error

Write sends a write command to the projector. If the connection is down, it will return an error. The background process is responsible for reconnecting. The caller may choose to retry the command after a short delay.

func (*ViewSonic) WriteKey

func (conn *ViewSonic) WriteKey(command uint16, value uint8) error

WriteKey is a specialized version of Write for Remote Key commands such as Menu, Enter, etc.

Jump to

Keyboard shortcuts

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