示例#1
0
文件: Nucleus.cs 项目: mxslcn/uITron3
        public ER DefineCyclicHandler(HNO cycno, ref T_DCYC pk_dcyc)
        {
            CyclicHandler Cyc;

            //if (pk_dcyc == null)
            //	return ER.E_PAR;

            if (cycno >= m_CyclicHandlerTable.Count)
            {
                return(ER.E_PAR);
            }

            Cyc = m_CyclicHandlerTable[cycno];

            // 登録の場合
            if (!pk_dcyc.cycdel)
            {
                if (pk_dcyc.cychdr == null)
                {
                    return(ER.E_PAR);
                }

                if (((uint)pk_dcyc.cycact & (~1u)) != 0)
                {
                    return(ER.E_PAR);
                }

                if (pk_dcyc.cyctim <= 0)
                {
                    return(ER.E_PAR);
                }

                if (Cyc != null)
                {
                    Cyc.Redefine(ref pk_dcyc);
                }
                else
                {
                    Cyc = new CyclicHandler(cycno, ref pk_dcyc, this);
                    m_CyclicHandlerTable[cycno] = Cyc;
                }
            }
            // 登録破棄の場合
            else
            {
                if (Cyc != null)
                {
                    //delete Cyc;
                    m_CyclicHandlerTable[cycno] = null;
                }
            }

            return(ER.E_OK);
        }
示例#2
0
文件: Nucleus.cs 项目: mxslcn/uITron3
        public ER GetCyclicHandler(HNO cycno, ref CyclicHandler Cyc)
        {
            if (cycno >= m_CyclicHandlerTable.Count)
            {
                return(ER.E_PAR);
            }

            Cyc = m_CyclicHandlerTable[cycno];
            if (Cyc == null)
            {
                return(ER.E_NOEXS);
            }

            return(ER.E_OK);
        }
示例#3
0
文件: Nucleus.cs 项目: h7ga40/uITron3
        public ER GetCyclicHandler(HNO cycno, ref CyclicHandler Cyc)
        {
            if (cycno >= m_CyclicHandlerTable.Count)
                return ER.E_PAR;

            Cyc = m_CyclicHandlerTable[cycno];
            if (Cyc == null)
                return ER.E_NOEXS;

            return ER.E_OK;
        }
示例#4
0
文件: Nucleus.cs 项目: h7ga40/uITron3
        public ER DefineCyclicHandler(HNO cycno, ref T_DCYC pk_dcyc)
        {
            CyclicHandler Cyc;

            //if (pk_dcyc == null)
            //	return ER.E_PAR;

            if (cycno >= m_CyclicHandlerTable.Count)
                return ER.E_PAR;

            Cyc = m_CyclicHandlerTable[cycno];

            // 登録の場合
            if (!pk_dcyc.cycdel) {
                if (pk_dcyc.cychdr == null)
                    return ER.E_PAR;

                if (((uint)pk_dcyc.cycact & (~1u)) != 0)
                    return ER.E_PAR;

                if (pk_dcyc.cyctim <= 0)
                    return ER.E_PAR;

                if (Cyc != null) {
                    Cyc.Redefine(ref pk_dcyc);
                }
                else {
                    Cyc = new CyclicHandler(cycno, ref pk_dcyc, this);
                    m_CyclicHandlerTable[cycno] = Cyc;
                }
            }
            // 登録破棄の場合
            else {
                if (Cyc != null) {
                    //delete Cyc;
                    m_CyclicHandlerTable[cycno] = null;
                }
            }

            return ER.E_OK;
        }