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


Python PutGetXML.get_ip_from_xml方法代码示例

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


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

示例1: _read_device

# 需要导入模块: from Modules.Core.Utilities.xml_tools import PutGetXML [as 别名]
# 或者: from Modules.Core.Utilities.xml_tools.PutGetXML import get_ip_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

示例2: _read_device

# 需要导入模块: from Modules.Core.Utilities.xml_tools import PutGetXML [as 别名]
# 或者: from Modules.Core.Utilities.xml_tools.PutGetXML import get_ip_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

示例3: _read_device

# 需要导入模块: from Modules.Core.Utilities.xml_tools import PutGetXML [as 别名]
# 或者: from Modules.Core.Utilities.xml_tools.PutGetXML import get_ip_from_xml [as 别名]
 def _read_device(p_entry_xml):
     """
     @param p_entry_xml: Element <Device> within <PandoraSection>
     @return: a PandoraDeviceData object
     """
     l_obj = PandoraDeviceData()
     XmlConfigTools.read_base_object_xml(l_obj, p_entry_xml)
     l_obj.Host = PutGetXML.get_ip_from_xml(p_entry_xml, 'Host')
     l_obj.ConnectionFamily = PutGetXML.get_text_from_xml(p_entry_xml, 'ConnectionFamily')
     l_obj.ConnectionName = PutGetXML.get_text_from_xml(p_entry_xml, 'ConnectionName').lower()
     l_obj.InputName = PutGetXML.get_text_from_xml(p_entry_xml, 'InputName')
     l_obj.InputCode = PutGetXML.get_text_from_xml(p_entry_xml, 'InputCode')
     l_obj.MaxPlayTime = PutGetXML.get_int_from_xml(p_entry_xml, 'MaxPlayTime')
     l_obj.Type = PutGetXML.get_text_from_xml(p_entry_xml, 'Type')
     l_obj.Volume = PutGetXML.get_int_from_xml(p_entry_xml, 'Volume')
     return l_obj
开发者ID:DBrianKimmel,项目名称:PyHouse,代码行数:18,代码来源:pandora.py

示例4: _read_one_bridge

# 需要导入模块: from Modules.Core.Utilities.xml_tools import PutGetXML [as 别名]
# 或者: from Modules.Core.Utilities.xml_tools.PutGetXML import get_ip_from_xml [as 别名]
    def _read_one_bridge(p_xml):
        """ Read all the information for a single Bridge device.
        Call specific bridge information readers for some types of bridges.

        @param p_xml: XML information for one Bridge.
        @return: an Bridge object filled in with data from the XML passed in
        """
        l_obj = BridgeData()
        try:
            XmlConfigTools.read_base_UUID_object_xml(l_obj, p_xml)  # Name Key Active
            l_obj.Connection = PutGetXML.get_text_from_xml(p_xml, 'Connection')
            l_obj.Type = Xml._read_type(p_xml)
            l_obj.IPv4Address = PutGetXML.get_ip_from_xml(p_xml, 'IPv4Address')
            l_obj.TcpPort = PutGetXML.get_int_from_xml(p_xml, 'Port')
            l_obj.UserName = PutGetXML.get_text_from_xml(p_xml, 'UserName')
            l_obj.Password = PutGetXML.get_text_from_xml(p_xml, 'Password')
            if l_obj.Type == "Hue":
                hueXML.ReadXml(l_obj, p_xml)
        except Exception:
            pass
        return l_obj
开发者ID:DBrianKimmel,项目名称:PyHouse,代码行数:23,代码来源:bridges_xml.py


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