Main Content

La traduction de cette page n'est pas à jour. Cliquez ici pour voir la dernière version en anglais.

Interface programmatique de Stateflow

Créer et modifier des éléments de diagramme en ligne de commande MATLAB®

Créez et modifiez des diagrammes Stateflow® de manière programmatique. Ajoutez de nouveaux objets à votre diagramme, accédez aux propriétés et modifiez-les, définissez les positions, copiez-collez des objets et modifiez le taux d’agrandissement de l’éditeur Stateflow.

Fonctions

développer tout

sfnewCreate Simulink model that contains an empty Stateflow block
sfrootRacine de la hiérarchie Stateflow
sfclipboardClipboard object
sfgcoSelected objects in chart
Stateflow.findMatchingPortIdentify matching entry or exit port (depuis R2021b)

Objets

développer tout

Objets de diagramme, bloc et machine

Stateflow.ChartGraphical representation of a finite state machine
Stateflow.StateTransitionTableChartTabular representation of state machine for modal logic
Stateflow.TruthTableChartTabular representation of state machine for decision logic
Stateflow.EMChartStateflow interface to MATLAB Function block
Stateflow.MachineContainer for Stateflow blocks in a Simulink model

Objets graphiques

Stateflow.AnnotationAnnotation in chart, state, box, or function
Stateflow.AtomicBoxAtomic box in chart, state, box, or function
Stateflow.AtomicSubchartAtomic subchart in chart, state, or box
Stateflow.BoxBox in chart, state, box, or function
Stateflow.EMFunctionMATLAB function in chart, state, box, or function
Stateflow.FunctionGraphical function in chart, state, box, or function
Stateflow.JunctionConnective or history junction in chart, state, box, or function
Stateflow.PortEntry or exit port in state or atomic subchart (depuis R2021b)
Stateflow.SimulinkBasedStateSimulink based state in chart, state, or box
Stateflow.SLFunctionSimulink function in chart, state, box, or function
Stateflow.StateState in chart, state, or box
Stateflow.TransitionTransition in chart, state, box, or function
Stateflow.TruthTableTruth table function in chart, state, box, or function

Objets non graphiques

Stateflow.DataData in chart, state, box, or function
Stateflow.EventEvent in chart, state, or box
Stateflow.MessageMessage in chart, state, or box

Objets de presse-papiers et éditeur

Stateflow.ClipboardClipboard to copy and paste Stateflow objects
Stateflow.EditorGraphical aspects of a chart or state transition table

Fonctions des objets

développer tout

Parcourir la hiérarchie

findIdentify specified objects in hierarchy
getChildrenIdentify children of object
getParentIdentify parent of object
getReferencesIdentify references to symbol name
commentedByIdentify objects that implicitly comment out a graphical object
defaultTransitionsIdentify default transitions in specified object
innerTransitionsIdentify inner transitions with specified source
outerTransitionsIdentify outgoing transitions with specified source
sinkedTransitionsIdentify transitions with specified destination
sourcedTransitionsIdentify transitions with specified source

Accéder aux propriétés et les modifier

dialogOpen properties dialog box
exportAsStructExport contents of state transition table as structure array
renameReferencesRename symbol and update references to symbol name
setImageInsert image into annotation

Contrôler l’affichage

viewDisplay object in editing environment
highlightHighlight graphical object
fitToViewZoom in on graphical object
zoomInZoom in on Stateflow chart
zoomOutZoom out on Stateflow chart

Mapper les symboles dans les sous-diagrammes atomiques et les états Simulink

getMappingForSymbolGet mapping for symbol in atomic subchart, atomic box, or Simulink based state
setMappingForSymbolSet mapping for symbol in atomic subchart, atomic box, or Simulink based state
clearMappingForSymbolClear mapping for symbol in atomic subchart, atomic box, or Simulink based state
disableMappingForSymbolDisable input event in atomic subchart or box

Copier-coller des objets

copyCopy array of objects to clipboard
pasteToPaste objects in clipboard to specified container object

Convertir des diagrammes et des tables de transition d’état

convertToChartConvert state transition table to Stateflow chart
convertToSTTConvert Stateflow chart to state transition table

Rubriques