Styling > Customizing Object States > Customizing the OSI State System

The OSI state dictionary is based on the OSI SMF 10164-2 standard, which defines the primary state of a telecom object as a combination of three values, and also introduces a number of statuses. JViews TGO provides a visual representation of OSI states by using the object base to represent the primary state information, and secondary state icons to represent OSI statuses. Please refer to The OSI State Dictionary in the Business Objects and Data Sources documentation for information on the OSI state system and its graphic representation.

OSI explains how to customize the object representation according to the OSI state information. You can also customize the icons that are displayed when a given OSI status is set in the object.

Whether or not a given status applies to an object depends on whether the object is Out Of Service, In Service and Carrying Traffic, or In Service and Carrying No Traffic.

The OSI states corresponding to those statuses are the following:

You can customize the icon used to represent a status by setting the image associated with the secondary state and the primary state combination, as follows:

How to Customize an OSI Status Icon (using the API)
Image img = IltSystem.GetDefaultContext().getImageRepository().getImage("logfull.png");
IltSettings.SetValue("OSI.Availability.LogFull.OOS.Icon", img);
IltSettings.SetValue("OSI.Availability.LogFull.NT.Icon", img);
IltSettings.SetValue("OSI.Availability.LogFull.CT.Icon", img);

In this example, the graphic representation of status IltOSI.Availability.LogFull has been replaced in all valid primary state combinations.

You can also set different images to different primary state combinations by using the state name, for example, "OSI.Availability.LogFull" or "OSI.Procedural.Initializing", followed by the primary state combination (OOS, NT or CT) and the property name (Icon). For example:

IltSettings.SetValue("OSI.Availability.LogFull.OOS.Icon", img);

or

IltSettings.SetValue("OSI.Procedural.Initializing.NT.Icon", img);
How to Customize an OSI Status Icon (using CSS)

You can also customize an OSI status icon by using global CSS settings (see Using Global Settings in Chapter 2, Using Cascading Style Sheets for more information):

You must specify the full state name, for example "OSI.Availability.LogFull", when matching the "name" attribute. The CSS properties to be customized are ctIcon, ntIcon, oosIcon.

setting."ilog.tgo.model.IltState"[name="OSI.Availability.LogFull"] {
   ctIcon: '@|image("logfull.png")';
   ntIcon: '@|image("logfull.png")';
   oosIcon: '@|image("logfull.png")';
}