bonus-edge-proxy/src/modbus/generic_modbus_parser.h

22 lines
775 B
C
Raw Normal View History

2025-10-14 16:06:43 +08:00
// 文件名: src/modbus/generic_modbus_parser.h
#ifndef GENERIC_MODBUS_PARSER_H
#define GENERIC_MODBUS_PARSER_H
#include "modbus_common.h"
#include <nlohmann/json.hpp>
#include <vector>
#include <map>
class GenericModbusParser {
public:
/**
* @brief Modbus设备读取的原始寄存器映射JSON对象
* @param registers_map map
* @param data_points
* @return nlohmann::json
*/
static nlohmann::json parse(const std::map<uint16_t, uint16_t>& registers_map,
const std::vector<DataPointConfig>& data_points);
};
#endif // GENERIC_MODBUS_PARSER_H