本文整理汇总了Python中Modules.Core.Utilities.xml_tools.PutGetXML.put_coords_element方法的典型用法代码示例。如果您正苦于以下问题:Python PutGetXML.put_coords_element方法的具体用法?Python PutGetXML.put_coords_element怎么用?Python PutGetXML.put_coords_element使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Modules.Core.Utilities.xml_tools.PutGetXML
的用法示例。
在下文中一共展示了PutGetXML.put_coords_element方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: write_one_room
# 需要导入模块: from Modules.Core.Utilities.xml_tools import PutGetXML [as 别名]
# 或者: from Modules.Core.Utilities.xml_tools.PutGetXML import put_coords_element [as 别名]
def write_one_room(p_room_object):
l_entry = XmlConfigTools.write_base_UUID_object_xml('Room', p_room_object)
PutGetXML.put_text_element(l_entry, 'Comment', p_room_object.Comment)
PutGetXML.put_coords_element(l_entry, 'Corner', p_room_object.Corner)
PutGetXML.put_text_element(l_entry, 'Floor', p_room_object.Floor)
PutGetXML.put_date_time_element(l_entry, 'LastUpdate', p_room_object.LastUpdate)
PutGetXML.put_coords_element(l_entry, 'Size', p_room_object.Size)
PutGetXML.put_text_element(l_entry, 'RoomType', p_room_object.RoomType)
return l_entry
示例2: _write_light_data
# 需要导入模块: from Modules.Core.Utilities.xml_tools import PutGetXML [as 别名]
# 或者: from Modules.Core.Utilities.xml_tools.PutGetXML import put_coords_element [as 别名]
def _write_light_data(p_obj, p_xml):
PutGetXML.put_text_element(p_xml, 'Comment', p_obj.Comment)
PutGetXML.put_text_element(p_xml, 'Brightness', p_obj.BrightnessPct)
PutGetXML.put_text_element(p_xml, 'IsDimmable', p_obj.IsDimmable)
PutGetXML.put_int_element(p_xml, 'DeviceType', p_obj.DeviceType)
PutGetXML.put_int_element(p_xml, 'DeviceSubType', p_obj.DeviceSubType)
PutGetXML.put_text_element(p_xml, 'RoomName', p_obj.RoomName)
PutGetXML.put_uuid_element(p_xml, 'RoomUUID', p_obj.RoomUUID)
PutGetXML.put_coords_element(p_xml, 'RoomCoords', p_obj.RoomCoords)
return p_xml
示例3: write_base_device_object_xml
# 需要导入模块: from Modules.Core.Utilities.xml_tools import PutGetXML [as 别名]
# 或者: from Modules.Core.Utilities.xml_tools.PutGetXML import put_coords_element [as 别名]
def write_base_device_object_xml(p_element_tag, p_obj):
"""
@param p_element_tag: is the element name that we are going to create.
@param p_obj: is the object that contains the device data for which we will output the XML
@return: the XML element with children that we will create.
"""
# l_elem = ET.Element(p_element_tag)
l_elem = XmlConfigTools.write_base_UUID_object_xml(p_element_tag, p_obj)
PutGetXML.put_text_attribute(l_elem, 'Name', p_obj.Name)
PutGetXML.put_int_attribute(l_elem, 'Key', p_obj.Key)
PutGetXML.put_bool_attribute(l_elem, 'Active', p_obj.Active)
# add sub elements
PutGetXML.put_text_element(l_elem, 'Comment', p_obj.Comment)
PutGetXML.put_text_element(l_elem, 'DeviceFamily', p_obj.DeviceFamily)
PutGetXML.put_int_element(l_elem, 'DeviceType', p_obj.DeviceType)
PutGetXML.put_int_element(l_elem, 'DeviceSubType', p_obj.DeviceSubType)
PutGetXML.put_coords_element(l_elem, 'RoomCoords', p_obj.RoomCoords)
PutGetXML.put_text_element(l_elem, 'RoomName', p_obj.RoomName)
PutGetXML.put_text_element(l_elem, 'RoomUUID', p_obj.RoomUUID)
return l_elem
示例4: write_room_reference_xml
# 需要导入模块: from Modules.Core.Utilities.xml_tools import PutGetXML [as 别名]
# 或者: from Modules.Core.Utilities.xml_tools.PutGetXML import put_coords_element [as 别名]
def write_room_reference_xml(p_obj, p_xml):
PutGetXML.put_coords_element(p_xml, 'RoomCoords', p_obj.RoomCoords)
PutGetXML.put_text_element(p_xml, 'RoomName', p_obj.RoomName)
PutGetXML.put_text_element(p_xml, 'RoomUUID', p_obj.RoomUUID)
return p_xml