示例#1
0
    void TdmHAL::MsgOnNewBlock(shared_ptr<IrqInfoMsg> info)
    {       
        if (m_pBlockProcProfiler) m_pBlockProcProfiler->OnProcessingBegin();

        // echo shadow sync TX copy  <-- this code moved from IRQ context!
        if (CEnableEchoDataCopy)
        {
            int sportNum = info->SportNum();
            if (m_sports.at(sportNum) != 0) 
            {
                m_sports.at(sportNum)->IrqEchoDataCopy(info->BlockInterface(0), 
                                                       info->BlockInterface(1));
            }
        }

        // process
        info->EnableAutoClose();

        for(int i = 0; i < m_handlers.size(); ++i)
        {
            m_handlers.at(i)->OnTdmHalIrq(info->SportNum(), *info);
        }

        if (m_pBlockProcProfiler) m_pBlockProcProfiler->OnProcessingEnd();
    }