zdj9
This commit is contained in:
parent
6edff67117
commit
11a572e9c7
@ -116,11 +116,21 @@ type Switch2jZdj9State struct {
|
||||
J2_Traction int8
|
||||
}
|
||||
|
||||
// IsTurning 道岔是否在转动过程中
|
||||
// IsTurning 道岔物理实际状态而非采集状态:道岔是否在转动过程中
|
||||
func (me *Switch2jZdj9State) IsTurning() bool {
|
||||
return !me.J1_DB_K9 && !me.J1_FB_K10 || !me.J2_DB_K9 && !me.J2_FB_K10
|
||||
}
|
||||
|
||||
// IsNormal 道岔物理实际状态而非采集状态:道岔是否在定位
|
||||
func (me *Switch2jZdj9State) IsNormal() bool {
|
||||
return me.J1_DB_K9 && !me.J1_FB_K10 && me.J2_DB_K9 && !me.J2_FB_K10
|
||||
}
|
||||
|
||||
// IsReverse 道岔物理实际状态而非采集状态:道岔是否在反位
|
||||
func (me *Switch2jZdj9State) IsReverse() bool {
|
||||
return !me.J1_DB_K9 && me.J1_FB_K10 && !me.J2_DB_K9 && me.J2_FB_K10
|
||||
}
|
||||
|
||||
// NewSwitch2jZdj9State 创建ZDJ9道岔状态并初始化
|
||||
func NewSwitch2jZdj9State() *Switch2jZdj9State {
|
||||
return &Switch2jZdj9State{
|
||||
|
Loading…
Reference in New Issue
Block a user