| Stateflow User's Guide | ![]() |
Stateflow API objects of type Target have the properties listed in the table below. See also Target Methods.
| Property |
Type |
Access |
Description |
ApplyToAllLibs |
Boolean |
RW |
If set to true (default), use settings in this target for all libraries. Equivalent to selecting the Use settings for all libraries check box in this target's Target Builder dialog. |
CodeFlagsInfo |
Array |
RO |
A MATLAB vector of structures containing information on the code flag settings for this target. See special topic CodeFlagsInfo Property of Targets for more information. |
CodegenDirectory |
String |
RW |
Directory to receive generated code (default = ''). Equivalent to the entry in the Generated Code Directory panel of the Target Options dialog for this target. Applies only to targets other than sfun and rtw targets. |
CustomCode |
String |
RW |
Custom code included at the top of the generated code (default = ''). Equivalent to the entry in the Include Code panel of the Target Options dialog for this target. |
CustomInitializer |
String |
RW |
Custom initialization code (default = ''). Equivalent to the entry in the Initialization Code panel of the Target Options dialog for this target. Applies only to sfun and rtw targets. |
CustomTerminator |
String |
RW |
Custom termination code (default = ''). Equivalent to the entry in the Termination Code panel of the Target Options dialog for this target. Applies only to sfun and rtw targets. |
Description |
String |
RW |
Description of this target (default = ''). Equivalent to entering a description in the Description field of the properties dialog for this target. |
Document |
String |
RW |
Document link to this target (default = ''). Equivalent to entering the Document Link field of the properties dialog for this target. |
Id |
Integer |
RO |
Unique identifier assigned to this Target object to distinguish it from other objects loaded in memory. |
Machine |
Machine |
RO |
Stateflow machine containing this target. |
Name |
String |
RW |
Name of this target (default = 'untitled'). Equivalent to naming or renaming this target in the Explorer. |
| ReservedNames |
String |
RW |
Comma- or space-separated list of names to not use in Stateflow generated code. Equivalent to the entry in the Reserved Names panel of the Target Options dialog. |
| Tag |
Any Type |
RW |
Holds data of any type (default = []) for this target. |
UserIncludeDirs |
String |
RW |
Custom include directory paths (default = ''). Equivalent to the entry in the Include Paths panel of the Target Options dialog for this target. |
UserLibraries |
String |
RW |
Custom libraries (default = ''). Equivalent to the entry in the Libraries panel of the Target Options dialog for this target. |
UserSources |
String |
RW |
Custom source files (default = ''). Equivalent to the entry in the Source Files panel of the Target Options dialog for this target. |
CodeFlagsInfo Property of Targets
The CodeFlagsInfo property of a Target object is a read-only MATLAB vector of structures containing information on the code flag settings for its target. Each element in the vector has the following MATLAB structure of information about a particular code flag:
The first element of each structure is a shorthand name for the individual flag that you set in the Coder Options dialog. For example, the name 'comments' actually refers to the dialog setting Comments in generated code. While the CodeFlagsInfo property is informational only, you can use these shorthand flag names in the methods getCodeFlag and setCodeFlag to access and change the values of a flag.
The names of each of the possible code flags in the CodeFlagsInfo property along with the name of the flag as it appears in the Coder Options dialog for the target are as follows:
For detailed descriptions of each of the preceding code flags, see Configuring a Custom Target in Stateflow in the Stateflow and Stateflow Coder User's Guide documentation.
| Event Methods | Target Methods | ![]() |
© 1994-2005 The MathWorks, Inc.