Class SpeakerOutputDevice
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.cg.kernel.generic.CodeGeneratorAdapter
-
- ptolemy.cg.kernel.generic.program.ProgramCodeGeneratorAdapter
-
- ptolemy.cg.kernel.generic.program.NamedProgramCodeGeneratorAdapter
-
- ptolemy.cg.adapter.generic.program.procedural.c.adapters.ptolemy.domains.ptides.lib.OutputDevice
-
- ptolemy.cg.adapter.generic.program.procedural.c.luminary.adapters.ptolemy.domains.ptides.lib.luminary.SpeakerOutputDevice
-
- All Implemented Interfaces:
java.lang.Cloneable,Changeable,Debuggable,DebugListener,Derivable,ModelErrorHandler,MoMLExportable,Moveable,Nameable
public class SpeakerOutputDevice extends OutputDevice
A code generation adapter class for ptolemy.domains.ptides.lib.targets.luminary.SpeakerOutputDevice.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Jia Zou, Isaac Liu, Jeff C. Jensen
- Pt.AcceptedRating:
- Red (jiazou)
- Pt.ProposedRating:
- Yellow (jiazou)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.cg.kernel.generic.program.NamedProgramCodeGeneratorAdapter
NamedProgramCodeGeneratorAdapter.VariableScope
-
Nested classes/interfaces inherited from class ptolemy.cg.kernel.generic.program.ProgramCodeGeneratorAdapter
ProgramCodeGeneratorAdapter.Channel
-
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
-
-
Field Summary
-
Fields inherited from class ptolemy.cg.kernel.generic.program.ProgramCodeGeneratorAdapter
_component, _defaultBlocks, _eol, _templateParser
-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
-
-
Constructor Summary
Constructors Constructor Description SpeakerOutputDevice(SpeakerOutputDevice actor)Construct an adapter with the given ptolemy.domains.ptides.lib.SpeakerOutputDevice actor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgenerateActuatorActuationFuncCode()Return the code for the actuator actuation function.java.lang.StringgenerateFireCode()Generate the fire code.java.lang.StringgenerateHardwareInitializationCode()Return the hardware initialization code.-
Methods inherited from class ptolemy.cg.kernel.generic.program.NamedProgramCodeGeneratorAdapter
_generateFireCode, _generateTypeConvertStatement, analyzeTypeConvert, copyFilesToCodeDirectory, generateFireFunctionCode, generateInitializeCode, generateMainLoop, generateModeTransitionCode, generatePostfireCode, generatePrefireCode, generatePreinitializeCode, generatePreinitializeMethodBodyCode, generateSimpleName, generateTypeConvertFireCode, generateTypeConvertFireCode, generateVariableDeclaration, generateVariableInitialization, generateWrapupCode, getAddTimeString, getBufferSize, getBufferSize, getComponent, getDeclareSharedCode, getDefaultBlocks, getFireFunctionParameters, getHeaderFiles, getIncludeDirectories, getLibraries, getLibraryDirectories, getModifiedVariables, getName, getParameterValue, getReference, getReference, getSharedCode, getSinkChannels, getSourceTimeString, getTimeSourcePortName, getTypeConvertChannels, getTypeConvertReference, getTypeConvertSinkChannels, setupAdapter, targetType
-
Methods inherited from class ptolemy.cg.kernel.generic.program.ProgramCodeGeneratorAdapter
_generateBlockByName, getAdapter, getCodeGenerator, getTemplateParser, processCode, setCodeGenerator, setTemplateParser, toString
-
Methods inherited from class ptolemy.cg.kernel.generic.CodeGeneratorAdapter
createDecoratorAttributes, generateName
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getContainedObject, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateExistence, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getContainer, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setName, setPersistent, setSource, sortContainedObjects, toplevel, uniqueName, validateSettables, workspace
-
-
-
-
Constructor Detail
-
SpeakerOutputDevice
public SpeakerOutputDevice(SpeakerOutputDevice actor) throws IllegalActionException, NameDuplicationException
Construct an adapter with the given ptolemy.domains.ptides.lib.SpeakerOutputDevice actor.- Parameters:
actor- The given ptolemy.domains.ptides.lib.targets.luminary.SpeakerOutputDevice actor.- Throws:
IllegalActionException- If the actor cannot be contained by the proposed container.NameDuplicationException- If the container already has an actor with this name.
-
-
Method Detail
-
generateActuatorActuationFuncCode
public java.lang.String generateActuatorActuationFuncCode() throws IllegalActionExceptionDescription copied from class:OutputDeviceReturn the code for the actuator actuation function.- Overrides:
generateActuatorActuationFuncCodein classOutputDevice- Returns:
- the code for the sensing function, which in this case is the empty string.
- Throws:
IllegalActionException- Not thrown in this base class.
-
generateFireCode
public java.lang.String generateFireCode() throws IllegalActionExceptionGenerate the fire code. In this base class, add the name of the associated component in the comment. It checks the inline parameter of the code generator. If the value is true, it generates the actor fire code and the necessary type conversion code. Otherwise, it generate an invocation to the actor function that is generated by generateFireFunctionCode.- Overrides:
generateFireCodein classNamedProgramCodeGeneratorAdapter- Returns:
- The generated code.
- Throws:
IllegalActionException- Not thrown in this base class.
-
generateHardwareInitializationCode
public java.lang.String generateHardwareInitializationCode() throws IllegalActionExceptionDescription copied from class:OutputDeviceReturn the hardware initialization code.- Overrides:
generateHardwareInitializationCodein classOutputDevice- Returns:
- the hardware initialization code, which in this case is the empty string.
- Throws:
IllegalActionException- Not thrown in this base class.
-
-