Main Content

target.XCP クラス

名前空間: target

ターゲット ハードウェアの XCP プロトコル スタックの記述

R2021a 以降

説明

target.XCP クラスは、ターゲット ハードウェアの XCP プロトコル スタックを記述するために使用します。

target.XCP オブジェクトの作成には関数 target.create を使用します。オブジェクトを作成してから、別のステップを使用してプロパティを指定します。または、名前と値の引数を使用して、オブジェクトの作成とプロパティの指定を単一のステップで行います。

プロパティ

すべて展開する

XCP トランスポート プロトコル層を target.XCPTCPIPTransport オブジェクトまたは target.XCPSerialTransport オブジェクトを通じて指定します。

属性:

GetAccess
public
SetAccess
public

XCP プラットフォーム抽象化レイヤーを指定するオプションのプロパティ。値を指定しない場合、ソフトウェアで既定のプラットフォーム抽象化レイヤーが使用されます。Linux®、Windows®、および Mac の各プラットフォームがサポートされています。

属性:

GetAccess
public
SetAccess
public

すべて折りたたむ

XCP エクスターナル モード シミュレーションの接続性のカスタマイズから抜粋した以下のコードは、ターゲット ハードウェアの XCP プロトコル スタックについて記述するための方法を示しています。

xcpPlatformAbstraction = target.create('XCPPlatformAbstraction', ...
                'Name', 'XCP Platform Abstraction');

customPlatformAbstractionPath = 'pathToImplementationFolder';
xcpPlatformAbstraction.BuildDependencies.SourceFiles = ...
                {fullfile(customPlatformAbstractionPath, 'myXCPPlatform.c')};
xcpPlatformAbstraction.BuildDependencies.IncludePaths = ...
                {customPlatformAbstractionPath};

xcpTransport = target.create('XCPTCPIPTransport', ...
                'Name', 'XCP Transport');
xcpConfiguration = target.create('XCP', ...
                'Name', 'XCP Configuration', ...
                'XCPTransport', xcpTransport, ...
                'XCPPlatformAbstraction', xcpPlatformAbstraction);

メモ

target.XCP オブジェクトは単一のステップで作成できます。

xcpConfiguration = target.create('XCP', ...
       'Name', 'XCP TCP/IP Configuration', ...
       'XCPTransportLayer', 'TCP', ...
       'SourceFiles', {fullfile('pathToImplementationFolder', 'myXCPPlatform.c'}, ...
       'IncludePaths', {'pathToImplementationFolder'});

バージョン履歴

R2021a で導入