Files
Stream_PHX_A7/Gateways/FE/projects/.resources/6f4826124331a53a96c40f83c3386f5e9500a6ece704a384e94f727bc35edd5c

35 lines
1.0 KiB
Plaintext

locBasePath= {"DH1":"[Ignition_Common_IO_Gtwy]DH1/SATB1_DH1_PNL24_",
"DH2":"[Ignition_Common_IO_Gtwy]DH2/SATB1_DH2_PNL22_",
"DH3":"[Ignition_Common_IO_Gtwy]DH3/SATB1_DH3_PNL18_",
"DH4":"[Ignition_Common_IO_Gtwy]DH4/SATB1_DH4_PNL20_",
"DH5":"[Ignition_Common_IO_Gtwy]DH5/SATB1_DH5_PNL16_",
}
def loopConstructPaths(basePath, pfx):
tagList = []
for aisle in range(1,22):
for pos in range(1,4):
# print aisle, pos
fullPath = basePath+"C%s_%s%s/Val"%(aisle, pfx, str(pos).zfill(2))
tagList.append(fullPath)
return tagList
"""
Generate the tagpaths needed for a particular cold aisle tags for a location
Args:
location: str (DH1-DH5)
sensorType: str (temp or humidity)
Returns:
list of strings of paths
"""
def generateTags(location, sensorType):
finalTags = []
sensorPfx = "TT" if sensorType == "temp" else "HT"
if location is None:
for k,v in locBasePath.iteritems():
finalTags.extend(loopConstructPaths(v,sensorPfx))
else:
finalTags.extend(loopConstructPaths(locBasePath[location],sensorPfx))
return finalTags