rts-sim-module/component/iscs_bas_pump.go

31 lines
825 B
Go
Raw Normal View History

package component
import (
"joylink.club/ecs"
"joylink.club/rtsssimulation/consts"
)
// WaterPump 水泵
// 如:冷冻水泵、冷却水循环泵、超声波型水泵、浮球型水泵
type WaterPump struct {
Running bool //true-正常运行false-停止
Exception consts.DeviceExceptionEnum //具体异常
}
// FloatBallSwitch 浮球控制的开关,用于浮球型水泵
// 浮球由水箱水位控制
type FloatBallSwitch struct {
On bool //true-水位超过某个限度后开关开启false-开关关闭
}
// WaterTank 水池、水箱
type WaterTank struct {
Value int32 //水位单位mm
}
var (
WaterPumpType = ecs.NewComponentType[WaterPump]()
FloatBallSwitchType = ecs.NewComponentType[FloatBallSwitch]()
WaterTankType = ecs.NewComponentType[WaterTank]()
)