2023-12-12 13:08:37 +08:00
|
|
|
|
package component
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"joylink.club/ecs"
|
|
|
|
|
)
|
|
|
|
|
|
2023-12-25 17:31:35 +08:00
|
|
|
|
// Valve 阀门开关(电动调节阀、电动风阀、组合式风阀、电动蝶阀)
|
|
|
|
|
type Valve struct {
|
|
|
|
|
Opened bool //true-开到位(全开)
|
|
|
|
|
Closed bool //true-关到位(全关)
|
2023-12-19 11:11:27 +08:00
|
|
|
|
Moving bool //true-正在动作
|
2023-12-13 14:54:23 +08:00
|
|
|
|
OpenRate uint8 //开度,0-100%
|
|
|
|
|
}
|
|
|
|
|
|
2023-12-12 13:08:37 +08:00
|
|
|
|
var (
|
2023-12-25 17:31:35 +08:00
|
|
|
|
ValveType = ecs.NewComponentType[Valve]() //阀门(开关)
|
|
|
|
|
ElectricControlValveTag = ecs.NewTag() //电动调节阀
|
|
|
|
|
ElectricAirValveTag = ecs.NewTag() //电动风阀标签
|
|
|
|
|
CombinationAirValveTag = ecs.NewTag() //组合式风阀
|
|
|
|
|
ElectricButterflyValveTag = ecs.NewTag() //电动蝶阀
|
2023-12-12 13:08:37 +08:00
|
|
|
|
)
|