target.XCPExternalModeConnectivity - Represent connectivity options in external mode protocol stack - MATLAB (original) (raw)
Namespace: target
Represent connectivity options in external mode protocol stack
Since R2021a
Description
Use the target.XCPExternalModeConnectivity
class, which is derived fromtarget.ExternalModeConnectivity
, to represent XCP connectivity options in the external mode protocol stack.
To create a target.XCPExternalModeConnectivity
object, use thetarget.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 XCP protocol stack for target hardware.
Examples
This code snippet from Customize Connectivity for XCP External Mode Simulations shows how to specify the external mode protocol stack for your target hardware.
xcpPlatformAbstraction = target.create('XCPPlatformAbstraction', ... 'Name', 'XCP Platform Abstraction');
xcpPlatformAbstraction.BuildDependencies.Defines = {'XCP_CUSTOM_PLATFORM'}; 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);
extModeTCPConnectivity = ...
target.create('XCPExternalModeConnectivity', ...
'Name', 'External Mode TCP Connectivity', ...
'XCP', xcpConfiguration);
externalMode = target.create('ExternalMode', ... 'Name', 'External Mode', ... 'Connectivities', extModeTCPConnectivity);
board.CommunicationProtocolStacks = externalMode;
Note
You can create the target.XCPExternalModeConnectivity
object in a single step.
extModeTCPConnectivity = target.create('XCPExternalModeConnectivity', ... 'Name', 'External Mode TCP Connectivity', ... 'XCPTransportLayer', 'TCP', ... 'Defines', {'XCP_CUSTOM_PLATFORM'}, ... 'SourceFiles', {fullfile('pathToImplementationFolder', 'myXCPPlatform.c'}, ... 'IncludePaths', {'pathToImplementationFolder'});
Version History
Introduced in R2021a