93 lines
2.4 KiB
Go
93 lines
2.4 KiB
Go
package entity
|
|
|
|
import (
|
|
"joylink.club/ecs"
|
|
)
|
|
|
|
// LoadIscs 加载ISCS相关设备实体
|
|
func LoadIscs(w ecs.World) error {
|
|
data := GetWorldData(w)
|
|
//电力母线实体
|
|
for _, pipe := range data.Repo.PipeMap {
|
|
NewPipeEntity(w, pipe.Id())
|
|
}
|
|
//断路器
|
|
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 {
|
|
NewPowerSourceEntity(w, ps.Id())
|
|
}
|
|
//避雷器
|
|
for _, la := range data.Repo.LightningArresterMap {
|
|
NewLightningArresterEntity(w, la.Id())
|
|
}
|
|
//接地装置
|
|
for _, ed := range data.Repo.EarthingDeviceMap {
|
|
NewEarthingDeviceEntity(w, ed.Id())
|
|
}
|
|
//网络交换机
|
|
for _, networkSwitch := range data.Repo.NetworkSwitchMap {
|
|
NewNetworkSwitchEntity(w, networkSwitch.Id())
|
|
}
|
|
//线柜
|
|
for _, wc := range data.Repo.WireCabinetMap {
|
|
NewWireCabinetEntity(w, wc.Id())
|
|
}
|
|
//风亭(排风亭、送风亭)
|
|
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())
|
|
}
|
|
//气体环境
|
|
for _, gasEnv := range data.Repo.EnvironmentMap {
|
|
NewGasEnvironmentEntity(w, gasEnv.Id())
|
|
}
|
|
//风机
|
|
for _, fan := range data.Repo.FanMap {
|
|
NewFanEntity(w, fan.Id(), fan.FanType)
|
|
}
|
|
//
|
|
return nil
|
|
}
|