target.CommunicationInterface Class
Namespace: target
Description
Use the target.CommunicationInterface
class to describe data transfer
for your target hardware. Associate the communication channel for data transfer and the device
driver API implementation with a target.CommunicationInterface
object.
Properties
Name
— target.CommunicationInterface
object name
character vector | string
Name of target.CommunicationInterface
object.
Attributes:
GetAccess | public |
SetAccess | public |
Channel
— Communication channel
character vector | string
Type of communication channel that connects to the target hardware. For example, if
you define PIL connectivity by using a target.TargetConnection
over a
target.RS232Channel
, set this property to
'RS232Channel'
.
Attributes:
GetAccess | public |
SetAccess | public |
APIImplementations
— Device driver API implementations for communication interface
target.APIImplementations
object array
Details of the API implementations that use the communication interface channel to
support data transfer to and from the target hardware. For example, an
rtiostream
API implementation for PIL connectivity.
Attributes:
GetAccess | public |
SetAccess | public |
Examples
Communication Interface for Target Hardware
Create the communication interface for the target hardware. This code snippet from Set Up PIL Connectivity by Using Target Framework shows how to create the interface.
comms = target.create('CommunicationInterface'); comms.Name = 'Linux TCP Interface'; comms.Channel = 'TCPChannel'; comms.APIImplementations = target.create('APIImplementation', ... 'Name', 'x86 rtiostream Implementation'); comms.APIImplementations.API = target.create('API', 'Name', 'rtiostream'); comms.APIImplementations.BuildDependencies = target.create('BuildDependencies'); comms.APIImplementations.BuildDependencies.SourceFiles = ... {fullfile('$(MATLABROOT)', ... 'toolbox', ... 'coder', ... 'rtiostream', ... 'src', ... 'rtiostreamtcpip', ... 'rtiostream_tcpip.c')}; comms.APIImplementations.MainFunction = target.create('MainFunction', ... 'Name', 'TCP RtIOStream Main'); comms.APIImplementations.MainFunction.Arguments = {'-blocking', '1', '-port', '0'}; hostTarget.CommunicationInterfaces = comms;
Version History
Introduced in R2020b
Comando de MATLAB
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)