Exemplo n.º 1
0
 public CyclicHandler(HNO cycno, ref T_DCYC pk_dcyc, Nucleus pNucleus)
 {
     m_CycNo = cycno;
     m_dcyc = pk_dcyc;
     m_Count = pk_dcyc.cyctim;
     m_Nucleus = pNucleus;
 }
Exemplo n.º 2
0
 public CyclicHandler(HNO cycno, ref T_DCYC pk_dcyc, Nucleus pNucleus)
 {
     m_CycNo   = cycno;
     m_dcyc    = pk_dcyc;
     m_Count   = pk_dcyc.cyctim;
     m_Nucleus = pNucleus;
 }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 public void Redefine(ref T_DCYC pk_dcyc)
 {
     m_dcyc  = pk_dcyc;
     m_Count = pk_dcyc.cyctim;
 }
Exemplo n.º 5
0
 public void Redefine(ref T_DCYC pk_dcyc)
 {
     m_dcyc = pk_dcyc;
     m_Count = pk_dcyc.cyctim;
 }
Exemplo n.º 6
0
        public ER def_cyc(HNO cycno, ref T_DCYC pk_dcyc)
        {
            ER Result = ER.E_NOEXS;

            if (g_Kernel == null)
                return ER.E_DLT;

            g_Kernel.LockCPU();
            try {
                Result = g_Kernel.Nucleus.DefineCyclicHandler(cycno, ref pk_dcyc);
            }
            finally {
                g_Kernel.UnlockCPU();
            }

            return Result;
        }
Exemplo n.º 7
0
        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;
        }