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


Python XBeeBase.apply_settings方法代码示例

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


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

示例1: probe

# 需要导入模块: from devices.xbee.xbee_devices.xbee_base import XBeeBase [as 别名]
# 或者: from devices.xbee.xbee_devices.xbee_base.XBeeBase import apply_settings [as 别名]
    def probe():
        """\
            Collect important information about the driver.

            .. Note::

                * This method is a static method.  As such, all data returned
                  must be accessible from the class without having a instance
                  of the device created.

            Returns a dictionary that must contain the following 2 keys:
                    1) address_table:
                       A list of XBee address tuples with the first part of the
                       address removed that this device might send data to.
                       For example: [ 0xe8, 0xc105, 0x95 ]
                    2) supported_products:
                       A list of product values that this driver supports.
                       Generally, this will consist of Product Types that
                       can be found in 'devices/xbee/common/prodid.py'
        """
        probe_data = XBeeBase.probe()

        for address in XBeeSerial.ADDRESS_TABLE:
            probe_data['address_table'].append(address)
        for product in XBeeSerial.SUPPORTED_PRODUCTS:
            probe_data['supported_products'].append(product)

        return probe_data

    ## Functions which must be implemented to conform to the DeviceBase
    ## interface:

        XBeeBase.apply_settings()
开发者ID:Lewiswight,项目名称:MistAway-Gateway,代码行数:35,代码来源:xbee_serialMCOGEN.py


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