States are used to identify current information about the device. States include Power, Volume, Mute, Source and more. Below you will find the necessary information to setup states within a device driver.
State Type
- User Facing Name
- This value represents what the programmer will see within the builder upon dragging a command to a widget
- State Type
- An array is used when the state can be referenced by a parameter such as a Zone, Input, Output or more.
- String/String Array
- This is a literal string of text. Tech Tip Examples are HDMI or Input
- Number/Number Array
- This is a numerical value
- Boolean/Boolean Array
- This is a two option statement. Tech Tip Examples are 0/1, True/False, or On/Off
- String/String Array
- An array is used when the state can be referenced by a parameter such as a Zone, Input, Output or more.
- State is Dynamic
- This option determines if the parameter requires a widget when added to the User Interface. Tech Tip Discrete volume commands would be Dynamic and use a slider within the User Interface and Strings would add a list box.
- Constraints and Defaults
- Each state type has a different set of Constraints and Defaults
- String
- Possible Values
- Actual Value is what the user can see within the Builder
- Device Encoded Value is the value sent to and received from the device
- Number
- Minimum value is the lowest possible accepted value
- Maximum value is the highest possible accepted value
- Step value is the precision of the number. Note Example a step value of 1 would adjust the device from the previous value of 1 to a new value of 2.
- Possible Values
- Show decimal point is used when the device displays a decimal point value
- Number of characters is how many characters that are expected to represent this parameter by the protocol. Extra leading characters will be omitted during transmission and 0’s will be prepended to meet this length if necessary. 0 means use exactly the number of characters required without omitting or padding.
- String
- Each state type has a different set of Constraints and Defaults
- Boolean
- If your device follows one of these conventions ( 0/1, On/Off, True/False) you do not need a possible value
- If your device does not follow one of the above conventions you will need to create possible values for On and Off
- Adding an attribute to a parameter allows the programmer to alter the user facing name within the client. Tech Tip One example would be Output 1 = Top Left Display, Output 2 = Top Right Diplay, Output 3 = Lower Left Display and Output 4 = Lower Right Display
- Initialized in Builder
- Allows the user to change the parameter value that is displayed within the builder
- Other options
- The other options of Alias Heading, Actual Value Heading and Instructions provide the programmer notes for the possible value to be entered within the builder
Options
Report to dashboard
When this box is checked, all state changes will be reported to the dashboard. By default state changes will be reported to the dashboard.
State is dynamic
Dynamic states will be changed within the client application. Widgets such as volume sliders will change when the volume state of the device changes. Using our above example, a numeric range of 0 – 100 within a volume slider, the control knob of the slider widget will move to indicate the level of the controlled device.
Revision:
8
Last modified:
28 August 2017
Laissez votre avis sur ce sujet.