Class MobileFunction

  • All Implemented Interfaces:
    java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, TypedActor, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    @Deprecated
    public class MobileFunction
    extends TypedAtomicActor
    Deprecated.
    Use ApplyFunction.
    This actor extends the TypedAtomicActor. It applies a function to its inputs and outputs the results. But rather than has the function specified statically, this actor allows dynamic change to the function, which means the computation of this actor can be changed during executing. Its second input accept a function token for the new function's definition. The function token can be given by actors in the local model or remote actors. Currently, it only accept functions that has one argument. The return type of the function needs to be less than the output type of this actor.
    Since:
    Ptolemy II 4.0
    Version:
    $Id$
    Author:
    Yang Zhao
    Pt.AcceptedRating:
    Red (reviewmoderator)
    Pt.ProposedRating:
    Red (eal)
    • Field Detail

      • input

        public TypedIOPort input
        Deprecated.
        The input port for incoming data. The type of this port is undeclared, meaning that it will resolve to any data type.
      • function

        public TypedIOPort function
        Deprecated.
        The input port for function definition. The type of this port is undeclared, but to have this actor work, the designer has to provide a matched function token for it. Note: The reason that we don't declare the type for it is because currently there is not cast supported in the FunctionType class. we'll fix this later.
      • output

        public TypedIOPort output
        Deprecated.
        The output port. Note: Due to the same reason above, the type of the output can't be resolved currently. User has to specify the type.
    • Constructor Detail

      • MobileFunction

        public MobileFunction​(Workspace workspace)
                       throws IllegalActionException,
                              NameDuplicationException
        Deprecated.
        Construct a MobileFunction in the specified workspace with no container and an empty string as a name. You can then change the name with setName(). If the workspace argument is null, then use the default workspace.
        Parameters:
        workspace - The workspace that will list the actor.
        Throws:
        IllegalActionException - If the entity cannot be contained by the proposed container.
        NameDuplicationException - If the container already has an actor with this name.
      • MobileFunction

        public MobileFunction​(CompositeEntity container,
                              java.lang.String name)
                       throws IllegalActionException,
                              NameDuplicationException
        Deprecated.
        Construct a MobileFunction with a name and a container. The container argument must not be null, or a NullPointerException will be thrown.
        Parameters:
        container - The container.
        name - The name of this actor.
        Throws:
        IllegalActionException - If the container is incompatible with this actor.
        NameDuplicationException - If the name coincides with an actor already in the container.