Assigning icons to class types

Change the icons that are used to represent class types to make it easier for network operators to identify the class types in topology maps. Class types group together more than one class. For example, you might want a single icon that represents the class type CiscoSwitch, where the CiscoSwitch class type groups together multiple Cisco switch class icons.

Make custom icons available by adding icons as described in the related link.
To assign a custom icon to a class type:
  1. Identify the classes that make up your class type.
    For example, if you want a single icon for all Cisco switches (the Cisco switch class type), then identify each of the AOC files that represent individual Cisco switch classes.
  2. Go to the directory that contains the active object class (AOC) files.
    AOC files define the device classes.
    cd $NCHOME/precision/aoc/
  3. For each AOC file in your class type, modify the visual_icon parameter as follows:
    visual_icon = classtype;
    For example, in each Cisco switch AOC file, modify the visual_icon parameter as follows:
    visual_icon = CiscoSwitch;

    Restart the ncp_class process after changing AOC files. After ncp_class is restarted and running, restart the ncp_model process.

  4. Assign the icon prepared earlier to a class type.
    For example, if you want to use a single icon for all Cisco switches (the Cisco switch class type), then edit the $NMGUI_HOME/profile/etc/tnm/topoviz.properties file, find the section that specifies icon names for device types and modify the relevant line of code as follows:
    topoviz.image.CiscoSwitch=my_icon.svg

    Where my_icon is the name of your custom icon file for the Cisco switch class type.

  5. Save the topoviz.properties file.

Assigning an icon for the RAN transmitter class type

An existing example is the class type for radio area network (RAN) transmitters. A number of RAN device classes fall into the transmitter type. For example, the RANBaseStation and RANNodeB classes both fall into the transmitter class type and are represented by a single transmitter icon. This is implemented using the following file settings:
AOC file for RANBaseStation
In this file, the visual_icon parameter is set to the generic class type Transmitter.
//*************************************************************
//
//  File : RANBaseStation.aoc
//
//*************************************************************


active object 'RANBaseStation'
{
	super_class = 'NetworkDevice';

	instantiate_rule = "ExtraInfo->ranBaseStation != NULL";

	visual_icon = 'Transmitter';
};
AOC file for RANNodeB
In this file, the visual_icon parameter is also set to the generic class type Transmitter.
//*************************************************************
//
//  File : RANNodeB.aoc
//
//*************************************************************


active object RANNodeB
{
	super_class = 'NetworkDevice';

	instantiate_rule = "ExtraInfo->ranNodeB != NULL";

	visual_icon = 'Transmitter';
};
topoviz.properties file
In this file, the icon transmitter.svg is assigned to any class that has the visual_icon = 'Transmitter'; setting in its AOC file.
topoviz.image.Transmitter = transmitter.svg