Class TCPPacketTransmitter

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

    public class TCPPacketTransmitter
    extends OutputDevice
    Build a TCP Packet containing a user-defined number of PTIDES events.

    This actor should be directly connected to a network output port and be used with a PTIDES director.

    This actor is expected to be used in pairs with the TCPPacketReceiver.

    TCPPacketTransmitter builds TCP packets containing PTIDES events, where each PTIDES event itself is assigned a data length in bits by the user. The bits/event parameter is constant right now and is an actor Parameter. At the destination platform, TCPPacketReceiver consumes packages produced by this actor and releases PTIDES events into its enclosing director.

    This actor consumes frameSize number of input tokens and creates a RecordToken with two fields labeled as TCPlabel and tokens. Here, tokens itself is an array of RecordTokens, where each of the entries is a PTIDES RecordToken with labels: timestamp, microstep and payload. Once the number of received tokens equals frameSize, the RecordToken simulating the TCP Packet is sent to output port. During wrapup, the remaining tokens(if any) are sent to the output.

    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Ilge Akkaya
    Pt.AcceptedRating:
    Pt.ProposedRating:
    • Field Detail

      • output

        public TypedIOPort output
        The data output port, which is a RecordToken.
      • defaultFrameSize

        public Parameter defaultFrameSize
        The default TCP Packet size parameter. The initial default value is an integer with the value 5.
      • priority

        public Parameter priority
        Default TCP Packet priority parameter. The initial default value is an integer with the value 1.
      • frameSize

        public PortParameter frameSize
        User-Defined frame size port parameter. The initial default value is an integer with the value 5. The type is integer.