addDWorkArg
Add DWork argument for semaphore entry in code replacement table
Syntax
Description
Examples
Add a DWork Argument
This example shows how to use the
addDWorkArg
function to add a DWork argument named
d1
to the arguments for a semaphore entry in a code
replacement table.
hLib = RTW.TflTable; % specify semaphore init function. hEnt = RTW.TflCSemaphoreEntry; hEnt.setTflCSemaphoreEntryParameters( ... 'Key', 'RTW_SEM_INIT', ... 'Priority', 30, ... 'ImplementationName', 'mySemCreate', ... 'ImplementationHeaderFile', 'mySem.h', ... 'ImplementationSourceFile', 'mySem.c', ... 'ImplementationHeaderPath', LibPath, ... 'ImplementationSourcePath', LibPath, ... 'GenCallback', 'RTW.copyFileToBuildDir', ... 'SideEffects', true); % specify conceptual operands and result arg = hLib.getTflArgFromString('y1', 'void'); arg.IOType = 'RTW_IO_OUTPUT'; hEnt.addConceptualArg(arg); arg = hLib.getTflArgFromString('u1', 'void'); hEnt.addConceptualArg(arg); % specify replacement function signature arg=hLib.getTflArgFromString('y1','void'); hEnt.Implementation.setReturn(arg); arg.IOType = 'RTW_IO_OUTPUT'; % DWork Arg arg = hLib.getTflDWorkFromString('d1','void*'); hEnt.addDWorkArg(arg); addEntry(hLib, hEnt);
Input Arguments
hEntry
— Handle to a code replacement table entry
handle
The hEntry
is a handle to a code replacement
table entry previously returned by instantiating a code replacement
semaphore table entry class, using
.hEntry
=
RTW.TflCSemaphoreEntry
Example: sem_entry
arg
— Argument added to the arguments for the table entry
character vector | string scalar
Argument, such as returned by
, added to the
arguments for the code replacement table entry.arg
=
getTflDWorkFromString(name
,
datatype
)
Example: 'hLib.getTflDWorkFromString('d1','void*')'
Version History
Introduced in R2011b
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)