53 lines
1.9 KiB
Go
53 lines
1.9 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 //风机异常
|
||
Hand bool //true-设备旁有手型图标
|
||
}
|
||
|
||
// AirConditionerGroup 空调群控系统
|
||
type AirConditionerGroup struct {
|
||
Acs []*ecs.Entry //空调群
|
||
GroupRunning bool //true-空调群中所有空调正常运行
|
||
Exception consts.DeviceExceptionEnum //空调群异常
|
||
}
|
||
|
||
var (
|
||
FanType = ecs.NewComponentType[Fan]() //风机
|
||
FanStateType = ecs.NewComponentType[FanState]()
|
||
|
||
TwoSpeedFanTag = ecs.NewTag() //双速风机标签
|
||
LowSpeedModeFanTag = ecs.NewTag() //双速风机低速运行模式标签
|
||
HighSpeedModeFanTag = ecs.NewTag() //双速风机高速运行模式标签
|
||
|
||
AirConditionerTag = ecs.NewTag() //空调、空调器
|
||
CombinedAirConditionerTag = ecs.NewTag() //组合式空调
|
||
|
||
// HandTag 设备旁边的手型图标,手动含义?
|
||
HandTag = ecs.NewTag()
|
||
)
|