target.API - Describe API details - MATLAB (original) (raw)
Main Content
target.API Class
Namespace: target
Describe API details
Since R2020b
Description
An API defines a set of entry-point functions for interaction with a software application or service. Use a target.API
object to provide API details for target definition. Use this class with target.APIImplementation
to describe how an API is used and built on target hardware.
To create a target.API
object, use the target.create function.
Properties
Name of the API.
Example: timerApi.Name = 'Linux Timer API';
Attributes:
GetAccess | public |
---|---|
SetAccess | public |
Programming language of the API implementation.
Attributes:
GetAccess | public |
---|---|
SetAccess | public |
Vector of target.Function
objects that describe the set of entry-point functions that make up the API.
Attributes:
GetAccess | public |
---|---|
SetAccess | public |
Examples
This example provides implementation details for the rtiostream
C API.
apiImp = target.create('APIImplementation', 'Name', ... 'x86 rtiostream Implementation'); apiImp.API = target.create('API', 'Name', 'rtiostream'); apiImp.BuildDependencies = target.create('BuildDependencies'); apiImp.BuildDependencies.SourceFiles = ... {fullfile('$(MATLAB_ROOT)', 'toolbox', ... 'coder', 'rtiostream','src', ... 'rtiostreamtcpip', 'rtiostream_tcpip.c')}; apiImp.MainFunction = target.create('MainFunction', ... 'Name', 'TCP RtIOStream Main'); apiImp.MainFunction.Arguments = {'-blocking', '1', '-port', '0'};
Version History
Introduced in R2020b