Вы находитесь на странице: 1из 8

BNCS V4.

5 Panel Managers

Concepts
A panel is the name given to the user interface in a BNCS V4.5 system. The various interaction
elements, buttons, mimics etc, are elements of the panel. There are three types of panel that
can be used:

1) Unscripted Panel

2) Unscripted Panel with connections

3) Scripted Panel

The version 4.5 buttons and grids have significant intelligence built into their design. They can
auto-connect to the device drivers to send commands and receive revertives. The BNCS driver
parameters are entered into the button data as part of the panel editing. The driver data may
either use direct numbering, or entries from the BNCS instances.xml file in the config directory.
This enables the buttons to function without the panel implementer writing any code. Panels that
do not require code are called unscripted panels. The panels are designed using a BNCS
visual editor program, and the descriptions of the button types and their positions are stored in a
xml text file with a .bncs_ui type extension.

The newer versions of BNCS version 4.5 contain a connections engine. When buttons are
clicked/pressed they generate a windows event. The connections engine allows the event data
to be sent to another interface element – either a BNCS button or a scripted panel element. The
panel designer sets the events that are reported by a button, and then sets the connections
engine to route the event data to one or more destinations.

There is a “special” button that acts as a holder for a BNCS scripted panel. Such panels winthin
a panel enable application-specific functions to be written and re-used many times, either in the
current project or in several projects. Writing scripted panels in the correct format enables the
topmost panel interfaces to be implemented entirely as unscripted panels with messages
passed around via the connections engine.

When a system designer needs more control logic they use panels that have the intelligent
buttons plus computer code to implement the required logic. The code processes both the
reports from buttons and revertive data from drivers. The chosen coding language is C++.
Panels with code are called Scripted Panels. The power of C++ means that scripted panels
can implement very complex logic. The code is responsible for selecting and enabling
the .bncs_ui files that are shown on the user interface.

As stated earlier, scripted panels do not have to be the full size of the user interface area. There
are two uses for small panel areas – pop-up controls and re-usable elements. Pop-up panels
are used to adjust processing path elements such as aspect ratio converters or amplifier gains.
BNCS Version 4.5 Panels

Re-usable panels are creted where the system designer recognises that the same functions will
be required on many user interface panels, so they create a scripted panel that acts as a new
version of the available BNCS buttons. For example, a router source selection may need the
user to select a logical group of sources, such as graphics, then select the specific source
required from the available graphics sources. Making the re-usable component saves a lot of
coding time in the project.

BNCS 4.5 Panel Hosts


In version 2 and version 3 systems each panel was a windows executable panel. In version 4.5
a panel has to be hosted by a windows executable task. There are 3 panel host tasks available
in version 4.5:

1) Panel Manager

2) Autohost

3) Single Panel Host

Panel Manager
Program manager is a core element of a BNCS version 4.5 installation. The picture below
shows a panel running within the panel manager.

2
BNCS Version 4.5 Panels

At the top left of the panel manager there is space for a system-wide status information element.
The centre of the top bar shows the title of the currently active panel, with the current date and
time shown to the right. The major area in the centre is the currently active panel, in this
example an X-Y router.

The buttons at the bottom on the display have three segments. At the left side is a button that
when activated shows a system status panel, including parameters such as the IP address,
workstation number, and an ability to switch to an alternate panel set (Engineering panels). At
the right end of the button bar there is space for the global alarm status button. The buttons in
the central segment are the available panels that can be shown.

In the config files for a deployed system there are a set of files that enable the panel manager to
work out which panels should be offered on a given workstation. If there are more panels in the
available list than fit into the button area, the panel manager automatically adds button paging
capability to the button bar.

When a panel is requested, the panel manager checks if the panel is already loaded and
available. If the panel has not yet been used, panel manager uses data in the configuration files
to find the name of the folder that holds the panel definition and code. The folders that hold
panels are all sub-folders of the active BNCS system panels/ folder.

Let us consider a panel that implements an unscripted X-Y router for the central apparatus
room. The system designer has decided to call this panel carxy. The panel manager requires
that there is a file:

.…/panels/carxy/carxy.bncs_ui

Note that the folder name and the bncs_ui file have the same name. We can group panels into
area-based folders, so the panel could equally be saved in folder:

…./panels/car/carxy/carxy.bncs_ui

The name matching elements change for scripted panels. Scripted panels are compiled to
dynamic link libraries (DLL) modules. The name of the folder and the DLL file must match. So if
we have a scripted ISDN panel for our area we would need:

…./panels/car_isdn/car_isdn.dll

Within the car_isdn folder there will be one or more bncs_ui files, but the bncs_ui names are
freely chosen by the system implementation team.

In the example panel seen at the centre of the panel manager picture above, the two name
selectors are themselves scripted panels that are used within the outer scripted panel. Panels
designed to be reusable are normally held in folder:

…/panels/components/

The flow of messages within the Program Manager is illustrated by the following diagram.

3
BNCS Version 4.5 Panels

When the user pushes the MyPanel start button at the bottom of the panel manger window, the
manager loads the myPanel.DLL, then calls the Startup Callback

The startup code will ask the panel manager to load a user interface such as p1.bncs_ui, as
well as register for revertives from devices of interest.

When the user pushes a button on p1.bncs_ui, this generates a windows message that
identifies which panel caused the message, the ID of the button, and the information about the
push/release of the button. Panel manager keeps track of the panels that are loaded. It converts
the windows message to a function call, passing the button data as an object to the button
callback code. Buttons can also send messages to the connections engine. This engine uses
any connection data programmed by the developer to send further messages to other buttons
on the panel.

