Composite Data Group
The composite data group is a special kind of data group that enables you to combine any data group element(s) from any data group(s) as long as they are in the same template as the composite data group. The composite data group is made up of a combination of support data group references and data group element references to those support data groups. Multiple composite data groups can be created in a single device template file. At this time, the composite data group can only receive data; it cannot send data.
The composite data group does not appear in a remote device editor unless it has been defined in the applicable device template file. Create this data group when first writing a device template file, or add or edit it later. The complexity of a defined composite data group depends on your needs and understanding of device template files.
For more information, see the following subsections:
For more information about working with device template files, see Device Template Files.
Example
|
<!-- The following example shows the basic structure and components of a composite data group. Notice that alternate ways of defining composite data group elements (dgElements) are provided. The topmost composite data group element, Gravity, references the data group element ID (DEID) Grav inside of SupportDG1. However, the composite data group element DP uses two child elements to reference two possible data sources. (This is useful when a single template supports different remote device configurations and a similar data source varies between the configurations.) Both use the element source to define their relationship with DP. The first child element references the source data group SupportDG2, but it does not specify the relevant DEID in line. This is because the name DP is the name of the relevant DEID in SupportDG2, so the child element inherits the DEID from its parent. The second child element references the source data group SupportDG3, but it specifies the relevant source DEID (R1PrPt) in line. This is because the name DP is not the name of the relevant DEID in SupportDG3; no inheritance occurs. --> <MyComp niceName="My Composite Data Group" dgCat="composite" canSend="false" dgProtocol="Internal"> <supportDg> <SupportDG1 required="true"/> <SupportDG2 required="false"/> <SupportDG3 required="false"/> </supportDg> <dgElements secLev="4" type="ui2"> <Gravity desc="Gravity" type="vrnt" sourceDg="SupportDG1" sourceDeid="Grav"/> <DP desc="Differential Pressure" type="vrnt" units="psi" fromSupportDg="true"> <source sourceDg="SupportDG2"/> <source sourceDg="SupportDG3" sourceDeid="R1PrPt"/> </DP> </dgElements> <uccRecvParms> <!--uccRecvParms only required if a support data group has associated receive parameters--> <RecParmName desc="Receive Parameter" required="true"/> </uccRecvParms> </MyComp> … <SupportDG1> <dgElements> <Grav/> </dgElements> </SupportDG1> … <SupportDG2> <dgElements> <DP/> </dgElements> </SupportDG2> … <SupportDG3> <dgElements> <R1PrPt/> </dgElements> </SupportDG3> |
To Create a Composite Data Group
- Using a text editor or XML editor, open the device template file to which you want to add one or more composite data groups.
- Define a new data group that uses the dgCat attribute value composite. Doing so defines this data group as a composite data group.
- Define a supportDg element in the composite data group.
- Define all support data groups from which you require data.
- Define a dgElements element in the composite data group.
- Define all data group elements required by you to make up your composite data group. These elements must include relevant references to data group elements from the support data groups defined in the supportDg element. Composite data group elements can be defined in various formats.
- Optional: Define a uccRecvParms element in the composite data group.
- Optional: Define one or more RecParmName elements.
- Define any other required composite data groups.
- Validate and load your template.


