29 lines
874 B
Go
29 lines
874 B
Go
|
package component
|
|||
|
|
|||
|
import (
|
|||
|
"joylink.club/ecs"
|
|||
|
"joylink.club/rtsssimulation/consts"
|
|||
|
)
|
|||
|
|
|||
|
// ElectricControlValve 电动调节阀
|
|||
|
//
|
|||
|
// 电动风阀、电动调节阀、组合式风阀
|
|||
|
type ElectricControlValve struct {
|
|||
|
Opened bool //true-开到位
|
|||
|
Closed bool //true-关到位
|
|||
|
Moving bool //true-正在动作
|
|||
|
OpenRate uint8 //开度
|
|||
|
Exception consts.DeviceExceptionEnum //具体异常
|
|||
|
}
|
|||
|
|
|||
|
// ElectricControlValveOperationTime 电动调节阀动作耗时,ms
|
|||
|
const ElectricControlValveOperationTime int = 4000
|
|||
|
|
|||
|
var (
|
|||
|
ElectricControlValveType = ecs.NewComponentType[ElectricControlValve]()
|
|||
|
|
|||
|
ElectricAirValveTag = ecs.NewTag() //电动风阀标签
|
|||
|
CombinationAirValveTag = ecs.NewTag() //组合式风阀
|
|||
|
ElectricTwoWayValveTag = ecs.NewTag() //电动两通调节阀
|
|||
|
)
|