| | |
| | | m_hEventDispatchThreadExit[1] = nullptr; |
| | | } |
| | | |
| | | // 释放人工搬出缓冲区里的玻璃 |
| | | for (auto* pGlass : m_bufGlass) { |
| | | if (pGlass != nullptr) { |
| | | pGlass->release(); |
| | | } |
| | | } |
| | | m_bufGlass.clear(); |
| | | |
| | | DeleteCriticalSection(&m_criticalSection); |
| | | } |
| | | |
| | |
| | | }; |
| | | for (uint32_t mid : mids) { |
| | | if (mode == CurveMode::EmptyChamber) { |
| | | m_pCollector->buffersStart(mid); // 空腔模式:允许无批次直接采样 |
| | | m_pCollector->batchStart(mid, "EMPTY_CHAMBER", 30 * 60 * 1000ULL); // 空腔模式:启动采样批次 |
| | | } |
| | | else { |
| | | m_pCollector->buffersStop(mid); |
| | | m_pCollector->buffersClear(mid); |
| | | m_pCollector->batchStop(mid); |
| | | m_pCollector->buffersClear(mid); // 切回生产模式,清掉空腔数据 |
| | | } |
| | | } |
| | | } |
| | |
| | | if (pSlot == nullptr) return false; |
| | | |
| | | CGlass* pGlass = (CGlass*)pSlot->getContext(); |
| | | if (pGlass == nullptr) return false; |
| | | |
| | | // Buffer 上限为 1:新搬出时丢弃旧的 |
| | | if (!m_bufGlass.empty()) { |
| | | for (auto* oldGlass : m_bufGlass) { |
| | | if (oldGlass != nullptr) oldGlass->release(); |
| | | } |
| | | m_bufGlass.clear(); |
| | | } |
| | | m_bufGlass.push_back(pGlass); |
| | | pGlass->addRef(); |
| | | pSlot->setContext(nullptr); |
| | |
| | | MID_BakeCoolingA, MID_BakeCoolingB |
| | | }; |
| | | for (uint32_t mid : mids) { |
| | | m_pCollector->buffersStart(mid); |
| | | m_pCollector->batchStart(mid, "EMPTY_CHAMBER", 10 * 60 * 1000ULL); |
| | | } |
| | | } |
| | | } |