Creating a template module (IDL code)
The IDL Profile includes the CCM_DDS::Typed template module that is specified in Annex A of the DDS for Lightweight CCM specification. Most users will typically use the CCM_DDS::Typed template module and will not have to create any new Template Modules in the model.
To create a template module:
1. In the Packages pane, locate the Package or Model that is to own the Template Module.
2. Right-click the Package or Model, point to New, and then click Package.
3. Right-click the Package, point to > , and then click Template Module.
4. Open the Template Module's property pages, and then click the Options tab.
5. Select the Namespace option.
6. Select the Template check box.
7. Create a formal template parameter named typename T:
a. Open the Template Module's property pages, and then click the Items tab.
b. In the Show Associated list, select Formal Template Parameters.
c. Click the
New Item button.
d. Type typename T, and then press the Enter key.
e. Select the
typename T entry, and then click the
Properties button.
f. Click the Options tab.
g. Select the Object option.
8. Create a formal template parameter named sequence<T> TSeq:
a. Open the Template Module's property pages, and then click the Items tab.
b. In the Show Associated list, select Formal Template Parameters.
c. Click the
New Item button.
d. Type sequence<T> TSeq, and then press the Enter key.
e. Select the
sequence<T> TSeq entry, and then click the
Properties button.
f. Click the Options tab.
g. Select the Object option.
9. Within the Template Module, create the required Connectors, Port Types and Interfaces.
As guidance, see the provided Typed template module that resides in the IDL Profile::IDL Elements::CCM_DDS package.