public void setServices(gov.cca.Services services)
        {
            this.services = services;

            Console.WriteLine("---- BEFORE REGISTERING USES PORT {0} {1} {2}", this.ThisFacet, this.Id_unit, this.CID);

            foreach (string portName in PortNames)
            {
                services.registerUsesPort(portName, "", new TypeMapImpl());
            }

            services.addProvidesPort(this, Constants.DEFAULT_PROVIDES_PORT_IMPLEMENTS, this.ClassName, new TypeMapImpl());

            InitializePort initialize_port_wrapper = (InitializePort)this;

            services.addProvidesPort(initialize_port_wrapper, Constants.INITIALIZE_PORT_NAME, Constants.INITIALIZE_PORT_TYPE, new TypeMapImpl());

            if (Kind == Constants.KIND_COMPUTATION || Kind == Constants.KIND_SYNCHRONIZER || Kind == Constants.KIND_APPLICATION)
            {
                gov.cca.ports.GoPort app_port_wrapper = (gov.cca.ports.GoPort) this;
                services.addProvidesPort(app_port_wrapper, Constants.GO_PORT_NAME, Constants.GO_PORT_TYPE, new TypeMapImpl());
            }
        }
Beispiel #2
0
 public InitializeThread(InitializePort worker_initialize_port)
 {
     this.worker_initialize_port = worker_initialize_port;
 }
Beispiel #3
0
 public void addPort(InitializePort port)
 {
     ports.Add(port);
 }