rts-sim-module/component/iscs_fas.go
2023-12-14 16:17:54 +08:00

242 lines
9.4 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package component
import (
"joylink.club/ecs"
"joylink.club/rtsssimulation/consts"
)
// NetworkHost 网络设备、网络主机等
type NetworkHost struct {
Normal bool //true-正常
Exception consts.DeviceExceptionEnum //具体异常-故障、通信中断
}
///////////////////////////////
// SmokeDetector 烟感
//
// 隔离模块可以防止其他设备的故障或干扰对烟感系统的正常运行产生影响;
// 当消防主机外部设备(探测器、模块或火灾显示盘)发生故障时,可将它隔离掉,待修理或更换后,再利用取消隔离功能将设备恢复
//
// 输入模块可以接收其他设备(如手动火警按钮、温度探测器等)的信号输入,从而实现联动控制或触发火警报警
//
// 输出模块可以控制其他设备(如声光报警器、喷淋系统等)的操作,以及向其他系统发送报警信息
type SmokeDetector struct {
Normal bool //true-正常
Act StaAct //烟感动作
Exception consts.DeviceExceptionEnum //具体异常-故障、通信中断
}
// StaAct 烟感或温感动作定义
type StaAct = uint8
const (
StaNon StaAct = iota //正常
StaFireAlarm //火警
StaIsolate //隔离
StaEarlyWarn //预警
)
/////////////////////////////////////
// TemperatureDetector 温感
type TemperatureDetector struct {
Normal bool //true-正常
Act StaAct //温感动作
Exception consts.DeviceExceptionEnum //具体异常-故障、通信中断
}
/////////////////////////////////////////
// ManualFireAlarmButton 手动火灾报警按钮
type ManualFireAlarmButton struct {
Normal bool //true-正常
Act MfabAct //手动火灾报警按钮动作
Exception consts.DeviceExceptionEnum //具体异常-故障、通信中断
}
// MfabAct 手动火灾报警按钮动作定义
type MfabAct = uint8
const (
MfabNon MfabAct = iota //正常
MfabFireAlarm //火警
MfabIsolate //隔离
)
/////////////////////////////////////
// GasFireExtinguisher 气体灭火
type GasFireExtinguisher struct {
Normal bool //true-正常
Act GfeAct //气体灭火动作
Exception consts.DeviceExceptionEnum //具体异常-故障、异常、通信中断
}
// GfeAct 气体灭火动作定义
type GfeAct = uint8
const (
GfeNon GfeAct = iota //正常
GfeIsolate //隔离
GfeEarlyWarn //预警
GfeAlarm //报警
)
////////////////////////////////////////
// AlarmBell 警铃
type AlarmBell struct {
Normal bool //true-正常
Act AbAct //警铃动作
Exception consts.DeviceExceptionEnum //具体异常-模块故障、异常、通信中断
}
// AbAct 警铃动作定义
type AbAct = uint8
const (
AbaNon AbAct = iota //正常
AbaAlarm //报警
AbaIsolate //隔离
)
////////////////////////////////////////
// FireRollerShutter 防火卷帘(隔断型防火卷帘、疏散型防火卷帘)
type FireRollerShutter struct {
Normal bool //true-正常
Act FrsAct //防火卷帘动作
Exception consts.DeviceExceptionEnum //具体异常-异常、通信中断
}
// FrsAct 防火卷帘动作定义
type FrsAct = uint8
const (
FrsNon FrsAct = iota //正常
FrsAlarm //报警
FrsFullFall //全降
FrsHalfFall //半降
)
/////////////////////////////////////////
// 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 {
Normal bool //true-正常
FireAlarm bool //true-火警
Exception consts.DeviceExceptionEnum //具体异常-故障、异常、通信中断
}
// ElevatorToOriginalPosModule 电梯归首功能模块
//
// 1、一般电梯应有的消防功能。归首的意思是指回归首层。2、该功能也就是说电梯在上行过程中如果一旦触发了消防开关电梯就立即返回基站也就是归首层
type ElevatorToOriginalPosModule struct {
Normal bool //true-正常
Exception consts.DeviceExceptionEnum //具体异常-火警故障、故障、异常、通信中断
}
////////////////////////////////////////////
// FireDamper 防火阀
//
// 当烟气温度达到280℃时人已基本疏散完毕排烟已无实际意义而烟气中此时已带火阀门自动关闭以避免火势蔓延
type FireDamper struct {
Normal bool //true-正常
Isolate bool //true-隔离
Exception consts.DeviceExceptionEnum //具体异常-火警故障、故障、异常、通信中断
}
// ElectricSmokeFireDamper 电动防烟防火阀
type ElectricSmokeFireDamper struct {
Normal bool //true-正常
Exception consts.DeviceExceptionEnum //具体异常-火警故障、故障、异常、通信中断
}
////////////////////////////////////////////
// FireInterconnectionSignal 火灾互联互通信号
type FireInterconnectionSignal struct {
Normal bool //true-正常
Exception consts.DeviceExceptionEnum //具体异常-火警故障、故障、异常、通信中断
}
/////////////////////////////////////////////
var (
PartitionTypeFireRollerShutterTag = ecs.NewTag() //隔断型防火卷帘
EvacuationTypeFireRollerShutterTag = ecs.NewTag() //疏散型防火卷帘
FirePumpTag = ecs.NewTag() //消防泵
SprayPumpTag = ecs.NewTag() //喷淋泵
StabilizedPressurePumpTag = ecs.NewTag() //稳压泵
SignalButterflyValveTag = ecs.NewTag() //信号蝶阀
PressureSwitchTag = ecs.NewTag() //压力开关是与电器开关相结合的装置,当到达预先设定的流体压力时,开关接点动作
)
var (
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]() //火灾互联互通信号
)