1.16.2.1.19 Switch element

The Switch Icon display element is a special version of the Device Icon element which may be used to visualize the position of a switch in a user interface screen designed as a block diagram. The switch icon has all capabilities of a plain device icon display element. The context menu shown with this right mouse button additionally contains an option to toggle the switch position. The switch icon element -- unlike the plain device icon element -- does not support user defined images.

The attributes listed below may be configured to customize a display element of this type:

Remarks

Configuring a confirmation question as described above, only affects the 'Toggle position' function provided by the switch icon's right mouse context menu. Setting the switch position from the device dialog always works without a confirmation request.

User defined switch icons

The sat-nms software comes with 6 predefined switch icons. You may add your own icons if none of the predefined switches matches your needs.

For a user defined switch you have to create a set of ten PNG image files / icons. Each icon shows one combination of switch position and device state. All icons of a set must be of the same size, the files must be located in the images subdirectory of the sat-nms server installation and they must follow the naming scheme described below.

The file name of a switch icon consists of the user defined name, followed by a dash and a 2-character status code. All switch icons must be PNG images and end with the file suffix ".png" (lower case). The first character of the status code reflects the switch position, the second one the device's fault/operation state. The following codes are defined:

pos. character description
1 A switch is in position A (or OFF)
1 B switch is in position B (or ON)
2 N switch device is in normal operation, no fault is pending
2 W switch device shows a warning
2 F switch device shows a fault
2 S switch device is set FAULT-SUPPRESSED
2 O switch device is set OUT-OF-SERVICE

Combining the two switch positions with five device status codes results in totally 10 icons which show all possible states of a switch. If you create a switch named "myswitch", the files would be:

myswitch-AN.png myswitch-AW.png myswitch-AF.png myswitch-AS.png myswitch-AO.png myswitch-BN.png myswitch-BW.png myswitch-BF.png myswitch-BS.png myswitch-BO.png

Replacing the predefined icons

In in your sat-nms installation mostly user defined switch symbols are used, you may replace some or all of the predefined switch symbols offered by the Switch Icon dialog with your favorite icons. To configure this, edit the file "client.properties" in the base directory of the sat-nms server installation and add some or all lines of the following:

gui.editor.predefinedSwitch.1=myswitch1 (replace myswitch1 by the name of the icon set to use) gui.editor.predefinedSwitch.2=myswitch2 gui.editor.predefinedSwitch.3=myswitch3 gui.editor.predefinedSwitch.4=myswitch4 gui.editor.predefinedSwitch.5=myswitch5 gui.editor.predefinedSwitch.6=myswitch6

Please note, this does not replace / delete the factory icons. Screens which make use of the factory switches will still use them as before and you are still able to edit screens with factory switch icons by explicitly define their names in the user defined switch field. The names of the factory switch icons are wgswitch , wgswitch-mirrored , cxswitch , cxswitch-mirrored , lswitch and rswitch .

User defined switch icons may be of any size, even larger than the factory icons. When used as predefined switch icons, such large icons will show up in the dialog with their upper left corner only. In the screen the icons gets displayed with it's full size.