Some composite examples

A few simple examples of composites are included here, as follows:

Point-level composite

Figure 118 shows a proxy NumericPoint representing a space temperature value that has two extensions:

  • an alarm extension (OutOfRangeAlarmExt)

  • a history extension (NumericInterval)

Figure 118. Property sheet of proxy point with two extensions


Property sheet of proxy point with two extensions


In this example, when another system-related BooleanWritable (representing the system fan) has a false (Off) status, it is desired that this temperature point be:

  • disabled from alarming, and

  • disabled from continued history collection

To achieve these “disable” functions, you must link the controlling source fan out to a slot of each extension (visible in point’s wire sheet view, but not in the parent wire sheet for the point itself). Furthermore, other kitControl objects needed. Without making a composite, the necessary objects and links may appear as shown in Figure 119.

Figure 119. Proxy point example without composite


Proxy point example without composite


Notice that when looking at the proxy NumericPoint in the wire sheet of its parent folder, it is not apparent that this point has linked extensions.

By making a composite of the NumericPoint (acting as the container for both the extensions plus the additional kitControl objects) you can simplify reuse and clarify available links. Figure 120 shows the now-composited NumericWritable linked to the controlling BooleanWritable, and the wire sheet view of the NumericWritable that contains the needed kitControl objects.

Figure 120. Proxy point as composited container


Proxy point as composited container


In this example, the exposed input slots in the composite were renamed from “In” to “almInhib” and “histStop” respectively, to clarify what each does. When looking at the Composite Editor for this example NumericPoint, it appears as shown in Figure 121.

Figure 121. Composite Editor for example NumericPoint


Composite Editor for example NumericPoint


Folder-level composite

NotePlease see the related Caution.

Figure 122 shows a simple example of three Math objects chained together, located in a “LogicA” folder. Together, they perform a “Celsius to Fahrenheit” conversion. A NumericWritable is also shown linked to the first Math object to test.

Figure 122. Simple example of folder before compositing


Simple example of folder before compositing


If this application was needed later, you could copy all 3 linked objects again and insert in another (perhaps already crowded) wire sheet. However, the middle “Multiply” object reveals an intermediary result that is distracting. Or, you could just create a new subfolder with only the 3 linked objects and then link directly to the child objects as needed (however, it would not be obvious from the parent’s wire sheet that links to children in that folder were established).

It would be better to “encapsulate” this into a single object with only a single “input” (degrees F) and single “output” (degrees C). You can do something like this by compositing the parent container, in this example folder “FolderA.”

In this case, you would want to delete the link from the test NumericWritable first, then open the Composite Editor for the parent component FolderA (Figure 123). The Composite Editor lets you expand the tree of all contained components and “expose” those items of interest.

Figure 123. Launching and using the Composite Editor


Launching and using the Composite Editor


In this example, only the “In A” of the first math object and the “Out” of the third math object is selected to be exposed. The Composite Editor provides a tree pane showing slots of points and objects (by clicking the expand controls), and a slot is exposed by simply double-clicking it. Other controls in the editor are available to rename, remove, reorder and reverse exposed items, but are not used here. (For more details, see Making a composite.)

After clicking OK to perform the composite, the item composited (in this example, “LogicA”) shows exposed slots when viewed in its parent’s wire sheet. Figure 124 shows the test NumericWritable now linked to the composited LogicA folder.

Figure 124. Example LogicA folder showing exposed input and output


Example LogicA folder showing exposed input and output


You could later reopen this folder’s Composite Editor and rename the exposed properties differently, perhaps “inDegF” and “outDegC” (to make the purpose of the composited folder clearer). This would not affect the three (child) math objects in any way.