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


Python TestLib.bridgeAddress方法代码示例

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


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

示例1: writeIgloo

# 需要导入模块: import TestLib [as 别名]
# 或者: from TestLib import bridgeAddress [as 别名]
def writeIgloo(rm,slot,address,messageList):
    t.openRM(b,rm)
    b.write(0x00,[0x06])
    b.write(t.bridgeAddress(slot),[0x11,0x03,0,0,0])
    b.write(0x09,[address] + messageList)
    message = b.sendBatch()[-1]
    return t.reverseBytes(message)
开发者ID:caleb-james-smith,项目名称:QIETesting,代码行数:9,代码来源:igloo_test.py

示例2: readIgloo

# 需要导入模块: import TestLib [as 别名]
# 或者: from TestLib import bridgeAddress [as 别名]
def readIgloo(slot, address, num_bytes):
    b.write(0x00,[0x06])
    b.write(t.bridgeAddress(slot),[0x11,0x03,0,0,0])
    b.write(0x09,[address])
    b.read(0x09, num_bytes)
    message = b.sendBatch()[-1]
    return t.reverseBytes(message)
开发者ID:caleb-james-smith,项目名称:QIETesting,代码行数:9,代码来源:igloo_test.py

示例3: iglooReg

# 需要导入模块: import TestLib [as 别名]
# 或者: from TestLib import bridgeAddress [as 别名]
def iglooReg(bus,rm,slot,address,nbytes):
    t.openRM(rm)
    bus.write(0x00,[0x06])
    bus.write(t.bridgeAddress(slot),[0x11,0x03,0,0,0])
    bus.write(0x09,[address])
    bus.read(0x09,nbytes)
    return bus.sendBatch()
开发者ID:caleb-james-smith,项目名称:QIETesting,代码行数:9,代码来源:control_reg.py

示例4: getID

# 需要导入模块: import TestLib [as 别名]
# 或者: from TestLib import bridgeAddress [as 别名]
 def getID(self):
     # Reset entire board by writing 0x6 to 0x0.
     self.bus.write(0x00,[0x06])
     # Note that the i2c_select has register address 0x11
     # Value : 4 = 0x04 selects 0x50
     # Note that the SSN expects 32 bits (4 bytes) for writing (send 0x4, 0, 0, 0)
     self.bus.write(t.bridgeAddress(self.slot),[0x11,0x04,0,0,0])
     # Send 0x0 to 0x50 in order to set pointer for reading ID
     # This removes the permutation problem!
     self.bus.write(0x50,[0x00])
     self.bus.read(0x50,8)
     raw = self.bus.sendBatch()[-1]
     return raw
开发者ID:caleb-james-smith,项目名称:QIETesting,代码行数:15,代码来源:uniqueIDClass.py

示例5: readTempHumi

# 需要导入模块: import TestLib [as 别名]
# 或者: from TestLib import bridgeAddress [as 别名]
def readTempHumi(slot, num_bytes, key, hold, verbosity=0):
    bus.write(0x00,[0x06])
    bus.write(t.bridgeAddress(slot),[0x11,0x05,0,0,0])
    bus.write(0x40,[triggerDict[key][hold]])
    bus.read(0x40, num_bytes + 1) # also read checksum byte
    message = bus.sendBatch()[-1]

    check = Checksum(message,1)
    crc = check.result

    value = getValue(message)

    if verbosity > 1:
        print 'message: ', message
        print 'checksum: ', crc
        print 'value: ', value
    return [crc,function[key](value)]
开发者ID:caleb-james-smith,项目名称:QIETesting,代码行数:19,代码来源:temp.py

示例6: openIgloo

# 需要导入模块: import TestLib [as 别名]
# 或者: from TestLib import bridgeAddress [as 别名]
def openIgloo(rm,slot):
    t.openRM(b,rm)
    #the igloo is value "3" in I2C_SELECT table
    b.write(t.bridgeAddress(slot),[0x11,0x03,0,0,0])
    b.sendBatch()
开发者ID:caleb-james-smith,项目名称:QIETesting,代码行数:7,代码来源:igloo_test.py

示例7: writeBridge

# 需要导入模块: import TestLib [as 别名]
# 或者: from TestLib import bridgeAddress [as 别名]
def writeBridge(rm,slot,address,messageList):
    t.openRM(b,rm)
    b.write(t.bridgeAddress(slot),[address] + messageList)
    return b.sendBatch()
开发者ID:caleb-james-smith,项目名称:QIETesting,代码行数:6,代码来源:bridge_test.py

示例8: readBridge

# 需要导入模块: import TestLib [as 别名]
# 或者: from TestLib import bridgeAddress [as 别名]
def readBridge(slot, address, num_bytes):
    b.write(t.bridgeAddress(slot),[address])
    b.read(t.bridgeAddress(slot), num_bytes)
    message = b.sendBatch()[-1]
    return t.reverseBytes(message)
开发者ID:caleb-james-smith,项目名称:QIETesting,代码行数:7,代码来源:bridge_test.py


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