Overview of shelves

A standard shelf is a rectangular frame made up of smaller rectangles (slots) placed side by side in a line. Each slot is assigned a number (slot number) that graphically identifies the slot in the shelf.
A complex shelf is a rectangular frame made up of an array of slots, each column being assigned a number (slot numbering) that graphically identifies it within the shelf.
Each slot can hold one card object. There are three different types of card object: cards, empty slots, and card carriers. Each of these types is described in this topic.
Although states and alarms can be associated with a shelf, it is not possible to display them in the shelf graphic representation. This is not necessary since shelves are only holders of shelf items. On the other hand, the states and alarms associated with shelf items can be represented graphically.
It is possible to set a label for any shelf, but it will only be visible in the logical and tiny representations. The symbolic representation does not display it.
For information on other styling capabilities available for shelves, refer to CSS properties for the representation of shelves, card carriers, cards and portsĀ .
Slots are numbered sequentially (slot numbering), starting from the initial index which is passed as an argument to the constructor ( logicalFirstIndex argument in most IltShelf constructors). By default, the slot labels display the sequential numbers, but you can customize them using cascading style sheets.
Slots in a shelf can be defined as fixed-width, where all slots have the same width, or variable-width, where each slot has its width set individually. A slot is not displayed when its width is set to zero, which breaks the sequence of the slot numbering. The width of the slots can be defined either when constructing a shelf or by invoking the shelf API (method setSlotSizes ).
For array shelves, slot columns are numbered sequentially and both the horizontal and the vertical dimensions can be defined as fixed-width or variable-width using an API similar to standard linear shelves.
Since the shelf determines the size of the slots and consequently the size of the shelf items, it is important to design it with the card objects that will be placed in the slots in mind. For example, cards which contain card items such as ports and LEDs must be placed in slots big enough to host them. In addition, even when using cards without ports and LEDs, small shelves with tiny slots tend to overlap alarm representations and labels, which is confusing for the end user.
The positioning point of a shelf is given by the PositionAttribute attribute (from class IltObject); it is based on the IlpPoint object and defines its top left corner.
The slots of a shelf are accessed through a pair of XY indices defining a column (X index) and a row (Y index). The top left slot is assigned the indices (0,0). The X index increases horizontally from left to right and the Y index increases vertically from top to bottom. For linear shelves, the Y index is handled automatically. Objects are placed on a shelf based on X and Y slot indices plus an X and Y span, which defines how much the object will expand over its neighboring slots. An X span of 2.0, for instance, determines that the object will fully occupy the slot on its right.