Stateflow User's Guide Previous page   Next Page

Data Properties

Stateflow API objects of type Data have the properties listed in the table below. See also Data Methods.

Property
Type
Access
Description
DataType
Enum
RW
Data type of this data. Can be 'double' (default), 'single', 'int32', 'int16', 'int8', 'uint32', 'uint16', 'uint8', 'boolean', 'fixpt', or 'ml'.
Equivalent to an entry in the Type column for this data in Explorer or the Type field in the properties dialog for this data.
Debug.
Watch
Boolean
RW
If set to true (default = false), causes the debugger to halt execution if this data is modified. Setting this property to true is equivalent to selecting the Watch column entry for this data in the Explorer or selecting the Watch in debug check box in the properties dialog for this data.
Description
String
RW
Description of this data (default = ''). Equivalent to entering a description in the Description field of the properties dialog for this data.
Document
String
RW
Document link to this data (default = ''). Equivalent to entering the Document Link field of the properties dialog for this data.
FixptType.
BaseType
Enum
RW
The size and sign of the base integer type for the quantized integer, Q, representing this fixed-point type. Can be 'int32', 'int16', 'int8', 'uint32', 'uint16', or 'uint8' (default).
FixptType.Bias
Double
RW
The Bias value for this fixed-point type (default = 0).
FixptType.Lock
Boolean
RW
If set to true (default = false), base type, bias, fractional slope and radix point of the fixed point type for this data is locked from autoscaling. Equivalent to selecting Lock output scaling against changes by the autoscaling tool in the Data properties dialog.
FixptType.
FractionalSlope
Double
RW
The Fractional Slope value for this fixed-point type (default = 1).
FixptType.
RadixPoint
Integer
RW
The power of 2 specifying the binary-point location for this fixed-point type (default = 0).
Id
Integer
RO
Unique identifier assigned to this data to distinguish it from other objects loaded in memory.
InheritDataSize
Boolean
RW
If set to true (default = false), this data inherits its size from the data input or output it is connected to.
InheritDataType
Boolean
RW
If set to true (default = false), this data inherits its type from the data input or output it is connected to.
InitFromWorkspace
Boolean
RW
If set to true (default = false), this data is initialized from the MATLAB workspace. Setting this property to true is equivalent to selecting the FrWS column entry for this data in the Explorer or setting the Initialize from field to workspace in the properties dialog for this data.
IsComplex
Boolean
RW
If set to true (default = false), this data is complex. (Not yet implemented in Stateflow).
IsTestPoint
Boolean
RW
If set to true (default = false), sets this data or state as a Stateflow test point. You can monitor individual Stateflow test points with a floating scope during model simulation. You can also log test point values into MATLAB workspace objects. See Monitoring Stateflow Test Points in the Stateflow and Stateflow Coder User's Guide documentation for details.
Machine
Machine
RO
Machine that contains this data.
Name
String
RW
Name of this data (default = 'datan', where n is a counter of data with the name root data). Equivalent to entering the name of this data in the Name field of its properties dialog. Also can be named (renamed) in the Explorer by double-clicking the entry in the Name column for this data and editing.
OutputState
State
RO
State whose activity this data represents as an output. Create the data for this state through the State method outputData. Equivalent to selecting Output State Activity property for this state.
ParsedInfo.
Array.
Size
Integer
RO
Numeric equivalent of Data property Props.Array.Size, a String (default = []).
ParsedInfo.
Array.
FirstIndex
Integer
RO
Numeric equivalent of Data property Props.Range.FirstIndex, a String (default = 0).
ParsedInfo.
InitialValue
Double
RO
Numeric equivalent of Data property Props.InitialValue, a String (default = 0).
ParsedInfo.
Range.
Maximum
Double
RO
Numeric equivalent of Data property Props.Range.Maximum, a String (default = inf).
ParsedInfo.
Range.
Minimum
Double
RO
Numeric equivalent of Data property Props.Range.Minimum, a String (default = -inf).
Port
Integer
RO
Port index number for this data (default = 1).
Props.
Array.
Size
String
RW
Specifying a positive value for this property specifies that this data is an array of this size (default = 0). Equivalent to entering a positive value in the Size column for this data in the Explorer or in the Sizes field of the properties dialog for this data.
Props.
Array.
FirstIndex
String
RW
Index of the first element of this data (default = 0) if it is an array (that is, Props.Array.Size > 1). Equivalent to entering a value of zero or greater in the First Index field of the properties dialog for this data.
Props.
InitialValue
String
RW
If the source of the initial value for this data is the Stateflow data dictionary, this is the value used (default = 0). Equivalent to entering this value in the InitVal column for this data in the Explorer or similar field in the properties dialog for this data.
Props.
Range.
Maximum
String
RW
Maximum value (default = '') that this data can have during execution or simulation of the state machine. Equivalent to entering value in the Max column for this data in Explorer or the Max field in the properties dialog for this data.
Props.
Range.
Minimum
String
RW
Minimum value (default = '') that this data can have during execution or simulation of the state machine. Equivalent to entering a value in the Min column for this data in Explorer or the Min field in the properties dialog for this data.
SaveToWorkspace
Boolean
RW
If set to true (default = false), this data is saved to the MATLAB workspace. Setting this property to true is equivalent to selecting the ToWS column entry for this data in the Explorer or selecting the Save final value to base workspace field in the properties dialog for this data.
Scope
Enum
RW
Scope of this data. Allowed values vary with object type. Equivalent to selecting the value shown in the Scope field of the Data properties dialog.

The following apply to any data object:
  • 'Local'
  • 'Constant'
The following apply to data for machines only:
  • 'Imported'
  • 'Exported'
The following apply to data for charts only:
  • 'Input' (Input to Simulink)
  • 'Output' (Output to Simulink)
The following applies only to data for functions:
  • 'Temporary'
  • 'Function input'
  • 'Function output'
Tag
Any Type
RW
Holds data of any type for this Data object (default = []).
Units
String
RW
Physical units corresponding to the value of this data object (default = '').


Previous page  Junction Methods Data Methods Next page

© 1994-2005 The MathWorks, Inc.