package com.dcs.equipment.constants;

/**
 * Modbus常量
 *
 * @author: wangpx
 * @date: 2025-03-11 15:24
 */
public class ModbusConstants {
    // 线圈寄存器代码
    public static final String COIL_FUNCTION_CODE = "1";
    // 输入寄存器代码
    public static final String INPUT_FUNCTION_CODE = "3";
    // 保持寄存器代码
    public static final String HOLDING_FUNCTION_CODE = "4";
    // 数据类型
    public static final String COIL_DATA_TYPE = "1";
    public static final String FLOAT_DATA_TYPE = "2";
    public static final String INT_DATA_TYPE = "3";
    // 数据类型单次读取最大长度
    public static final int COIL_MAX_LENGTH = 1968;
    public static final int INT_MAX_LENGTH = 125;
    public static final int FLOAT_MAX_LENGTH = 62;
    // 数据类型占用字符数
    public static final int COIL_ADDRESS_LENGTH = 1;
    public static final int INT_ADDRESS_LENGTH = 1;
    public static final int FLOAT_ADDRESS_LENGTH = 2;

}
