Class SetProperties

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

    public class SetProperties
    extends TypedAtomicActor
    On each firing, this actor reads at most one token from the payload and properties input ports, outputs the payload on the output port, and set the outsideTransmitProperties of the wireless output port connected to the output port with the specified transmit properties received from the properties input port. If there is no token received on the properties input port, this actor will not modify the outsideTransmitProperties of the connected wirelessIOPort, i.e. the payload will be transmitted with the previous transmit properties.
    Since:
    Ptolemy II 4.0
    Version:
    $Id$
    Author:
    Yang Zhao, Edward A. Lee
    Pt.AcceptedRating:
    Yellow (cxh)
    Pt.ProposedRating:
    Yellow (cxh)
    • Field Detail

      • payload

        public TypedIOPort payload
        Input port that receives the payload to be transmitted.
      • output

        public TypedIOPort output
        Output port that output the received payload. This has the same type as the payload port.
      • properties

        public TypedIOPort properties
        Input port that receives the properties to be used for transmission on the connected wireless output port. The type of this port is a record type.
    • Method Detail

      • fire

        public void fire()
                  throws IllegalActionException
        reads one token from the payload input port, and simply output the token on the output port. If there is token at the properties input port, read the properties value and use it to set the outsideTransmitProperties of the connected wireless output port.
        Specified by:
        fire in interface Executable
        Overrides:
        fire in class AtomicActor<TypedIOPort>
        Throws:
        IllegalActionException - If the specified port is not an instance of WirelessIOPort, or if there is no such port.