コード例 #1
0
ファイル: testPut.py プロジェクト: slac-epics/pvaPy
value = oldValue + '; b'
print('Putting value: ', value)
c.put(value) 
newValue = c.get().getString()
print('Got new value: ', newValue)
assert newValue == value

print()
print('****************************')
print('Testing byte')
c = Channel('byte01')
oldValue = ord(c.get().getByte())
print('Got old value: ', oldValue)
value = oldValue + 10
print('Putting value via putByte(): ', value)
c.putByte(chr(value)) 
newValue = ord(c.get().getByte())
print('Got new value: ', newValue)
assert newValue == value

value = oldValue + 5
print('Putting value via put(): ', value)
c.put(value) 
newValue = ord(c.get().getByte())
print('Got new value: ', newValue)
assert newValue == value


print()
print('****************************')
print('Testing ubyte')