49 lines
1.5 KiB
Go
49 lines
1.5 KiB
Go
package component
|
||
|
||
import (
|
||
"joylink.club/ecs"
|
||
)
|
||
|
||
//环境与设备监控系统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-双速风机之扇叶低速运转
|
||
}
|
||
|
||
// AirConditionerGroup 空调群控系统
|
||
// 具体异常-故障、异常、通信中断
|
||
type AirConditionerGroup struct {
|
||
Acs []*ecs.Entry //空调群
|
||
GroupRunning bool //true-空调群中所有空调正常运行
|
||
}
|
||
|
||
var (
|
||
FanType = ecs.NewComponentType[Fan]() //风机
|
||
FanStateType = ecs.NewComponentType[FanState]()
|
||
|
||
TwoSpeedFanTag = ecs.NewTag() //双速风机标签
|
||
LowSpeedModeFanTag = ecs.NewTag() //双速风机低速运行模式标签
|
||
HighSpeedModeFanTag = ecs.NewTag() //双速风机高速运行模式标签
|
||
|
||
AirConditionerTag = ecs.NewTag() //空调、空调器
|
||
CombinedAirConditionerTag = ecs.NewTag() //组合式空调
|
||
|
||
)
|