Main Content

Transport layer

Description

Specify the transport protocol for communications.

Category: Code Generation > Interface

Settings

Default: tcpip

tcpip

Use a TCP/IP transport mechanism. Selecting this parameter sets parameter MEX-file name to ext_comm.

serial

Use a serial transport mechanism. Selecting this parameter sets parameter MEX-file name to ext_serial_win32_comm.

XCP on TCP/IP

Use XCP protocol with TCP/IP transport layer. Selecting this parameter sets parameter MEX-file name to ext_xcp.

XCP on Serial

Use XCP protocol with serial transport layer. Selecting this parameter sets parameter MEX-file name to ext_xcp.

customTransportLayer

Use custom transport layer.

Tips

The Configuration Parameters dialog box displays parameter MEX-file name next to Transport layer. You cannot edit the value for MEX-file name. The value is specified either in matlabroot/toolbox/simulink/simulink/extmode_transports.m for targets provided by MathWorks®, or in an sl_customization.m file for custom targets and transport mechanisms.

The command-line parameter is an index. To get the transport layer index, use these commands:

cs = getActiveConfigSet(modelName);
index = Simulink.ExtMode.Transports.getExtModeTransportIndex(cs, transportLayer);
transportLayer is one of these values:

  • 'tcpip'

  • 'serial'

  • 'XCP on TCP/IP'

  • 'XCP on Serial'

  • customTransportLayer

To select the transport layer:

set_param(cs, 'ExtModeTransport', index)

To determine the transport layer:

transportLayerName = Simulink.ExtMode.Transports.getExtModeTransport(cs, index)

Dependency

Selecting parameter External mode enables this parameter.

Command-Line Information

Parameter: ExtModeTransport
Type: integer
Value: See Tips
Default: 0

Recommended Settings

ApplicationNo impact
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Related Topics