target.XCP - Describe XCP protocol stack for target hardware - MATLAB (original) (raw)
target.XCP Class
Namespace: target
Describe XCP protocol stack for target hardware
Since R2021a
Description
Use the target.XCP
class to describe the XCP protocol stack for the target hardware.
To create a target.XCP
object, use the target.create function. Create the object and then use separate steps to specify properties. Or, using name-value arguments, create the object and specify properties in a single step.
Properties
Specify the XCP transport protocol layer through atarget.XCPTCPIPTransport
or atarget.XCPSerialTransport
object.
Attributes:
GetAccess | public |
---|---|
SetAccess | public |
Optional property to specify the XCP platform abstraction layer. If you do not specify a value, the software uses the default platform abstraction layer, which supports Linux®, Windows®, and Mac platforms.
Attributes:
GetAccess | public |
---|---|
SetAccess | public |
Examples
This code snippet from Customize Connectivity for XCP External Mode Simulations shows how you can provide a description of the XCP protocol stack for your target hardware.
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);
Note
You can create the target.XCP
object in a single step.
xcpConfiguration = target.create('XCP', ... 'Name', 'XCP TCP/IP Configuration', ... 'XCPTransportLayer', 'TCP', ... 'SourceFiles', {fullfile('pathToImplementationFolder', 'myXCPPlatform.c'}, ... 'IncludePaths', {'pathToImplementationFolder'});
Version History
Introduced in R2021a