rts-sim-module/entity/iscs_load.go

93 lines
2.4 KiB
Go
Raw Normal View History

2023-12-20 15:22:36 +08:00
package entity
2023-12-20 16:01:08 +08:00
import (
"joylink.club/ecs"
)
2023-12-20 15:22:36 +08:00
// LoadIscs 加载ISCS相关设备实体
func LoadIscs(w ecs.World) error {
data := GetWorldData(w)
2023-12-20 16:01:08 +08:00
//电力母线实体
2023-12-20 15:22:36 +08:00
for _, pipe := range data.Repo.PipeMap {
2024-01-05 11:30:39 +08:00
NewPipeEntity(w, pipe.Id())
2023-12-20 16:01:08 +08:00
}
//断路器
for _, circuitBreaker := range data.Repo.CircuitBreakerMap {
NewCircuitBreakerEntity(w, circuitBreaker.Id())
}
//三工位开关
for _, tps := range data.Repo.ThreePositionSwitchMap {
NewThreePositionSwitchEntity(w, tps.Id())
}
//手车
for _, hs := range data.Repo.HandcartSwitchMap {
NewHandcartSwitchEntity(w, hs.Id())
}
//整流器
for _, rectifier := range data.Repo.RectifierMap {
NewRectifierEntity(w, rectifier.Id())
}
//隔离开关
for _, disconnector := range data.Repo.DisconnectorMap {
NewDisconnectorEntity(w, disconnector.Id())
}
//变压器
for _, vt := range data.Repo.VoltageTransformerMap {
NewVoltageTransformerEntity(w, vt.Id())
}
//电源
for _, ps := range data.Repo.PowerSourceMap {
2024-01-05 11:30:39 +08:00
NewPowerSourceEntity(w, ps.Id())
2023-12-20 15:22:36 +08:00
}
//避雷器
for _, la := range data.Repo.LightningArresterMap {
NewLightningArresterEntity(w, la.Id())
}
//接地装置
for _, ed := range data.Repo.EarthingDeviceMap {
NewEarthingDeviceEntity(w, ed.Id())
}
2023-12-22 15:29:57 +08:00
//网络交换机
for _, networkSwitch := range data.Repo.NetworkSwitchMap {
NewNetworkSwitchEntity(w, networkSwitch.Id())
}
2023-12-22 15:50:47 +08:00
//线柜
for _, wc := range data.Repo.WireCabinetMap {
NewWireCabinetEntity(w, wc.Id())
}
2023-12-25 17:31:35 +08:00
//风亭(排风亭、送风亭)
for _, ap := range data.Repo.AirPavilionMap {
NewAirPavilionEntity(w, ap.Id(), ap.PavilionType)
}
//阀门
for _, valve := range data.Repo.ValveMap {
NewValveEntity(w, valve.Id(), valve.ValveType)
}
//混合室静压箱
for _, gmc := range data.Repo.GasMixingChamberMap {
NewGasMixingChamberEntity(w, gmc.Id())
}
//组合式空调
for _, cac := range data.Repo.CombinationAirConditionerMap {
NewCombinationAirConditionerEntity(w, cac.Id())
}
//净化装置
for _, apd := range data.Repo.AirPurificationDeviceMap {
NewPurificationDeviceEntity(w, apd.Id())
}
//空气幕
for _, ac := range data.Repo.AirCurtainMap {
NewAirCurtainEntity(w, ac.Id())
}
//气体环境
2023-12-29 17:00:26 +08:00
for _, gasEnv := range data.Repo.EnvironmentMap {
2023-12-25 17:31:35 +08:00
NewGasEnvironmentEntity(w, gasEnv.Id())
}
//风机
for _, fan := range data.Repo.FanMap {
NewFanEntity(w, fan.Id(), fan.FanType)
}
2023-12-20 15:22:36 +08:00
//
return nil
}