|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.codegen.kernel.CodeGeneratorHelper
ptolemy.codegen.c.kernel.CCodeGeneratorHelper
ptolemy.codegen.c.domains.modal.kernel.FSMActor
public class FSMActor
Code generator helper for FSMActor.
Red (zgang) |
Red (zgang) |
Nested Class Summary | |
---|---|
protected class |
FSMActor.PortScope
This class implements a scope, which is used to generate the parsed expressions in target language. |
static interface |
FSMActor.TransitionRetriever
A class implementing this interface implements a method to retrieve transitions of a given state. |
Nested classes/interfaces inherited from class ptolemy.codegen.kernel.CodeGeneratorHelper |
---|
CodeGeneratorHelper.Channel, CodeGeneratorHelper.VariableScope |
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj |
---|
NamedObj.ContainedObjectsIterator |
Field Summary | |
---|---|
protected FSMActor.PortScope |
_scope
The scope to generate code for guard expression, choice action and commit action. |
Fields inherited from class ptolemy.codegen.kernel.CodeGeneratorHelper |
---|
_codeGenerator, _codeStream, _eol, _INDENT1, _INDENT2, _parseTreeCodeGenerator, _portConversions, _referencedParameters |
Fields inherited from class ptolemy.kernel.util.NamedObj |
---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Constructor Summary | |
---|---|
FSMActor(FSMActor component)
Construct the code generator helper associated with the given FSMActor. |
Method Summary | |
---|---|
protected java.lang.String |
_generateFireCode()
Generate the fire code of the associated FSMActor. |
private java.lang.Object |
_generateStateConstantLabel(State state)
|
protected void |
_updateCurrentState(java.lang.StringBuffer codeBuffer,
State state)
Generate code for updating current state of this FSMActor. |
java.lang.String |
generateInitializeCode()
Generate the initialize code of the associated FSMActor. |
java.lang.String |
generatePreinitializeCode()
Generate the preinitialize code of the associated FSMActor. |
void |
generateTransitionCode(java.lang.StringBuffer code,
FSMActor.TransitionRetriever transitionRetriever)
Generate code for making transition. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected FSMActor.PortScope _scope
Constructor Detail |
---|
public FSMActor(FSMActor component)
component
- The associated component.Method Detail |
---|
protected java.lang.String _generateFireCode() throws IllegalActionException
_generateFireCode
in class CodeGeneratorHelper
IllegalActionException
- If thrown while generating
firing code.public java.lang.String generateInitializeCode() throws IllegalActionException
generateInitializeCode
in interface ComponentCodeGenerator
generateInitializeCode
in class CodeGeneratorHelper
IllegalActionException
- If initial state cannot be found,
configuration number cannot be updated or code cannot be processed.public java.lang.String generatePreinitializeCode() throws IllegalActionException
generatePreinitializeCode
in interface ActorCodeGenerator
generatePreinitializeCode
in class CodeGeneratorHelper
IllegalActionException
- If thrown when creating buffer
size and offset map or processing code.private java.lang.Object _generateStateConstantLabel(State state)
public void generateTransitionCode(java.lang.StringBuffer code, FSMActor.TransitionRetriever transitionRetriever) throws IllegalActionException
code
- The string buffer that the generated code is appended to.transitionRetriever
- An instance of a class implementing
a method.
which returns an iterator of all, preemptive or non-preemptive
transitions of the current state.
IllegalActionException
- If thrown while generating
transition code.protected void _updateCurrentState(java.lang.StringBuffer codeBuffer, State state) throws IllegalActionException
codeBuffer
- The string buffer that the generated code is
appended to.state
- The current state.
IllegalActionException
- Thrown if the corresponding code
block cannot be fetched.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |