/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to xml/test_pywrap/test_prop2.py

  • Committer: Vasilii Chernov
  • Date: 2016-02-08 10:55:33 UTC
  • mto: This revision was merged to the branch mainline in revision 353.
  • Revision ID: vchernov@inr.ru-20160208105533-fl0uue3ukv6di13b
Add support for setting register value to script transfrom. Add set_property and get_property functions to pcipywrap. Cleaning cmakelists from unused dependencies

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import pcipywrap
2
 
import os
3
 
    
4
 
def read_from_register(): 
5
 
    reg1_val =  pcipywrap.read_register('reg1');     
6
 
    test_prop1_val = pcipywrap.read_register('test_prop3');
7
 
    return test_prop1_val - reg1_val;
 
2
    
 
3
def read_from_register():    
 
4
    return pcipywrap.get_property('/registers/fpga/reg1') / 3
 
5
    
 
6
def write_to_register(value):    
 
7
    pcipywrap.set_property('/registers/fpga/reg1', value*3)
 
8