> | # Component: PkgDest_2L ## Description This scripted component is designed for use in the BBC Academy Wood Norton BNCS installation where a destination selector is required for a packaged routing system with at least two levels (eg Video + Analogue Audio or Analogue Audio + AES Audio). This component may be used in systems with more than 2 levels, as the panel writer can set which levels are monitored. The panel designer provides a number of parameters at design time. The component needs the instance that defines the matrix and controlled destination. It also requires the name of an object in object_settings.xml. This object has the individual matrix numbers that provide the crosspoint mapping and individual matrix ids for each level. The entry in object_settings.xml is of the form: <object id="rtr_area_2"> <setting id="areaname" value="Studio C" /> <setting id="package_levels" value="3" /> <setting id="driver_ids" value="500,504,501,502,503" /> <setting id="driver_type" value="Package Names,Package Crosspoints,SDI Video,Analogue Audio,AES Audio" /> </object> The relevant data extracted from the instance and object information is passed to the source tally display components. The component exchanges messages with its host to indicate the destination number that has been selected. The message should be sent to all instances of the component on the panel. This selection data causes the originating button to highlight and any other previously active button to deselect. The selected destination should also be sent to the component that implements the take action. If the component receives a selection value of -1, it deselects any active selections. This component uses a component MLDestMimic to provide the monitoring of the destination and display the current source. ## Commands
> Name | Type | Use
> --- | --- | ---
> instance | mandatory | Instance name that defines the package matrix and destination.
> matrixobject | mandatory | Name of entry in object_settings.xml that defines the router numbers and types.
> uselevels | mandatory | Comma delimited list with the two levels to be used by this destination.
> namesDatabase | optional | The database number that provides the name on the destination button. The default value is database 1.
> buttonlow | mandatory | The stylesheet name that defines the button look when deselected.
> buttonhigh | mandatory | The stylesheet name that defines the button look when selected.
> tallystate_L1 | mandatory | The stylesheet name that defines the look of the level 1 source tally display.
> tallystate_L2 | mandatory | The stylesheet name that defines the look of the level 2 source tally display.
> unusedleveltext | optional | Not all levels are used by all destinations. This text is shown in the tally display of unused levels. A default display of "Unused Level" is used if the designer does not provide input.
> selected=value | control | Index of currently selected destination. If this index matches the current button destination it will show the selected state. If it does not match, or has the value -1, the button will deselect.
> ## Notifications
> Name | Use
> --- | ---
> selected=value | Index of selected destination.
## Stylesheets No pre-assigned state sheets are used by this component. ## Developers Notes This component is intended for use with the wildcard capability of the connections engine. If all destination buttons have a name that starts Dest_ and is followed by numbers, eg Dest_03 using a message source of Dest_* and a message destination also of Dest_* the buttons will have only a single active destination. A CLEAR button can deselect all buttons by sending a selected=-1 message to Dest_*
Copyright BBC 2017