ISCS火警系统ecs定义

This commit is contained in:
xzb 2023-12-15 14:24:14 +08:00
parent c103a41f86
commit 73501bf793
4 changed files with 22 additions and 18 deletions

View File

@ -78,6 +78,8 @@ const (
type GasFireExtinguisher struct {
State GfeState //气体灭火器状态
Exception consts.DeviceExceptionEnum //具体异常-故障、异常、通信中断
Release bool //true-气体释放
Auto bool //true-自动false-手动
}
// GfeState 气体灭火器状态
@ -174,8 +176,7 @@ type PumpStartButton struct {
// TemperatureSensingCable 感温电缆
type TemperatureSensingCable struct {
Normal bool //true-正常
FireAlarm bool //true-火警
State FdState //正常、火警故障
Exception consts.DeviceExceptionEnum //具体异常-故障、异常、通信中断
}
@ -183,8 +184,8 @@ type TemperatureSensingCable struct {
//
// 1、一般电梯应有的消防功能。归首的意思是指回归首层。2、该功能也就是说电梯在上行过程中如果一旦触发了消防开关电梯就立即返回基站也就是归首层
type ElevatorToOriginalPosModule struct {
Normal bool //true-正常
Exception consts.DeviceExceptionEnum //具体异常-火警故障、故障、异常、通信中断
State FdState //正常、火警故障
Exception consts.DeviceExceptionEnum //具体异常-故障、异常、通信中断
}
////////////////////////////////////////////
@ -193,23 +194,33 @@ type ElevatorToOriginalPosModule struct {
//
// 当烟气温度达到280℃时人已基本疏散完毕排烟已无实际意义而烟气中此时已带火阀门自动关闭以避免火势蔓延
type FireDamper struct {
Normal bool //true-正常
Isolate bool //true-隔离
Exception consts.DeviceExceptionEnum //具体异常-火警故障、故障、异常、通信中断
State FdState //正常、隔离、火警故障
Exception consts.DeviceExceptionEnum //具体异常-故障、异常、通信中断
Closed bool //true-防火阀关闭false-防火阀打开(常态)
}
// ElectricSmokeFireDamper 电动防烟防火阀
type ElectricSmokeFireDamper struct {
Normal bool //true-正常
Exception consts.DeviceExceptionEnum //具体异常-火警故障、故障、异常、通信中断
State FdState //正常、火警故障
Exception consts.DeviceExceptionEnum //具体异常-故障、异常、通信中断
Closed bool //true-防火阀关闭false-防火阀打开(常态)
}
// FdState 防火阀状态定义
type FdState = uint8
const (
FdNormal FdState = iota //正常
FdIsolate //隔离
FdFireAlarm //火警故障(烟气温度超过阈值使阀门关闭)
)
////////////////////////////////////////////
// FireInterconnectionSignal 火灾互联互通信号
type FireInterconnectionSignal struct {
Normal bool //true-正常
Exception consts.DeviceExceptionEnum //具体异常-火警故障、故障、异常、通信中断
State FdState //正常、火警故障
Exception consts.DeviceExceptionEnum //具体异常-故障、异常、通信中断
}
/////////////////////////////////////////////

View File

@ -166,7 +166,6 @@ var (
DeviceAlarmTag = ecs.NewTag() //报警 有事故信号产生
DeviceStartTimeoutTag = ecs.NewTag() //启动超时
DeviceModuleFaultTag = ecs.NewTag() //模块故障
DeviceFireAlarmMalfunctionTag = ecs.NewTag() //火警故障
)
// 设备置牌标签定义

View File

@ -11,5 +11,4 @@ const (
DeviceAlarm //报警 有事故信号产生
DeviceStartTimeout //启动超时
DeviceModuleFault //模块故障
DeviceFireAlarmMalfunction //火警故障
)

View File

@ -93,7 +93,6 @@ const (
DeviceExceptionAlarm //报警 有事故信号产生
DeviceExceptionStartTimeout //启动超时
DeviceExceptionModuleFault //模块故障
DeviceExceptionFireAlarmMalfunction //火警故障
)
// DeviceExceptionOperate 设备例外操作
@ -111,7 +110,6 @@ func DeviceExceptionOperate(w ecs.World, deviceId string, opt DeviceExceptionOpt
deviceEntry.RemoveComponent(component.DeviceAlarmTag)
deviceEntry.RemoveComponent(component.DeviceStartTimeoutTag)
deviceEntry.RemoveComponent(component.DeviceModuleFaultTag)
deviceEntry.RemoveComponent(component.DeviceFireAlarmMalfunctionTag)
}
//
switch opt {
@ -133,9 +131,6 @@ func DeviceExceptionOperate(w ecs.World, deviceId string, opt DeviceExceptionOpt
case DeviceExceptionModuleFault:
clearAllExceptions(deviceEntry)
deviceEntry.AddComponent(component.DeviceModuleFaultTag)
case DeviceExceptionFireAlarmMalfunction:
clearAllExceptions(deviceEntry)
deviceEntry.AddComponent(component.DeviceFireAlarmMalfunctionTag)
default:
clearAllExceptions(deviceEntry)
}