package com.ruoyi.mill.udp;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * UDP 通信参数配置（application.yml: mill.udp.*）
 */
@Component
@ConfigurationProperties(prefix = "mill.udp")
public class UdpProperties {

    /** 本地监听端口（接收 L3 下发电文） */
    private int localPort = 9001;

    /** L3 系统 IP */
    private String remoteHost = "127.0.0.1";

    /** L3 系统端口 */
    private int remotePort = 9000;

    /** 接收缓冲区大小（字节） */
    private int bufferSize = 4096;

    public int getLocalPort()          { return localPort; }
    public void setLocalPort(int p)    { this.localPort = p; }
    public String getRemoteHost()      { return remoteHost; }
    public void setRemoteHost(String h){ this.remoteHost = h; }
    public int getRemotePort()         { return remotePort; }
    public void setRemotePort(int p)   { this.remotePort = p; }
    public int getBufferSize()         { return bufferSize; }
    public void setBufferSize(int s)   { this.bufferSize = s; }
}
