2023-12-14 13:33:18 +08:00
|
|
|
|
package component
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"joylink.club/ecs"
|
|
|
|
|
"joylink.club/rtsssimulation/consts"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// NetworkHost 网络设备、网络主机等
|
|
|
|
|
type NetworkHost struct {
|
|
|
|
|
Normal bool //true-正常
|
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-故障、通信中断
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
///////////////////////////////
|
|
|
|
|
|
|
|
|
|
// SmokeDetector 烟感
|
|
|
|
|
//
|
|
|
|
|
// 隔离模块可以防止其他设备的故障或干扰对烟感系统的正常运行产生影响;
|
|
|
|
|
// 当消防主机外部设备(探测器、模块或火灾显示盘)发生故障时,可将它隔离掉,待修理或更换后,再利用取消隔离功能将设备恢复
|
|
|
|
|
//
|
|
|
|
|
// 输入模块可以接收其他设备(如手动火警按钮、温度探测器等)的信号输入,从而实现联动控制或触发火警报警
|
|
|
|
|
//
|
|
|
|
|
// 输出模块可以控制其他设备(如声光报警器、喷淋系统等)的操作,以及向其他系统发送报警信息
|
|
|
|
|
type SmokeDetector struct {
|
2023-12-15 13:34:22 +08:00
|
|
|
|
State StaState //烟感状态
|
2023-12-14 13:33:18 +08:00
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-故障、通信中断
|
2023-12-15 13:34:22 +08:00
|
|
|
|
Density uint16 //烟感周围烟气浓度,1=0.01%;一般为0.15-0.3%时会触发警报
|
2023-12-14 13:33:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-12-15 13:34:22 +08:00
|
|
|
|
// StaState 烟感或温感状态
|
|
|
|
|
type StaState = uint8
|
2023-12-14 13:33:18 +08:00
|
|
|
|
|
|
|
|
|
const (
|
2023-12-15 13:34:22 +08:00
|
|
|
|
StaNormal StaState = iota //正常
|
|
|
|
|
StaFireAlarm //火警
|
|
|
|
|
StaIsolate //隔离
|
|
|
|
|
StaEarlyWarn //预警
|
2023-12-14 13:33:18 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
// TemperatureDetector 温感
|
|
|
|
|
type TemperatureDetector struct {
|
2023-12-15 13:34:22 +08:00
|
|
|
|
State StaState //温感动作
|
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-故障、通信中断
|
|
|
|
|
Temperature int16 //温感周围温度,1=1摄氏度
|
2023-12-14 13:33:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
// ManualFireAlarmButton 手动火灾报警按钮
|
2023-12-15 13:34:22 +08:00
|
|
|
|
// 报警按钮有红色报警确认灯,报警按钮启动零件动作,报警确认灯点亮,并保持至报警状态被复位。
|
|
|
|
|
// 报警按钮形状有方形和长方形,颜色为红色(正常工作状态为闪烁状态,如果不闪烁说明设备损坏;如场所内所有设备都不亮说明消防系统被停用
|
|
|
|
|
//
|
|
|
|
|
// 按下手动报警按钮3-5s(最长不超过10s)后,手动报警按钮上的火警确认灯会点亮,这个状态灯表示火灾报警控制器已经收到火警信号,并且确认了现场位置。
|
|
|
|
|
// 控制室值班人员应第一时间前往现场确认火情;报警按钮一般有三种形式:吸盘复位型、钥匙复位和更换有机玻璃进行复位型。须人工复位。
|
|
|
|
|
//
|
|
|
|
|
// 报警后,如控制器在自动工作状态,声光报警器、消防广播、防火卷帘、防排烟系统等设备会动作,非消防电梯停止运行,切断该区域非消防用电……因此,非警勿动;
|
2023-12-14 13:33:18 +08:00
|
|
|
|
type ManualFireAlarmButton struct {
|
2023-12-15 13:34:22 +08:00
|
|
|
|
State MfabState //手动火灾报警按钮状态
|
2023-12-14 13:33:18 +08:00
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-故障、通信中断
|
2023-12-15 13:34:22 +08:00
|
|
|
|
Pressed bool //按钮按下
|
2023-12-14 13:33:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-12-15 13:34:22 +08:00
|
|
|
|
// MfabState 手动火灾报警按钮状态
|
|
|
|
|
type MfabState = uint8
|
2023-12-14 13:33:18 +08:00
|
|
|
|
|
|
|
|
|
const (
|
2023-12-15 13:34:22 +08:00
|
|
|
|
MfabNormal MfabState = iota //正常
|
|
|
|
|
MfabNon //未知
|
|
|
|
|
MfabFireAlarm //火警
|
|
|
|
|
MfabIsolate //隔离
|
2023-12-14 13:33:18 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
// GasFireExtinguisher 气体灭火
|
|
|
|
|
type GasFireExtinguisher struct {
|
2023-12-15 13:34:22 +08:00
|
|
|
|
State GfeState //气体灭火器状态
|
2023-12-14 13:33:18 +08:00
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-故障、异常、通信中断
|
2023-12-15 14:24:14 +08:00
|
|
|
|
Release bool //true-气体释放
|
|
|
|
|
Auto bool //true-自动;false-手动
|
2023-12-14 13:33:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-12-15 13:34:22 +08:00
|
|
|
|
// GfeState 气体灭火器状态
|
|
|
|
|
type GfeState = uint8
|
2023-12-14 13:33:18 +08:00
|
|
|
|
|
|
|
|
|
const (
|
2023-12-15 13:34:22 +08:00
|
|
|
|
GfeNormal GfeState = iota //正常
|
|
|
|
|
GfeIsolate //隔离
|
|
|
|
|
GfeEarlyWarn //预警
|
|
|
|
|
GfeAlarm //报警
|
2023-12-14 13:33:18 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
// AlarmBell 警铃
|
|
|
|
|
type AlarmBell struct {
|
2023-12-15 13:34:22 +08:00
|
|
|
|
State AbState //警铃状态
|
2023-12-14 13:33:18 +08:00
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-模块故障、异常、通信中断
|
|
|
|
|
}
|
|
|
|
|
|
2023-12-15 13:34:22 +08:00
|
|
|
|
// AbState 警铃状态
|
|
|
|
|
type AbState = uint8
|
2023-12-14 13:33:18 +08:00
|
|
|
|
|
|
|
|
|
const (
|
2023-12-15 13:34:22 +08:00
|
|
|
|
AbaNormal AbState = iota //正常
|
|
|
|
|
AbaAlarm //报警
|
|
|
|
|
AbaIsolate //隔离
|
2023-12-14 13:33:18 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
// FireRollerShutter 防火卷帘(隔断型防火卷帘、疏散型防火卷帘)
|
|
|
|
|
type FireRollerShutter struct {
|
2023-12-15 13:34:22 +08:00
|
|
|
|
State FrsState //防火卷帘状态
|
2023-12-14 13:33:18 +08:00
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-异常、通信中断
|
|
|
|
|
}
|
|
|
|
|
|
2023-12-15 13:34:22 +08:00
|
|
|
|
// FrsState 防火卷帘状态
|
|
|
|
|
type FrsState = uint8
|
2023-12-14 13:33:18 +08:00
|
|
|
|
|
|
|
|
|
const (
|
2023-12-15 13:34:22 +08:00
|
|
|
|
FrsNormal FrsState = iota //正常
|
|
|
|
|
FrsAlarm //报警
|
|
|
|
|
FrsFullFall //全降
|
|
|
|
|
FrsHalfFall //半降
|
2023-12-14 13:33:18 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////
|
|
|
|
|
|
2023-12-14 16:17:54 +08:00
|
|
|
|
// FasAcs 火警ACS联动
|
|
|
|
|
type FasAcs struct {
|
|
|
|
|
Normal bool //true-正常
|
|
|
|
|
Release bool //true-紧急释放
|
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-故障、异常、通信中断
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// FasAfc 火警AFC联动
|
|
|
|
|
type FasAfc struct {
|
|
|
|
|
Normal bool //true-正常
|
|
|
|
|
Release bool //true-紧急释放
|
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-故障、异常、通信中断
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
// NonFirePowerSource 非消防电源
|
|
|
|
|
type NonFirePowerSource struct {
|
|
|
|
|
Normal bool //true-正常
|
|
|
|
|
TurnOff bool //true-切除,关闭非消防电源,防止在救火时触电或漏电引起二次事故
|
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-故障、异常、通信中断
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
// WaterFlowIndicator 水流指示器
|
|
|
|
|
//
|
|
|
|
|
// 水流指示器是用于自动喷水灭火系统中将水流信号转换成电信号的一种水流报警装置。水流指示器的作用是能够及时报告火灾发生的部位。
|
|
|
|
|
type WaterFlowIndicator struct {
|
|
|
|
|
Normal bool //true-正常
|
|
|
|
|
Flowing bool //true-发出有水流动信号,表示某处有火灾
|
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-故障、异常、通信中断
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
// PumpStartButton 启泵按钮
|
|
|
|
|
type PumpStartButton struct {
|
|
|
|
|
Normal bool //true-正常
|
|
|
|
|
Pressed bool //true-动作,按钮按下
|
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-故障、异常、通信中断
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
// TemperatureSensingCable 感温电缆
|
|
|
|
|
type TemperatureSensingCable struct {
|
2023-12-15 14:24:14 +08:00
|
|
|
|
State FdState //正常、火警故障
|
2023-12-14 16:17:54 +08:00
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-故障、异常、通信中断
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ElevatorToOriginalPosModule 电梯归首功能模块
|
|
|
|
|
//
|
|
|
|
|
// 1、一般电梯应有的消防功能。归首的意思是指回归首层。2、该功能也就是说电梯在上行过程中,如果一旦触发了消防开关,电梯就立即返回基站(也就是归首层)
|
|
|
|
|
type ElevatorToOriginalPosModule struct {
|
2023-12-15 14:24:14 +08:00
|
|
|
|
State FdState //正常、火警故障
|
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-故障、异常、通信中断
|
2023-12-14 16:17:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
// FireDamper 防火阀
|
|
|
|
|
//
|
|
|
|
|
// 当烟气温度达到280℃时,人已基本疏散完毕,排烟已无实际意义,而烟气中此时已带火,阀门自动关闭,以避免火势蔓延
|
|
|
|
|
type FireDamper struct {
|
2023-12-15 14:24:14 +08:00
|
|
|
|
State FdState //正常、隔离、火警故障
|
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-故障、异常、通信中断
|
|
|
|
|
Closed bool //true-防火阀关闭;false-防火阀打开(常态)
|
2023-12-14 16:17:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ElectricSmokeFireDamper 电动防烟防火阀
|
|
|
|
|
type ElectricSmokeFireDamper struct {
|
2023-12-15 14:24:14 +08:00
|
|
|
|
State FdState //正常、火警故障
|
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-故障、异常、通信中断
|
|
|
|
|
Closed bool //true-防火阀关闭;false-防火阀打开(常态)
|
2023-12-14 16:17:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-12-15 14:24:14 +08:00
|
|
|
|
// FdState 防火阀状态定义
|
|
|
|
|
type FdState = uint8
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
FdNormal FdState = iota //正常
|
|
|
|
|
FdIsolate //隔离
|
|
|
|
|
FdFireAlarm //火警故障(烟气温度超过阈值使阀门关闭)
|
|
|
|
|
)
|
|
|
|
|
|
2023-12-14 16:17:54 +08:00
|
|
|
|
////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
// FireInterconnectionSignal 火灾互联互通信号
|
|
|
|
|
type FireInterconnectionSignal struct {
|
2023-12-15 14:24:14 +08:00
|
|
|
|
State FdState //正常、火警故障
|
|
|
|
|
Exception consts.DeviceExceptionEnum //具体异常-故障、异常、通信中断
|
2023-12-14 16:17:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
|
|
|
|
2023-12-14 13:33:18 +08:00
|
|
|
|
var (
|
|
|
|
|
PartitionTypeFireRollerShutterTag = ecs.NewTag() //隔断型防火卷帘
|
|
|
|
|
EvacuationTypeFireRollerShutterTag = ecs.NewTag() //疏散型防火卷帘
|
|
|
|
|
|
|
|
|
|
FirePumpTag = ecs.NewTag() //消防泵
|
|
|
|
|
SprayPumpTag = ecs.NewTag() //喷淋泵
|
|
|
|
|
StabilizedPressurePumpTag = ecs.NewTag() //稳压泵
|
2023-12-14 16:17:54 +08:00
|
|
|
|
|
|
|
|
|
SignalButterflyValveTag = ecs.NewTag() //信号蝶阀
|
|
|
|
|
PressureSwitchTag = ecs.NewTag() //压力开关是与电器开关相结合的装置,当到达预先设定的流体压力时,开关接点动作
|
2023-12-14 13:33:18 +08:00
|
|
|
|
)
|
|
|
|
|
var (
|
2023-12-14 16:17:54 +08:00
|
|
|
|
NetworkHostType = ecs.NewComponentType[NetworkHost]() //主机
|
|
|
|
|
SmokeDetectorType = ecs.NewComponentType[SmokeDetector]() //烟感
|
|
|
|
|
TemperatureDetectorType = ecs.NewComponentType[TemperatureDetector]() //温感
|
|
|
|
|
ManualFireAlarmButtonType = ecs.NewComponentType[ManualFireAlarmButton]() //手动火灾报警按钮
|
|
|
|
|
GasFireExtinguisherType = ecs.NewComponentType[GasFireExtinguisher]() //气体灭火
|
|
|
|
|
AlarmBellType = ecs.NewComponentType[AlarmBell]() //警铃
|
|
|
|
|
FireRollerShutterType = ecs.NewComponentType[FireRollerShutter]() //防火卷帘
|
|
|
|
|
FasAcsType = ecs.NewComponentType[FasAcs]() //火警ACS联动
|
|
|
|
|
FasAfcType = ecs.NewComponentType[FasAfc]() //火警AFC联动
|
|
|
|
|
NonFirePowerSourceType = ecs.NewComponentType[NonFirePowerSource]() //非消防电源
|
|
|
|
|
WaterFlowIndicatorType = ecs.NewComponentType[WaterFlowIndicator]() //水流指示器
|
|
|
|
|
PumpStartButtonType = ecs.NewComponentType[PumpStartButton]() //启泵按钮
|
|
|
|
|
TemperatureSensingCableType = ecs.NewComponentType[TemperatureSensingCable]() //感温电缆
|
|
|
|
|
ElevatorToOriginalPosModuleType = ecs.NewComponentType[ElevatorToOriginalPosModule]() //电梯归首
|
|
|
|
|
FireDamperType = ecs.NewComponentType[FireDamper]() //防火阀
|
|
|
|
|
ElectricSmokeFireDamperType = ecs.NewComponentType[ElectricSmokeFireDamper]() //电动防烟防火阀
|
|
|
|
|
FireInterconnectionSignalType = ecs.NewComponentType[FireInterconnectionSignal]() //火灾互联互通信号
|
2023-12-14 13:33:18 +08:00
|
|
|
|
)
|