Class AtomicCommunicationAspect

    • Field Detail

      • _parameters

        protected java.util.HashMap<IOPort,​java.util.List<Attribute>> _parameters
        List of parameters per port.
      • _tokenCount

        protected int _tokenCount
        Amount of tokens currently being processed by the switch.
    • Constructor Detail

      • AtomicCommunicationAspect

        public AtomicCommunicationAspect​(Workspace workspace)
        Construct an AtomicQuantityManager in the specified workspace with 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. The object is added to the workspace directory. Increment the version number of the workspace.
        Parameters:
        workspace - The workspace that will list the entity.
      • AtomicCommunicationAspect

        public AtomicCommunicationAspect​(CompositeEntity container,
                                         java.lang.String name)
                                  throws IllegalActionException,
                                         NameDuplicationException
        Construct an AtomicQuantityManager 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

      • createDecoratorAttributes

        public DecoratorAttributes createDecoratorAttributes​(NamedObj target)
        Return the decorated attributes for the target NamedObj. If the specified target is not an Actor, return null.
        Specified by:
        createDecoratorAttributes in interface Decorator
        Parameters:
        target - The NamedObj that will be decorated.
        Returns:
        The decorated attributes for the target NamedObj, or null if the specified target is not an Actor.
      • decoratedObjects

        public java.util.List<NamedObj> decoratedObjects()
        Return a list of the entities deeply contained by the container of this resource scheduler.
        Specified by:
        decoratedObjects in interface Decorator
        Returns:
        A list of the objects decorated by this decorator.
      • isGlobalDecorator

        public boolean isGlobalDecorator()
        Return true to indicate that this decorator should decorate objects across opaque hierarchy boundaries.
        Specified by:
        isGlobalDecorator in interface Decorator
        Returns:
        True if decorator is global.
      • sendCommunicationEvent

        public void sendCommunicationEvent​(Actor source,
                                           int messageId,
                                           int messageCnt,
                                           CommunicationAspectListener.EventType eventType)
        Notify the monitor that an event happened.
        Parameters:
        source - The source actor that caused the event in the communication aspect.
        messageId - The ID of the message that caused the event in the communication aspect.
        messageCnt - The amount of messages currently being processed by the communication aspect.
        eventType - Type of event.