modbus rtu 1.1 plugins
This commit is contained in:
27
plugins/protocols/modbus_rtu/codec/ModbusRtuCodec.h
Normal file
27
plugins/protocols/modbus_rtu/codec/ModbusRtuCodec.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QString>
|
||||
|
||||
#include "plugins/protocols/modbus_rtu/types/ModbusRtuPdu.h"
|
||||
|
||||
namespace softbus::message_bus::pipeline
|
||||
{
|
||||
enum class BusDirection;
|
||||
}
|
||||
|
||||
namespace softbus::message_bus::pipeline::protocol
|
||||
{
|
||||
|
||||
bool decodeModbusRtu(softbus::message_bus::pipeline::BusDirection dir,
|
||||
const std::uint8_t* p,
|
||||
std::size_t n,
|
||||
ModbusRtuPdu& out,
|
||||
QString* errMsg = nullptr);
|
||||
|
||||
bool encodeModbusRtu(const ModbusRtuPdu& pdu, QByteArray& out, QString* errMsg = nullptr);
|
||||
|
||||
} // namespace softbus::message_bus::pipeline::protocol
|
||||
Reference in New Issue
Block a user