rts-sim-testing-service/third_party/axle_device/config.go
2023-11-06 18:10:15 +08:00

33 lines
1.5 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package axle_device
import "joylink.club/bj-rtsts-server/third_party/message"
// RsspConfig CI系统与计轴设备的安全通信协议配置参数
// 计轴设备(管理一个集中站的所有计轴器)配置
type RsspConfig struct {
SrcAddr uint16 //16位源地址,本地地址
DstAddr uint16 //16位目的地址,远程地址
DataVer1 uint32 //通道1数据版本
DataVer2 uint32 //通道2数据版本
SID1 uint32 //通道1源标识
SID2 uint32 //通道2源标识
SINIT1 uint32 //通道1序列初始
SINIT2 uint32 //通道2序列初始
SendingPeriod uint32 //接收方每个安全通信会话对应的发送周期值,单位ms
SsrRsspTimeout uint32 //等待SSR回应的定时器超时值,为RsspTimer时间,1=SendingPeriod
Mtv uint32 //每个安全通信会话可容忍的最大时序偏差,即当前接收的RSD的序列号与上一次RSD的序列号最大允许差值
Udl uint32 //每个安全通信会话RSD应用数据长度发送和接收的配置值支持固定长度和可变长度;0-可变长度大于0即固定长度
PicType message.PicType //协议交互类别
DeviceA bool //true-A机false-B机
RemoteIp string //远程服务器ip
RemoteUdpPort int //远程服务器端口
LocalUdpPort int //本地服务器端口
}
// CheckAddress 检测目标源地址目的地址是否在配置中
func (c *RsspConfig) CheckAddress(srcAddr uint16, dstAddr uint16) bool {
return true
}