39 lines
1.0 KiB
Go
39 lines
1.0 KiB
Go
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)
|
||
)
|