Revertives passed on by CSI are routed to the revertive callback function, including the dat
needed to identify the device that generated the revertive, and the revertive information.

A panel programmer may need a one-off timer delay, or a repeating timer. When a windows
timer fires, the windows message is converted to message to the Timer Callback.

4
BNCS Version 4.5 Panels

Autohost
In any BNCS deployment there will usually be a requirement for some logic that does not need
the user to press any buttons. Such logic can be built in a BNCS Automatic panel.

An example of such logic is the management of all the GPI contacts required when a studio
switches between rehearse and transmission. Many panels may need to indicate and change
the status, so it is appropriate to have a module that does all of the fine detail control. We can
use a slot in a BNCS infodriver that holds the studio transmission status. When a user panel
changes the status value in the slot, the new status is broadcast on the network. The function of
the automatic is to monitor for the revertive from the infodriver, then to switch output control
interfaces as may be required. It is possible to create stand-alone EXE files to implement the
logic, but many functions can be achieved with a BNCS panel.

In BNCS version 4.5 there is a special panel host called autohost. Several instances of this can
be run on a workstation. Each instance takes a name as a command line parameter. That name
is an entry in an autohosts configuration xml file that lists the panels to be run. The autohost
task has a tab bar that allows an engineer to monitor the panels that are running and their
status. A status page for a autohost with a single automatic is shown below.

Clicking on the name of a panel displays any user interface elements that have been placed on
the automatic panel. Such elements are often used to enable the development and support
teams check and prove operation of the automatic and hardware. An example of such an
automatic page is shown below.

5
BNCS Version 4.5 Panels

Single Panel Host


Sometimes an existing version 3 system needs additional features added. Whilst a total re-write
to version 4.5 may not yet be required, a version 4.5 panel may be the easiest way to provide
the functionality needed. The single panel host can be used to host the version 4.5 panel, once
a suitable environment has been created (environment variables pointing at the current root,
system and workstation). There is a BNCS supporter tool that creates the environment then
starts the panel host application.

A second use for the single panel host is during the development of scripted panels. An IDE
development system cannot run the DLL that is used as a panel, so the IDE is told to run
bncs_v45_host.exe which then displays the panel content, whilst enabling breakpoints to be set
in the code to enable debugging and testing.

6
BNCS Version 4.5 Panels

BNCS Visual Editor


The BNCS visual editor program is used to create and modify the user interface definitions used
in a system. The detailed operation of the editor is described by documentation written by the
BNCS core team, so it is not described in this document. An example of a panel being defined
in the editor is seen below. The panel under edit is shown in the large panel at the left, the
buttons that can be added are shown in the upper right white background window.

CSI was running when this screen was captured, and this has enabled the router grids to
display the source and destination names.

The data for the layout is stored as xml text data. The text below is an extract from the bncs_ui
file seen in the visual editor example. The <container> definition near the start if the listing is the
overall dialog box, and we can see the panel position and size data in the definition.

<?xml version="1.0" encoding="windows-1252"?>


<control_set>
<container style="" type="widget" name="Visual Editor Dialog" x="0" y="0" w="1024"
h="668" gridSize="10" gridEnabled="0" testInstance="" panelmanSize="1024"
showTestDialog="0">

<control class="bncs_control" name="Background" x="0" y="0" w="1024" h="668">


<setting value="style=label" />
<setting value="labelstyle=plain" />
<setting value="colour.background=#640064" />
<setting value="notify.released=false" />
</control>
<control class="bncs_control" name="Label" x="156" y="554" w="294" h="98">
<setting value="style=label" />
</control>
<control class="bncs_script_loader" name="Sources" x="34" y="14" w="975" h="250">
<setting value="scriptname=/components/wn_matrix" />
<setting value="instance=CAR SDI Router" />
<setting value="host_size=1024" />
<setting value="mapdb=8" />
<setting value="namesdb=0" />
<setting value="mapoffset=0" />

7
BNCS Version 4.5 Panels

<setting value="groupmapoffset=200" />


<setting value="statesheet.group.selected=WNGroupSelected" />
<setting value="statesheet.group.deselected=WNGroupDeselected" />
<setting value="statesheet.item.selected=WNSourceSelected" />
<setting value="statesheet.item.deselected=WNSourceDeselected" />
<setting value="colour.background=#60c060" />
</control>
<control class="bncs_script_loader" name="Destinations" x="34" y="280" w="975"
h="250">
<setting value="scriptname=/components/wn_matrix" />
<setting value="instance=CAR SDI Router" />
<setting value="host_size=1024" />
<setting value="mapdb=8" />
<setting value="namesdb=1" />
<setting value="mapoffset=100" />
<setting value="groupmapoffset=250" />
<setting value="statesheet.group.selected=WNGroupSelected" />
<setting value="statesheet.group.deselected=WNGroupDeselected" />
<setting value="statesheet.item.selected=WNSourceSelected" />
<setting value="statesheet.item.deselected=WNSourceDeselected" />
<setting value="colour.background=#c06060" />
</control>
<control class="bncs_control" name="Take" x="494" y="563" w="160" h="80">
<setting value="stylesheet=WN_Studio_TX_Status" />
<setting value="statesheet=WN_TakeHigh" />
<setting value="text=T A K E" />
<setting value="doublepush=true" />
</control>
<control class="bncs_control" name="Clear" x="704" y="563" w="160" h="80">
<setting value="stylesheet=WN_Studio_TX_Status" />
<setting value="text=C L E A R" />
</control>
</container>
</control_set>

[End of Document]

Author Andy Woodhouse


File Name BNCS Scripted Panels.docx
File Date 07/02/2016 12:13 pm Print Date 08/02/2016 8:37 pm

Вам также может понравиться