FAQ

FrontPanel

API
Published: May 11, 2020
Edited: May 21, 2020

FrontPanel_6

Methods

setBrightness

Parameters:  ledIndicator:String, brightness: Float

Return Value:  boolean

Description:  sets the brightness of the specified LED. Brightness must be a value support by the LED as per the data returned from getFrontPanelLights. The value of the brightness for this led must be persisted.

getBrightness

Parameters:  ledIndicator:String

Return Value:  integer

Description:  gets the brightness of the specified LED.

setLED

Parameters:  info:Object

Return Value:  boolean

Description:  sets the brightness and color properties of the specified LED. The supported properties of the info object passed in will be determined by the color mode of the LED. If the colorMode of an LED is 0 color values will be ignored. If the brightness of the LED is unspecified or value = -1, then the persisted or default value for the system is used.

setBlink

Parameters:  blinkInfo:Object

Return Value:  none

Description:  specifies a blinking pattern for an LED. This method returns immediately, but starts a process of iterating through each element in the array and lighting the LED with the specified brightness and color (if applicable) for the given duration (in milliseconds).

getFrontPanelLights

Parameters:  None

Return Value:  std::vector

Description:  returns an object containing attributes of front panel light: success, supportedLights, and supportedLightsInfo. supportedLights defines the LED lights that can be controlled through the Front Panel API. supportedLightsInfo defines a hash of objects describing each LED light. success - false if the supported lights info was unable to be determined.

setPreferences

Parameters:  preferences:Object

Return Value:  none

Description:  stores the preferences into persistent storage. It does not change the colour of any LEDs. It invoking the setPreferences method of cFrontPanel class to set the preference data.

getPreferences

Parameters:  None

Return Value:  preferences:Object

Description:  returns the preferences object as stored in setPreferences.

set24HourClock

Parameters:  is24Hour

Return Value:  boolean

Description:  specifies the 24 hour clock format. When true, a 24 hour clock format is used, ie: 23:30 for 11:30 PM. The default value is false. When true, touch /opt/persistent/24hourclock. When false, delete /opt/persistent/24hrclock

is24HourClock

Parameters:  None

Return Value:  boolean

Description:  If /opt/persistent/24hourclock exists, return true. If the file does not exist, return false.

setClockTestPattern

Parameters:  show:boolean

Return Value:  none

Description:  enable or disable showing a test pattern on set top boxes with clock displays. When true, clock is set to the test pattern of "88 88". When false, the normal clock pattern is shown. The clock test pattern will not persist, such that the default mode of displaying the time will always be in effect after a reboot.

PHP Code Snippets Powered By : XYZScripts.com