本文整理汇总了Python中Modules.Utilities.xml_tools.PutGetXML.get_coords_from_xml方法的典型用法代码示例。如果您正苦于以下问题:Python PutGetXML.get_coords_from_xml方法的具体用法?Python PutGetXML.get_coords_from_xml怎么用?Python PutGetXML.get_coords_from_xml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Modules.Utilities.xml_tools.PutGetXML
的用法示例。
在下文中一共展示了PutGetXML.get_coords_from_xml方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _read_device_latest
# 需要导入模块: from Modules.Utilities.xml_tools import PutGetXML [as 别名]
# 或者: from Modules.Utilities.xml_tools.PutGetXML import get_coords_from_xml [as 别名]
def _read_device_latest(p_device_obj, p_entry_xml):
"""
"""
p_device_obj.Comment = PutGetXML.get_text_from_xml(p_entry_xml, 'Comment')
p_device_obj.DeviceFamily = PutGetXML.get_text_from_xml(p_entry_xml, 'DeviceFamily')
p_device_obj.DeviceType = PutGetXML.get_int_from_xml(p_entry_xml, 'DeviceType')
p_device_obj.DeviceSubType = PutGetXML.get_int_from_xml(p_entry_xml, 'DeviceSubType')
p_device_obj.LightingType = PutGetXML.get_text_from_xml(p_entry_xml, 'LightingType')
p_device_obj.RoomCoords = PutGetXML.get_coords_from_xml(p_entry_xml, 'RoomCoords')
p_device_obj.RoomName = PutGetXML.get_text_from_xml(p_entry_xml, 'RoomName')
return p_device_obj
示例2: _read_device_v1_3
# 需要导入模块: from Modules.Utilities.xml_tools import PutGetXML [as 别名]
# 或者: from Modules.Utilities.xml_tools.PutGetXML import get_coords_from_xml [as 别名]
def _read_device_v1_3(p_device_obj, p_entry_xml):
"""
Read the XML file version 1.3 - convert to 1.4
"""
p_device_obj.Comment = ''
p_device_obj.DeviceFamily = PutGetXML.get_text_from_xml(p_entry_xml, 'ControllerFamily')
p_device_obj.DeviceType = 1
p_device_obj.DeviceSubType = 0
p_device_obj.LightingType = PutGetXML.get_text_from_xml(p_entry_xml, 'LightingType')
p_device_obj.RoomCoords = PutGetXML.get_coords_from_xml(p_entry_xml, 'Coords')
p_device_obj.RoomName = PutGetXML.get_text_from_xml(p_entry_xml, 'RoomName')
return p_device_obj
示例3: read_base_device_object_xml
# 需要导入模块: from Modules.Utilities.xml_tools import PutGetXML [as 别名]
# 或者: from Modules.Utilities.xml_tools.PutGetXML import get_coords_from_xml [as 别名]
def read_base_device_object_xml(p_obj, p_xml):
"""
Get the BaseObject entries from the XML element.
@param p_obj: is the object we wish to populate with data
@param p_xml: is the element we will extract data from (including children).
"""
try:
p_obj.Name = PutGetXML.get_text_from_xml(p_xml, "Name", "Missing Name")
p_obj.Key = PutGetXML.get_int_from_xml(p_xml, "Key", 0)
p_obj.Active = PutGetXML.get_bool_from_xml(p_xml, "Active", False)
p_obj.Comment = PutGetXML.get_text_from_xml(p_xml, "Comment")
p_obj.DeviceFamily = PutGetXML.get_text_from_xml(p_xml, "DeviceFamily")
p_obj.DeviceType = PutGetXML.get_int_from_xml(p_xml, "DeviceType")
p_obj.DeviceSubType = PutGetXML.get_int_from_xml(p_xml, "DeviceSubType")
p_obj.RoomCoords = PutGetXML.get_coords_from_xml(p_xml, "RoomCoords")
p_obj.RoomName = PutGetXML.get_text_from_xml(p_xml, "RoomName")
p_obj.UUID = PutGetXML.get_uuid_from_xml(p_xml, "UUID")
except Exception as e_err:
LOG.warn("ERROR in xml_tools.read_base_obj_xml() - {}".format(e_err))
print(e_err)
return p_obj