Class AFDXESs

    • Field Detail

      • bitRate

        public Parameter bitRate
        The bit rate of the bus. This is a double with default value to 100 Mbits/s. It is required to be positive.
      • _afdxVLinksQueue

        protected java.util.LinkedHashMap<java.lang.String,​java.util.LinkedList<TimedEvent>> _afdxVLinksQueue
        Tokens received as input to the AFDX traffic regulator (aka Lissor or Shaper).
      • _virtualLinkTable

        protected java.util.HashMap<java.lang.String,​AFDXVlink> _virtualLinkTable
        Routing table for virtual link object.
      • _portToVirtualLinks

        protected java.util.HashMap<IOPort,​AFDXVlink> _portToVirtualLinks
        Routing table mapping ports to virtual link objects.
      • _lastEmissionTable

        protected java.util.HashMap<java.lang.String,​Time> _lastEmissionTable
        Last emission timestamp for a given virtual link.
      • _afdxSchedMuxsQueue

        protected java.util.HashMap<java.lang.String,​java.util.LinkedList<TimedEvent>> _afdxSchedMuxsQueue
        Tokens received in the AFDX scheduler multiplexor.
      • _nextFireTime

        protected Time _nextFireTime
        Next time a token is sent and the next token can be processed.
      • _delay

        protected double _delay
        Computed delay according to the bag emission (see AFDX spec.).
      • _bitRate

        protected double _bitRate
        Value of the bit rate of the bus.
    • Constructor Detail

      • AFDXESs

        public AFDXESs​(CompositeEntity container,
                       java.lang.String name)
                throws IllegalActionException,
                       NameDuplicationException
        Construct a AFDXESs with a name and a container. The container argument must not be null, or a NullPointerException will be thrown. This actor will use the workspace of the container for synchronization and version counts. If the name argument is null, then the name is set to the empty string. Increment the version of the workspace.
        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.
    • Method Detail

      • clone

        public java.lang.Object clone​(Workspace workspace)
                               throws java.lang.CloneNotSupportedException
        Clone this actor into the specified workspace. The new actor is not added to the directory of that workspace (you must do this yourself if you want it there). The result is a new actor with the same ports as the original, but no connections and no container. A container must be set before much can be done with this actor.
        Overrides:
        clone in class AtomicCommunicationAspect
        Parameters:
        workspace - The workspace for the cloned object.
        Returns:
        A new AFDXESs.
        Throws:
        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.
        See Also:
        NamedObj.exportMoML(Writer, int, String), NamedObj.setDeferringChangeRequests(boolean)
      • getReceiver

        public IntermediateReceiver getReceiver​(Receiver receiver)
        Create an intermediate receiver that wraps a given receiver.
        Parameters:
        receiver - The receiver that is being wrapped.
        Returns:
        A new intermediate receiver.
      • getReceiver

        public Receiver getReceiver​(Receiver receiver,
                                    IOPort port)
                             throws IllegalActionException
        Create a receiver to mediate a communication via the specified receiver. This receiver is linked to a specific port of the communication aspect.
        Parameters:
        receiver - Receiver whose communication is to be mediated.
        port - Port of the communication aspect.
        Returns:
        A new receiver.
        Throws:
        IllegalActionException - If the receiver cannot be created.
      • printSMQueue

        public void printSMQueue()
        Print all elements of the scheduler multiplexor queue.
      • printVlinksQueue

        public void printVlinksQueue()
        Print all elements of the different VL queues.
      • reset

        public void reset()
        Reset the communication aspect.
      • sendToken

        public void sendToken​(Receiver source,
                              Receiver receiver,
                              Token token)
                       throws IllegalActionException
        Initiate a send of the specified token to the specified receiver. This method will schedule a refiring of this actor according to the requirements of the AFDX protocol.
        Parameters:
        source - Sender of the token.
        receiver - The receiver to send to.
        token - The token to send.
        Throws:
        IllegalActionException - If the refiring request fails.
      • setVlinkName

        public void setVlinkName​(IOPort port,
                                 java.lang.String name)
        Set name of virtual link that is parameterized on a port.
        Parameters:
        port - The port.
        name - The virtual link name.
      • setBag

        public void setBag​(IOPort port,
                           java.lang.Double bag)
        Set bag value that is parameterized on a port.
        Parameters:
        port - The port.
        bag - The bag value.
      • setFrameSize

        public void setFrameSize​(IOPort port,
                                 int size)
        Set frame size that is parameterized on a port.
        Parameters:
        port - The port.
        size - The frame size.
      • setSchedulerMultiplexorName

        public void setSchedulerMultiplexorName​(IOPort port,
                                                java.lang.String name)
                                         throws IllegalActionException
        Set the name of the scheduler that is parameterized on a port..
        Parameters:
        port - The port.
        name - The name.
        Throws:
        IllegalActionException - Not thrown in this base class
      • _getNextFireTime

        protected Time _getNextFireTime​(Time nextFireTime,
                                        java.util.LinkedList<TimedEvent> tokens)
        Get next fire time for a set of tokens which is either the minimum next fire time passed as an argument or the smallest timestamp of the tokens in the set.
        Parameters:
        nextFireTime - Minimum next fire time.
        tokens - The set of tokens.
        Returns:
        The next time this actor should be fired based on the tokens in the queue.
      • _scheduleRefire

        protected void _scheduleRefire()
                                throws IllegalActionException
        Schedule a refiring of this actor based on the tokens in the queues.
        Throws:
        IllegalActionException - If actor cannot be refired at the computed time.