Template:— representing_count (rep_count) Date: 2008/01/17 10:56:33
Revision: 1.24

This section specifies the template representing_count.

NOTE  An explanation of a template and the associated instantiation path is provided in the Template overview section.

Description

This template describes how to represent a count of items.

EXAMPLE    The number of spark plugs.

Model diagrams
The EXPRESS-G diagram in Figure 1 shows the templates and EXPRESS entities that are required to represent the template "representing_count". The text highlighted in blue shows the template parameters.


Figure 1 —  An EXPRESS-G representation of the Information model for representing_count

Figure 1 —  An EXPRESS-G representation of the Information model for representing_count

The graphic for the template to be used in other EXPRESS-G diagrams is shown in Figure  2 below.


Figure 2 —  
                     The graphical representation of representing_count template

Figure 2 —   The graphical representation of representing_count template

Input parameters
The following input parameters are defined for this template:
value (Default=1,Type= 'TYPE (any_number_value)' )
The value of the quantity. Default value is 1. The datatype is always 'any_number_value' and should not be registered together with the value, i.e. enter the value as a number, without datatype.
Reference parameters
The following reference parameters are defined for this template:
count(Type='ENTITY (Value_with_unit)')
Allow the Value_with_unit entity instantiated in this path to be referenced when this template is used.
Note: The Value_with_unit entity can be referenced in a template path by:
%^target = $representing_count.count%
where target is the parameter to which the Value_with_unit is bound.
unit(Type='ENTITY (Unit)')
Allow the Unit entity instantiated in this path to be referenced when this template is used.
Note: The Unit entity can be referenced in a template path by:
%^target = $representing_count.unit%
where target is the parameter to which the Unit is bound.
Uniqueness constraints

The following parameter combinations specify a uniqueness constraint:
Unique constraint: Unique Count unit
There shall be at most one instance of the entity (Unit) within the data set uniquely identified by the parameter values set on the following templates instantiated by representing_count namely: template #1 assigning_reference_data(class_name=Count, ecl_id=urn:plcs:std:rdl).
The instance is referenced by the following template parameter: unit.
Instantiation path
The instantiation path shown below specifies the entities that are to be instantiated by the template.
A description of templates and the syntax for the instantiation path is provided in the Reading Capability Templates help section.
-- Instantiate Value_with_unit entity
Value_with_unit

-- Set the Value_with_unit attributes
Value_with_unit.value_component -> @value

-- Instantiate Unit and point at it
Value_with_unit.unit -> Unit

-- Set the Unit attributes
Unit.si_unit = 'false'
Unit.name = '/IGNORE'

-- Bind the Value_with_unit to the parameter ^count.
-- The parameter is a reference parameter so the Value_with_unit
-- entity can be referred to when this template is used.
%^count = Value_with_unit%

-- Bind the Unit to the parameter ^unit.
-- The parameter is a reference parameter so the Unitt
-- entity can be referred to when this template is used.
%^unit = Unit%

-- Assign reference data for name of Unit
/assigning_reference_data(
    items=Unit,
    class_name='Count',
    ecl_id='urn:plcs:rdl:std')/
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Unit.si_unit 'false'
Unit.name '/IGNORE'
Instance diagrams
The instance diagram in Figure  3 shows an example of the EXPRESS entities and templates that are instantiated by the template:
/representing_count(value='ANY_NUMBER_VALUE(5)')/
(an illustration of the consolidated representing_count template is shown in Figure 4 below.)


Figure 3 —  Entities instantiated by representing_count template

Figure 3 —  Entities instantiated by representing_count template

The instance diagram in Figure 4 shows the graphic symbol for the template that is to be used in other instance diagrams. The example template is:
/representing_count(value='ANY_NUMBER_VALUE(5)')/


Figure 4 —  Instantiation of representing_count template

Figure 4 —  Instantiation of representing_count template

Characterizations
No common characterizations of the template representing_count have been identified. However, the ISO 10303-239 EXPRESS model may enable other assignments to the entities instantiated by the template.

© OASIS 2008 — All rights reserved