Variables

Variables are used within CommandCenter to store data. They are generally used for sharing data between controls or acting as a common holder for either static or non-static information. The designer can create as many variables as required to achieve the functionality for the control, form, view or application. Each variable can be given a name of the designers choice, names are case sensitive and can be the same across the different types, for example a local variable named 'CAMERA' and a panel variable with the same name can co-exist on a form and will be treated separately. If the designer wishes to assign a local variable from a panel variable of the same name then this has to be added to the form in an appropriate place.

For example, if a generic form was created for controlling a specific device, but the title of the form changes depending on the use of this form, a panel variable could be created called TITLE and used to initialise the Label control shown at the top of the form in order to show what device it is controlling.

Another example is where 20 controls require the same (or common) IP address of the device they are controlling, here again a Panel variable could be created called IP_ADDRESS to hold this common value and then each of the controls would access this common value. If another device at a different IP address was to be controlled using this form then only a single change to the value of this variable would be required.

CommandCenter uses a few 'standard' panel variable names to make it easier when using the control templates. These are named:

IP_ADDRESS for the IP address of the device you are controlling (either ACP, SNMP or Generic)

SLOT for the slot of the ACP device you are controlling/monitoring

It is therefore good design practice to avoid using these panel variable names for any other purpose.


© 2014 Grass Valley USA, LLC. All rights reserved. Grass Valley is a registered trademark of GVBB Holdings S.a.r.l.