rts-sim-module/component/iscs_bas_valve.go
2023-12-19 11:11:27 +08:00

39 lines
1.0 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 component
import (
"joylink.club/ecs"
)
// 阀门开关
// ElectricControlValve 电动调节阀
// 具体异常
//
// 电动风阀、电动调节阀、组合式风阀、电动两通调节阀、电动蝶阀
type ElectricControlValve struct {
Opened bool //true-开到位
Closed bool //true-关到位
Moving bool //true-正在动作
OpenRate uint8 //开度
}
// ElectricControlValveOperationTime 电动调节阀动作耗时ms
const ElectricControlValveOperationTime int = 4000
// ControlValve 调节阀(手动)
type ControlValve struct {
OpenRate uint8 //开度0-100%
}
var (
ElectricControlValveType = ecs.NewComponentType[ElectricControlValve]()
ElectricAirValveTag = ecs.NewTag() //电动风阀标签
CombinationAirValveTag = ecs.NewTag() //组合式风阀
ElectricTwoWayValveTag = ecs.NewTag() //电动两通调节阀
ElectricButterflyValveTag = ecs.NewTag() //电动蝶阀
ControlValveType = ecs.NewComponentType[ControlValve]()
BypassValveSwitchTag = ecs.NewTag() //旁通阀开关(ControlValve)
)