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 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); }
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; }
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; }