|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.actor.AtomicActor
ptolemy.actor.TypedAtomicActor
jni.GenericJNIActor
Use the Java Native Interface to execute a native method. To use this actor, first configure the arguments of the native method by right clicking on the actor and selecting 'Configure Arguments', then configure the library name and location, then create the JNI files.
Note that under Windows, your path needs to include the directory
named by the libraryDirectory Parameter.
For further details, see JNIUtilities.
JNIUtilities,
Serialized Form
| Red (vincent.arnould) |
| Red (vincent.arnould) |
| Nested Class Summary |
| Nested classes inherited from class ptolemy.kernel.Entity |
Entity.ContainedObjectsIterator |
| Field Summary | |
Parameter |
libraryDirectory
The directory that contains the native library, which under Windows should include a dll, an h file and a lib file. |
Parameter |
nativeFunction
The name of the native library. |
Parameter |
nativeLibrary
The name of the native library. |
| Fields inherited from class ptolemy.actor.AtomicActor |
_stopRequested |
| Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
| Fields inherited from interface ptolemy.actor.Executable |
COMPLETED, NOT_READY, STOP_ITERATING |
| Constructor Summary | |
GenericJNIActor()
Construct an entity in the default workspace with an empty string as its name. |
|
GenericJNIActor(CompositeEntity container,
java.lang.String name)
Construct an entity in the given workspace with the given name. |
|
GenericJNIActor(Workspace workspace)
Construct an entity in the given workspace with an empty string as a name. |
|
| Method Summary | |
protected void |
_addArgument(Argument arg)
Add an argument to this entity |
protected void |
_removeArgument(Argument arg)
Remove an argument from this entity. |
void |
addArgumentReturn()
Add a return argument to this entity |
java.util.List |
argumentsList()
Get the arguments belonging to this entity. |
void |
attributeChanged(Attribute attribute)
If the getDirector() returns something other than null, then invalidate the resolved types. |
java.lang.Object |
clone(Workspace workspace)
Clone the object into the specified workspace. |
void |
createPorts()
For each Argument, a port of the same name is created, belonging to this argument. |
void |
fire()
Read the argument of the function from the ports, call the native method throw the generated interface, and put the results on the corresponding ports |
Argument |
getArgument(java.lang.String name)
Return the argument contained by this entity that has the specified name. |
Argument |
getArgumentReturn()
Return the argument contained by this entity that is return. |
void |
initialize()
Load the generated class and search for its fire method. |
| Methods inherited from class ptolemy.actor.TypedAtomicActor |
_addPort, attributeTypeChanged, clone, newPort, typeConstraintList |
| Methods inherited from class ptolemy.actor.AtomicActor |
_createReceivers, connectionsChanged, getDirector, getExecutiveDirector, getFunctionDependency, getManager, inputPortList, iterate, newReceiver, outputPortList, postfire, prefire, preinitialize, pruneDependencies, removeDependency, setContainer, stop, stopFire, terminate, wrapup |
| Methods inherited from class ptolemy.kernel.ComponentEntity |
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, propagateExistence, setName |
| Methods inherited from class ptolemy.kernel.Entity |
_description, _exportMoMLContents, _removePort, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName, validateSettables |
| Methods inherited from class ptolemy.kernel.InstantiableNamedObj |
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ptolemy.actor.Actor |
getDirector, getExecutiveDirector, getFunctionDependency, getManager, inputPortList, newReceiver, outputPortList |
| Methods inherited from interface ptolemy.actor.Executable |
iterate, postfire, prefire, preinitialize, stop, stopFire, terminate, wrapup |
| Methods inherited from interface ptolemy.kernel.util.Derivable |
getDerivedLevel, getDerivedList, propagateValue |
| Methods inherited from interface ptolemy.kernel.util.Nameable |
description, getFullName, getName, getName |
| Field Detail |
public Parameter libraryDirectory
public Parameter nativeFunction
public Parameter nativeLibrary
| Constructor Detail |
public GenericJNIActor()
public GenericJNIActor(Workspace workspace)
workspace - The workspace for synchronization and version
tracking.
public GenericJNIActor(CompositeEntity container,
java.lang.String name)
throws NameDuplicationException,
IllegalActionException
container - The container.name - The name of this object.
IllegalActionException - If the name has a period.
NameDuplicationException| Method Detail |
public void addArgumentReturn()
throws IllegalActionException,
NameDuplicationException
IllegalActionException
NameDuplicationExceptionpublic java.util.List argumentsList()
public void attributeChanged(Attribute attribute)
throws IllegalActionException
attributeChanged in class NamedObjattribute - The attribute that has changed.
IllegalActionException - If the parameters are out of range.
public java.lang.Object clone(Workspace workspace)
throws java.lang.CloneNotSupportedException
clone in class AtomicActorworkspace - The workspace for the cloned object.
java.lang.CloneNotSupportedException - If cloned ports cannot have
as their container the cloned entity (this should not occur), or
if one of the attributes cannot be cloned.
public void createPorts()
throws IllegalActionException
IllegalActionException
public void fire()
throws IllegalActionException
fire in interface Executablefire in class AtomicActorIllegalActionException - If a exception occuredpublic Argument getArgument(java.lang.String name)
name - The name of the desired argument.
public Argument getArgumentReturn()
public void initialize()
throws IllegalActionException
initialize in interface Executableinitialize in class AtomicActorIllegalActionException - If a derived class throws it.
protected void _addArgument(Argument arg)
throws IllegalActionException,
NameDuplicationException
IllegalActionException
NameDuplicationException
protected void _removeArgument(Argument arg)
throws IllegalActionException
IllegalActionException - If an error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||