rawbusmessage
This commit is contained in:
@@ -25,10 +25,9 @@ public:
|
||||
m_buf.resize(m_cfg.maxAdu);
|
||||
}
|
||||
|
||||
void feedChunk(softbus::message_bus::pipeline::PipelineContext& in,
|
||||
std::vector<softbus::message_bus::pipeline::PipelineContext>& out) override
|
||||
void feedChunk(softbus::core::models::RawBusMessage& in,
|
||||
std::vector<softbus::core::models::RawBusMessage>& out) override
|
||||
{
|
||||
using softbus::message_bus::pipeline::FrameKind;
|
||||
if (!m_pool || !in.payload.valid()) {
|
||||
return;
|
||||
}
|
||||
@@ -77,7 +76,7 @@ public:
|
||||
std::memcpy(blk->data, m_buf.data(), *pred);
|
||||
blk->size = *pred;
|
||||
|
||||
softbus::message_bus::pipeline::PipelineContext framed;
|
||||
softbus::core::models::RawBusMessage framed;
|
||||
framed.deviceId = in.deviceId;
|
||||
framed.stableKey = in.stableKey;
|
||||
framed.endpoint = in.endpoint;
|
||||
@@ -85,7 +84,6 @@ public:
|
||||
framed.protocolHint = in.protocolHint;
|
||||
framed.traceId = in.traceId;
|
||||
framed.direction = in.direction;
|
||||
framed.frameKind = FrameKind::CompleteFrame;
|
||||
framed.payload.block = std::move(blk);
|
||||
framed.payload.offset = 0;
|
||||
framed.payload.length = *pred;
|
||||
@@ -101,7 +99,6 @@ public:
|
||||
|
||||
in.payload = {};
|
||||
in.payloadSize = 0;
|
||||
in.frameKind = FrameKind::StreamChunk;
|
||||
}
|
||||
|
||||
void reset() override { m_len = 0; }
|
||||
|
||||
@@ -12,7 +12,7 @@ class ModbusRtuMapperSession final : public softbus::core::plugin_system::IProto
|
||||
{
|
||||
public:
|
||||
std::vector<softbus::core::models::DOMMessage> map(
|
||||
const softbus::message_bus::pipeline::PipelineContext& rawContext,
|
||||
const softbus::core::models::RawBusMessage& rawContext,
|
||||
const softbus::message_bus::pipeline::protocol::ProtocolEnvelope& envelope) override
|
||||
{
|
||||
std::vector<softbus::core::models::DOMMessage> out;
|
||||
|
||||
Reference in New Issue
Block a user