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; }
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); }
public void Redefine(ref T_DCYC pk_dcyc) { m_dcyc = pk_dcyc; m_Count = pk_dcyc.cyctim; }
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; }
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; }