Пример #1
0
        public void setComponentProperties(gov.cca.ComponentID cid, gov.cca.TypeMap map)
        {
            ManagerObject manager = backend.DGAC.BackEnd.connectToManager(out ch);

            manager.setComponentProperties(cid, new TypeMapImpl(map));

            backend.DGAC.BackEnd.releaseManager(ch);
        }
Пример #2
0
        public gov.cca.TypeMap getComponentProperties(gov.cca.ComponentID cid)
        {
            ManagerObject manager = backend.DGAC.BackEnd.connectToManager(out ch);

            gov.cca.TypeMap properties = manager.getComponentProperties(cid);

            backend.DGAC.BackEnd.releaseManager(ch);

            return(properties);
        }
Пример #3
0
        void Services.addProvidesPort(Port inPort, string portName, string type, gov.cca.TypeMap properties)
        {
            ComponentID cid_inner = frw.getComponentID(mkPortName(portName));

            if (!(cid_inner is ManagerIgnoredComponentID))
            {
                gov.cca.Services ws = WorkerServices;
                ws.addProvidesPort(inPort, portName, type, properties);
            }
            frw.addProvidesPort(inPort, mkPortName(portName), type, properties);
        }
Пример #4
0
        void Services.registerUsesPort(string portName, string type, gov.cca.TypeMap properties)
        {
            ComponentID cid_inner = frw.getComponentID(mkPortName(portName));

            if (!(cid_inner is ManagerIgnoredComponentID))
            {
                gov.cca.Services ws = WorkerServices;
                ws.registerUsesPort(portName, type, properties);
            }
            frw.registerUsesPort(mkPortName(portName), type, properties);
        }
        void Services.addProvidesPort(Port inPort, string portName, string type, gov.cca.TypeMap properties)
        {
            ComponentID cid_inner = frw.getComponentID(mkPortName(portName));

            if (!(cid_inner is ManagerIgnoredComponentID))
            {
                int[] nodes = cid.WorkerNodes;
                //for (int i=0; i<nodes.Length; i++)
                foreach (int i in WorkerServices.Keys)
                {
                    gov.cca.Services ws = WorkerServices[i];
                    ws.addProvidesPort(inPort, portName, type, properties);
                }
            }
            frw.addProvidesPort(inPort, mkPortName(portName), type, properties);
        }
Пример #6
0
        public gov.cca.ComponentID createInstance(string instanceName, string className, gov.cca.TypeMap properties)
        {
            gov.cca.ComponentID cid = null;

            try
            {
                ManagerObject manager = backend.DGAC.BackEnd.connectToManager(out ch);

                TypeMap map = new TypeMapImpl(properties);

                cid = manager.createInstance(instanceName, className, map);
            }
            catch (Exception e)
            {
                Console.Error.WriteLine("ERROR Creating Instance !");
            }
            finally
            {
                backend.DGAC.BackEnd.releaseManager(ch);
            }

            return(cid);
        }