Main Content

target.CommunicationChannel class

Package: target

Describe communication channel properties

Description

Use a target.CommunicationChannel object to describe communication channel properties for an I/O connection between two systems. You can use the object as part of a target.Connection object. target.RS232Channel, target.TCPChannel, and target.UDPChannel are examples of predefined communication channels.

Properties

expand all

Name of target.CommunicationChannel object.

Attributes:

GetAccess
public
SetAccess
public

Examples

collapse all

This code from Set Up PIL Connectivity by Using target Package shows how to specify the connection between your development computer and target hardware. In the example, the target application runs on your development computer as a separate process and uses a TCP communication channel through localhost.

connection = target.create('TargetConnection');
connection.Name = 'Host Process Connection';
connection.Target = hostTarget;
connection.CommunicationChannel = target.create('TCPChannel');
connection.CommunicationChannel.Name = 'External Process TCPCommunicationChannel';
connection.CommunicationChannel.IPAddress = 'localhost';
connection.CommunicationChannel.Port = '0';
Introduced in R2020b