Main Content

target.XCPPlatformAbstraction クラス

名前空間: target

ターゲット ハードウェアの XCP プラットフォーム抽象化レイヤーの指定

R2021a 以降

説明

target.XCPPlatformAbstraction クラスは、ターゲット ハードウェアのXCP プラットフォーム抽象化レイヤーの実装を指定するために使用します。レイヤーは次のものを提供します。

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

target.XCPPlatformAbstraction オブジェクトを作成しない場合、ソフトウェアで既定のプラットフォーム抽象化レイヤーが使用されます。Linux®、Windows®、および Mac の各プラットフォームがサポートされています。

プロパティ

すべて展開する

XCP プラットフォーム抽象化レイヤーの実装に必要なプリプロセッサ命令、ソース ファイル、ヘッダー ファイルを指定します。

属性:

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};

xcpTCPIPTransport = target.create('XCPTCPIPTransport', ...
                'Name', 'XCP TCPIP Transport');

xcpTCPIPConfiguration = target.create('XCP', ...
                'Name', 'XCP TCP/IP Configuration', ...
                'XCPTransport', xcpTCPIPTransport, ...
                'XCPPlatformAbstraction', xcpPlatformAbstraction);

メモ

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

xcpPlatformAbstraction = target.create('XCPPlatformAbstraction', ...
       'Name', 'XCP Platform Abstraction', ...
       'SourceFiles', {fullfile('pathToImplementationFolder', 'myXCPPlatform.c'}, ...
       'IncludePaths', {'pathToImplementationFolder'});

バージョン履歴

R2021a で導入