target.CommunicationInterface クラス
パッケージ: target
説明
target.CommunicationInterface
クラスを使用して、ターゲット ハードウェアのデータ転送について記述します。データ転送用の通信チャネルおよびデバイス ドライバーの API 実装を target.CommunicationInterface
オブジェクトと関連付けます。
プロパティ
Name
— target.CommunicationInterface
オブジェクト名
文字ベクトル | string
target.CommunicationInterface
オブジェクトの名前。
属性:
GetAccess | public |
SetAccess | public |
Channel
— 通信チャネル
文字ベクトル | string
ターゲット ハードウェアに接続する通信チャネルのタイプ。たとえば、target.RS232Channel
を介した target.TargetConnection
を使用して PIL 接続を定義する場合、このプロパティを 'RS232Channel'
に設定します。
属性:
GetAccess | public |
SetAccess | public |
APIImplementations
— 通信インターフェイスのデバイス ドライバーの API 実装
target.APIImplementations
オブジェクト配列
通信インターフェイス チャネルを使用してターゲット ハードウェアとのデータ転送をサポートする API 実装の詳細。たとえば、PIL 接続性のための rtiostream
API 実装。
属性:
GetAccess | public |
SetAccess | public |
例
ターゲット ハードウェアの通信インターフェイス
ターゲット ハードウェアの通信インターフェイスを作成します。Set Up PIL Connectivity by Using target Packageから抜粋した以下のコードは、インターフェイスの作成方法を示しています。
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;
バージョン履歴
R2020b で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは 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)