Merge branch 'develop' into local-test
All checks were successful
local-test分支打包构建docker并发布运行 / Docker-Build (push) Successful in 1m31s

This commit is contained in:
tiger_zhou 2024-05-29 13:55:35 +08:00
commit 5627ca5315
2 changed files with 2 additions and 1 deletions

View File

@ -136,6 +136,7 @@ type ElectricMachineryConfig struct {
// BtmVobcConfig 11 号线 BTM vobc 网关设备配置
type BtmVobcConfig struct {
LocalUdpIp string `json:"LocalUdpIp" description:"本机监听接收UDP ip 配置"`
LocalUdpPort int `json:"localUdpPort" description:"本机监听接收UDP端口"`
RemoteIp string `json:"remoteIp" description:"btm串口设备IP配置"`
RemoteUdpPort int `json:"remoteUdpPort" description:"btm串口设备UDP端口"`

View File

@ -48,7 +48,7 @@ func (b *BtmVobcClient) Start(btmVobcManage BtmVobcManage) {
slog.Info("11号线 btm vobc配置未开启...")
return
}
udpServer := udp.NewServer(fmt.Sprintf(":%d", cfg.RemoteUdpPort), b.handleBtmVobcFrames)
udpServer := udp.NewServer(fmt.Sprintf("%v:%d", cfg.LocalUdpIp, cfg.LocalUdpPort), b.handleBtmVobcFrames)
err := udpServer.Listen()
if err != nil {
slog.Error("11号线 btm VOBC 服务启动失败...")