modbus rtu 1.2
This commit is contained in:
@@ -113,9 +113,11 @@ void PipelineEngine::start()
|
||||
// 合并队列是用来存储合并的帧的
|
||||
// 合并线程是用来处理合并的帧的
|
||||
if (m_rtConfig.parallelPipeline) {
|
||||
m_framedQ = std::make_unique<softbus::core::threading::MutexQueue<PipelineContext>>(
|
||||
m_rtConfig.framedQueueMax);
|
||||
m_framedQ = std::make_unique<softbus::core::threading::MutexQueue<PipelineContext>>(m_rtConfig.framedQueueMax);
|
||||
for (int i = 0; i < m_rtConfig.parseWorkerCount; ++i) {
|
||||
// 创建解析线程 解析线程从帧队列中取出帧 进行处理
|
||||
// emplace_back 是用来创建解析线程的 参数是 lambda 表达式
|
||||
// [this]() { parseWorkerLoop(); } 是一个 lambda 表达式 用来创建解析线程
|
||||
m_parseThreads.emplace_back([this]() { parseWorkerLoop(); });
|
||||
}
|
||||
if (m_rtConfig.orderedEgress) {
|
||||
@@ -503,7 +505,7 @@ std::vector<softbus::core::models::DOMMessage> PipelineEngine::stage2Parser(cons
|
||||
parserSession = it.value();
|
||||
}
|
||||
softbus::message_bus::pipeline::protocol::ProtocolEnvelope envelope; // 协议封装
|
||||
if (!parserSession->parse(ctx, envelope)) {
|
||||
if (!parserSession->parse(ctx.raw(), envelope)) {
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user