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 コマンド ウィンドウに入力して実行してください。Web ブラウザーは 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)