addDWorkArg
Add DWork argument for 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, by using
, or a block replacement entry class, by
using hEntry
=
RTW.TflCSemaphoreEntry
.hEntry
=
RTW.TflBlockEntry
Example: sem_entry
arg
— Argument added to the arguments for the table entry
character vector | string scalar
Argument, such as returned by
or
arg
=
getTflDWorkFromString(name
,
datatype
)createDWorkArg
, added to the arguments for the code
replacement table entry.
Example: 'hLib.getTflDWorkFromString('d1','void*')'
Example: 'createDWorkArg(blockEntry,'Pointer','Name','crlDWorkArg)'
Version History
Introduced in R2011b
Comando de MATLAB
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de 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)