當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。