当前位置: 首页>>代码示例>>Python>>正文


Python PutGetXML.get_uuid_from_xml方法代码示例

本文整理汇总了Python中Modules.Core.Utilities.xml_tools.PutGetXML.get_uuid_from_xml方法的典型用法代码示例。如果您正苦于以下问题:Python PutGetXML.get_uuid_from_xml方法的具体用法?Python PutGetXML.get_uuid_from_xml怎么用?Python PutGetXML.get_uuid_from_xml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Modules.Core.Utilities.xml_tools.PutGetXML的用法示例。


在下文中一共展示了PutGetXML.get_uuid_from_xml方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _read_one_lighting_schedule

# 需要导入模块: from Modules.Core.Utilities.xml_tools import PutGetXML [as 别名]
# 或者: from Modules.Core.Utilities.xml_tools.PutGetXML import get_uuid_from_xml [as 别名]
 def _read_one_lighting_schedule(p_schedule_element):
     """Extract schedule information from a schedule xml element.
     """
     l_obj = ScheduleLightData()
     l_obj.Level = PutGetXML.get_int_from_xml(p_schedule_element, 'Level')
     l_obj.LightName = PutGetXML.get_text_from_xml(p_schedule_element, 'LightName')
     l_obj.LightUUID = PutGetXML.get_uuid_from_xml(p_schedule_element, 'LightUUID')
     l_obj.Rate = PutGetXML.get_int_from_xml(p_schedule_element, 'Rate')
     l_obj.RoomName = PutGetXML.get_text_from_xml(p_schedule_element, 'RoomName')
     l_obj.RoomUUID = PutGetXML.get_uuid_from_xml(p_schedule_element, 'RoomUUID')
     return l_obj
开发者ID:DBrianKimmel,项目名称:PyHouse,代码行数:13,代码来源:schedule_xml.py

示例2: read_room_reference_xml

# 需要导入模块: from Modules.Core.Utilities.xml_tools import PutGetXML [as 别名]
# 或者: from Modules.Core.Utilities.xml_tools.PutGetXML import get_uuid_from_xml [as 别名]
def read_room_reference_xml(p_obj, p_xml):
    """ Since many different XML routines need this - it is factored out here.
    It will use the XML in a configuration file to gather the room information.
    @param p_obj: is the object that will have the room information from the XML added.
    @param p_xml: is the XML that has the room information as sub elements
    """
    p_obj.RoomCoords = PutGetXML.get_coords_from_xml(p_xml, 'RoomCoords')
    p_obj.RoomName = PutGetXML.get_text_from_xml(p_xml, 'RoomName')
    p_obj.RoomUUID = PutGetXML.get_uuid_from_xml(p_xml, 'RoomUUID')
    return p_obj
开发者ID:DBrianKimmel,项目名称:PyHouse,代码行数:12,代码来源:utils.py

示例3: _read_device

# 需要导入模块: from Modules.Core.Utilities.xml_tools import PutGetXML [as 别名]
# 或者: from Modules.Core.Utilities.xml_tools.PutGetXML import get_uuid_from_xml [as 别名]
 def _read_device(p_xml):
     l_device = SamsungDeviceData()
     XmlConfigTools.read_base_UUID_object_xml(l_device, p_xml)
     l_device.Installed = PutGetXML.get_text_from_xml(p_xml, 'Installed')
     l_device.IPv4 = PutGetXML.get_ip_from_xml(p_xml, 'IPv4')
     # l_device.Model = PutGetXML.get_text_from_xml(p_xml, 'Model')
     l_device.Port = PutGetXML.get_int_from_xml(p_xml, 'Port', 55000)
     l_device.RoomName = PutGetXML.get_text_from_xml(p_xml, 'RoomName')
     l_device.RoomUUID = PutGetXML.get_uuid_from_xml(p_xml, 'RoomUUID')
     l_device.Type = PutGetXML.get_text_from_xml(p_xml, 'Type')
     l_device.Volume = PutGetXML.get_int_from_xml(p_xml, 'Volume')
     return l_device
开发者ID:DBrianKimmel,项目名称:PyHouse,代码行数:14,代码来源:samsung.py

示例4: _read_light_data

# 需要导入模块: from Modules.Core.Utilities.xml_tools import PutGetXML [as 别名]
# 或者: from Modules.Core.Utilities.xml_tools.PutGetXML import get_uuid_from_xml [as 别名]
 def _read_light_data(_p_pyhouse_obj, p_obj, p_xml):
     p_obj.Comment = PutGetXML.get_text_from_xml(p_xml, 'Comment')
     if (p_xml.find('Brightness') != None):
         p_obj.BrightnessPct = PutGetXML.get_int_from_xml(p_xml, 'Brightness', 44)
     else:
         p_obj.BrightnessPct = PutGetXML.get_int_from_xml(p_xml, 'CurLevel', 45)
     p_obj.IsDimmable = PutGetXML.get_bool_from_xml(p_xml, 'IsDimmable', False)
     p_obj.DeviceType = PutGetXML.get_int_from_xml(p_xml, 'DeviceType', 41)
     p_obj.DeviceSubType = PutGetXML.get_int_from_xml(p_xml, 'DeviceSubType', 43)
     p_obj.RoomName = PutGetXML.get_text_from_xml(p_xml, 'RoomName')
     p_obj.RoomUUID = PutGetXML.get_uuid_from_xml(p_xml, 'RoomUUID')
     p_obj.RoomCoords = PutGetXML.get_coords_from_xml(p_xml, 'RoomCoords')
     return p_obj  # for testing
开发者ID:DBrianKimmel,项目名称:PyHouse,代码行数:15,代码来源:lighting_lights.py

示例5: _read_device

# 需要导入模块: from Modules.Core.Utilities.xml_tools import PutGetXML [as 别名]
# 或者: from Modules.Core.Utilities.xml_tools.PutGetXML import get_uuid_from_xml [as 别名]
    def _read_device(p_xml):
        """ Read an entire <Device> section of XML and fill in the OnkyoDeviceData Object

        @return: a completed OnkyoDeviceData object
        """
        l_device = OnkyoDeviceData()
        XmlConfigTools.read_base_UUID_object_xml(l_device, p_xml)
        l_device.IPv4 = PutGetXML.get_ip_from_xml(p_xml, 'IPv4')
        l_device.Port = PutGetXML.get_int_from_xml(p_xml, 'Port')
        l_device.RoomName = PutGetXML.get_text_from_xml(p_xml, 'RoomName')
        l_device.RoomUUID = PutGetXML.get_uuid_from_xml(p_xml, 'RoomUUID')
        l_device.Type = PutGetXML.get_text_from_xml(p_xml, 'Type')
        l_device.Volume = PutGetXML.get_int_from_xml(p_xml, 'Volume')
        return l_device
开发者ID:DBrianKimmel,项目名称:PyHouse,代码行数:16,代码来源:onkyo.py


注:本文中的Modules.Core.Utilities.xml_tools.PutGetXML.get_uuid_from_xml方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。