18 lines
497 B
C++
18 lines
497 B
C++
#pragma once
|
|
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
#include <optional>
|
|
|
|
#include <QString>
|
|
|
|
namespace softbus::message_bus::pipeline::protocol::modbusrtu
|
|
{
|
|
|
|
std::uint16_t crc16(const std::uint8_t* data, std::size_t len);
|
|
bool crcOk(const std::uint8_t* adu, std::size_t aduLen);
|
|
std::optional<std::size_t> predictAduLength(const std::uint8_t* buf, std::size_t len, std::size_t maxAdu);
|
|
bool isModbusRtuHint(const QString& hint);
|
|
|
|
} // namespace softbus::message_bus::pipeline::protocol::modbusrtu
|