Customizing Code Generation

The code generation allows some customization for transport configuration.

Model Customization tab

Customization Instances

The customization includes a series of instances, which represent potential deployment scenarios for the underlying application.

For example, one instance can be specified representing a TCP deployment, while a second instance represents a multicast deployment.

Instance Transport Offset

In the case of multiple instances, the generated code allows for all of the transport configurations to be instantiated. The transport IDs within an instance all match those from the underlying model, but the generated code still must have a unique ID.

To accomplish this, the generated ID is the instance transport ID added to the instance transport offset to create a unique ID. In this way, multiple transport configurations can be generated from a single model.

Customization Transports

Each transport needs a child transport configuration. To do this use the context menu to add a child TCP, multicast, or UDP transport.

Customizing a Transport

Each transport can be further customized through its context menu, again through the add Child menu.

Default Customization Content

By default, when a codegen file is created, the editor finds a list of transport IDs from the .opendds model file selected. It creates an instance named default with offset of 0 \ and an empty transport with each of the IDs referenced in the model file.

At a minimum, specific configurations should be added to these generic transports in order to select the correct transport type.