Class CoupledDistributed


  • public class CoupledDistributed
    extends Coupled
    This class represents a distributed coupled model. The model is defined in an XML file with the following structure:
     
     <coupled name="GPT" class="xdevs.core.examples.efp.Efp" host="192.168.1.3" mainPort="5000" auxPort="6000">
     	<atomic name="processor" class="xdevs.core.examples.efp.Processor" host="192.168.1.4" mainPort="5001" auxPort="6001">
     		<constructor-arg value="3.0"/>
     	</atomic>
     	<atomic name="generator" class="xdevs.core.examples.efp.Generator" host="192.168.1.5" mainPort="5002" auxPort="6002">
     		<constructor-arg value="1.0"/>
     	</atomic>
     	<atomic name="transducer" class="xdevs.core.examples.efp.Transducer" host="192.168.1.6" mainPort="5003" auxPort="6003">
     		<constructor-arg value="100.0"/>
     	</atomic>
     	<connection componentFrom="processor" portFrom="oOut" componentTo="transducer" portTo="iSolved"/>
     	<connection componentFrom="generator" portFrom="oOut" componentTo="processor" portTo="iIn"/>
     	<connection componentFrom="generator" portFrom="oOut" componentTo="transducer" portTo="iArrived"/>
     	<connection componentFrom="transducer" portFrom="oOut" componentTo="generator" portTo="iStop"/>
     </coupled>
     
     
    The model is composed of atomic components and connections between them. The model is executed by a distributed coordinator class.
    • Constructor Detail

      • CoupledDistributed

        public CoupledDistributed​(Element xmlCoupled)
        Constructor of the class.
        Parameters:
        xmlCoupled - XML element with the model definition.
    • Method Detail

      • getHost

        public String getHost​(String componentName)
        Get the host of a component.
        Parameters:
        componentName - Name of the component.
        Returns:
        Host of the component.
      • getMainPort

        public Integer getMainPort​(String componentName)
        Get the main port of a component.
        Parameters:
        componentName - Name of the component.
        Returns:
        Main port of the component.
      • getAuxPort

        public Integer getAuxPort​(String componentName)
        Get the auxiliary port of a component.
        Parameters:
        componentName - Name of the component.
        Returns:
        Auxiliary port of the component.
      • main

        public static void main​(String[] args)