39 lines
1.4 KiB
Go
39 lines
1.4 KiB
Go
|
package component
|
|||
|
|
|||
|
import (
|
|||
|
"joylink.club/ecs"
|
|||
|
"joylink.club/rtsssimulation/consts"
|
|||
|
)
|
|||
|
|
|||
|
//环境与设备监控系统BAS 相关组件定义
|
|||
|
|
|||
|
// Fan 风机设备
|
|||
|
// 正转即顺时针转-排风;反转即逆时针转-进风
|
|||
|
type Fan struct {
|
|||
|
Fc bool //true-变频器开启
|
|||
|
Bypass bool //true-旁路开启
|
|||
|
SoftStart bool //true-软启开启
|
|||
|
Power int //风机电源,大于0接通正转相序电源,小于0接通反转相序电源,等于0关闭电源
|
|||
|
}
|
|||
|
|
|||
|
// FanState 面向用户的风机状态
|
|||
|
type FanState struct {
|
|||
|
Forward bool //true-正转;false-反转
|
|||
|
Running bool //true-运行;false-停止
|
|||
|
Fc bool //true-变频器开启
|
|||
|
Bypass bool //true-旁路开启
|
|||
|
SoftStart bool //true-软启开启
|
|||
|
HighSpeed bool //true-双速风机之扇叶高速运转
|
|||
|
SlowSpeed bool //true-双速风机之扇叶低速运转
|
|||
|
Exception consts.DeviceExceptionEnum //风机异常
|
|||
|
}
|
|||
|
|
|||
|
var (
|
|||
|
FanType = ecs.NewComponentType[Fan]() //风机
|
|||
|
FanStateType = ecs.NewComponentType[FanState]()
|
|||
|
|
|||
|
TwoSpeedFanTag = ecs.NewTag() //双速风机标签
|
|||
|
LowSpeedModeFanTag = ecs.NewTag() //双速风机低速运行模式标签
|
|||
|
HighSpeedModeFanTag = ecs.NewTag() //双速风机高速运行模式标签
|
|||
|
)
|