devices modbus rtu 1.0

This commit is contained in:
flower_linux
2026-04-07 14:20:04 +08:00
parent 28b5082742
commit 51175ffd18
38 changed files with 1006 additions and 745 deletions

View File

@@ -11,11 +11,11 @@
#include <QString>
#include "core/plugin_system/PluginManager.h"
#include "core/plugin_system/IProtocolFramerPlugin.h"
#include "core/memory/LockFreeQueue.h"
#include "core/memory/MemoryPool.h"
#include "core/threading/MutexQueue.h"
#include "message_bus/pipeline/PipelineContext.h"
#include "message_bus/pipeline/stages/1_framers/ModbusRtuFramer.h"
#include "message_bus/pipeline/stages/1_framers/PassthroughFramer.h"
namespace softbus::message_bus::pipeline
@@ -30,7 +30,8 @@ struct PipelineRuntimeConfig
std::size_t framedQueueMax{4096};
std::size_t maxReorderDepth{256};
softbus::message_bus::pipeline::stages::framers::ModbusRtuFramerConfig modbus;
std::size_t modbusMaxAdu{256};
int modbusInterFrameTimeoutMs{0};
};
struct EndpointFramingState;
@@ -106,8 +107,9 @@ private:
PipelineRuntimeConfig m_rtConfig;
std::unique_ptr<softbus::message_bus::pipeline::stages::framers::ModbusRtuFramer> m_modbusFramer;
std::shared_ptr<softbus::message_bus::pipeline::stages::framers::PassthroughFramer> m_passthroughFramer;
std::mutex m_framerSessionMutex;
QHash<QString, std::shared_ptr<softbus::core::plugin_system::IProtocolFramerSession>> m_framerSessions;
std::mutex m_seqMutex;
QHash<QString, std::uint64_t> m_nextFrameSeqByEndpoint;