public class PtidyOSCodeGenerator extends CCodeGenerator
NamedObj.ContainedObjectsIterator| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
fileExtension
The index of the list of code files to generate code for. 0 refers
to the c file, and 1 refers to the startup .S code file.
|
generateCpp_compileCommandDefault, _includes, _libraries, compile, compileCommand, generateEmbeddedCode_modifiedVariables, _newTypesUsed, _portTypeMap, _portTypeMap2, _portTypeMap3, _portTypeMaxIndex, _portTypeMaxIndex2, _portTypeMaxIndex3, _primitiveTypes, _runCommandDefault, _tokenFuncUsed, _typeFuncUsed, _variablesAsArrays, generateComment, inline, maximumLinesPerBlock, measureTime, sourceLineBinding, useMake, variablesAsArrays, verbosity_substituteMap, run, runCommand_codeFileName, _eol, _executeCommands, _generateInSubdirectory, _model, _sanitizedModelName, codeDirectory, generateInSubdirectory, generatorPackage, generatorPackageList, INDENT1, INDENT2, INDENT3, overwriteFiles_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS| Constructor and Description |
|---|
PtidyOSCodeGenerator(NamedObj container,
java.lang.String name)
Create a new instance of the PtidyOS code generator.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
_generateAdditionalCodeFiles()
Generate code for the assembly file.
|
protected java.lang.String |
_generateIncludeFiles()
Generate include files.
|
protected java.lang.String |
_getOutputFilename()
Return the name of the output file.
|
protected boolean |
_isTopLevel()
Overwrite the base class, and use a method from the Ptides director
to determine whether this is top level.
|
int |
generateCode(java.lang.StringBuffer code)
Generate code.
|
java.lang.String |
generateTypeConvertCode()
Generate type conversion code.
|
_addActorIncludeDirectories, _addActorLibraries, _analyzeTypeConversions, _finalPassOverCode, _generateAndWriteActorCode, _generateAndWriteCompositeActorCode, _generateBodyCode, _generateCode, _generateConstructorCode, _generateConstructorCode, _generateDeclareSharedCode, _generateIncludeFiles, _generatePortsAccessorsCode, _generatePortsAccessorsCode, _generatePortsAccessorsDeclaration, _generatePortsAccessorsDeclaration, _getFireFunctionArguments, _printExecutionTime, _recordStartTime, _templateParserClass, _writeMakefile, clone, generateClosingEntryCode, generateClosingExitCode, generateConstantDefinition, generateFireFunctionMethodName, generateFunctionTable, generateInitializeEntryCode, generateInitializeExitCode, generateInitializeProcedureName, generateLineInfo, generateMainEntryCode, generateMainExitCode, generatePostfireEntryCode, generatePostfireExitCode, generatePostfireProcedureName, generateTypeConvertCodeCandH, generateVariableDeclaration, generateVariableInitialization, generateWrapupEntryCode, generateWrapupExitCode, generateWrapupProcedureName, getModelName, invokeGenerateUpdatePortOffsets, markFunctionCalled, splitLongBody_concatenateElements, _executeCommands, _reset, addInclude, addLibrary, addLibraryIfNecessary_addActorIncludeDirectories, _addActorLibraries, _codeDirectoryAsFile, _formatComment, _generatePreinitializeCode, _generatePreinitializeMethodBodyCode, _generatePreinitializeMethodEntryCode, _generatePreinitializeMethodExitCode, _generatePreinitializeMethodProcedureName, _generateSharedCode, _instantiateAdapter, _setupAdapter, _splitBody, _splitVariableDeclaration, _writeVariableDeclarations, addModifiedVariables, attributeChanged, codeGenType, comment, comment, containsCode, generateFireFunctionCode, generateFireFunctionCompositeEnd, generateFireFunctionCompositeStart, generateFireFunctionMethodInvocation, generateFireFunctionVariableAndMethodName, generateFireFunctionVariableDeclaration, generateInitializeCode, generatePackageStatement, generatePortName, generatePostfireCode, generatePtIOPortName, generatePtIOPortSize, generatePtTypedCompositeActorName, generatePtTypedCompositeActorSize, generateVariableName, generateWrapupCode, getModifiedVariables, getTemplateExtension, isPrimitive, isPrimitive, ptolemyType, setModifiedVariables, splitVariableDeclaration, targetType, updateCommandOptions_runCommand, _setupCommands, _updateSubstituteMap_copyCFilesTosrc, _copyCFileTosrc, _getAdapter, _getAdapterClassFilter, _getAutoGeneratedAdapter, _printTimeAndMemory, _resetAll, _writeCode, _writeCodeFileName, createDecoratorAttributes, decoratedObjects, generateCode, generateCode, generateCopyright, getAdapter, getCodeFileName, getComponent, getExecuteCommands, getMethodExceptionString, getMethodVisibilityString, isGlobalDecorator, main, setCodeGenerator, setContainer, setExecuteCommands_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspaceequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdescription, getContainer, getDisplayName, getFullName, getName, getName, setNameprotected java.lang.String fileExtension
public PtidyOSCodeGenerator(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container - The container.name - The name of the PtidyOS code generator.IllegalActionException - If the super class throws the
exception or error occurs when setting the file path.NameDuplicationException - If the super class throws the
exception or an error occurs when setting the file path.public int generateCode(java.lang.StringBuffer code)
throws KernelException
generateCode in class GenericCodeGeneratorcode - The code buffer into which to generate the code.KernelException - If a type conflict occurs or the model
is running.public java.lang.String generateTypeConvertCode()
throws IllegalActionException
ProgramCodeGeneratorgenerateTypeConvertCode in class ProgramCodeGeneratorIllegalActionException - If an error occurrs when generating
the type conversion code, or if the adapter class for the model
director cannot be found, or if an error occurs when the adapter
actor generates the type conversion code.protected void _generateAdditionalCodeFiles()
throws IllegalActionException
IllegalActionException - If getAdapter() throws it, or if the
PtidyOSCodeGenerator is not used in a Ptides environment.protected java.lang.String _getOutputFilename()
throws IllegalActionException
_getOutputFilename in class GenericCodeGeneratorIllegalActionException - If there is problem resolving
the string value of the generatorPackage parameter.protected java.lang.String _generateIncludeFiles()
throws IllegalActionException
ProgramCodeGenerator_generateIncludeFiles in class ProgramCodeGeneratorIllegalActionException - If the adapter class for some actor
cannot be found.protected boolean _isTopLevel()
throws IllegalActionException
_isTopLevel in class GenericCodeGeneratorIllegalActionException - If the director is not a PtidesDirector.