diff options
Diffstat (limited to 'xml/test_pywrap')
-rw-r--r-- | xml/test_pywrap/camera.xml | 8 | ||||
-rw-r--r-- | xml/test_pywrap/names.xml | 16 | ||||
-rw-r--r-- | xml/test_pywrap/props.xml | 24 | ||||
-rw-r--r-- | xml/test_pywrap/test_prop2.py | 6 | ||||
-rw-r--r-- | xml/test_pywrap/test_prop3.py | 5 | ||||
-rw-r--r-- | xml/test_pywrap/test_prop_mt.py | 20 | ||||
-rw-r--r-- | xml/test_pywrap/units.xml | 35 | ||||
-rw-r--r-- | xml/test_pywrap/views.xml | 6 |
8 files changed, 0 insertions, 120 deletions
diff --git a/xml/test_pywrap/camera.xml b/xml/test_pywrap/camera.xml deleted file mode 100644 index 2018ae0..0000000 --- a/xml/test_pywrap/camera.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0"?> -<model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <bank bar="0" size="0x0200" protocol="software_registers" read_address="0x9000" write_address="0x9000" word_size="32" endianess="little" format="0x%lx" name="fpga" description="IPECamera Registers"> - <register address="0x00" offset="0" size="32" default="0" rwmask="0" mode="RW" name="reg1"> - <field offset="0" size="16" mode="RW" name="sensor_temperature" min="5" max="15"><view view="formuu1"/><view view="formuu2"/><view view="enumm2"/></field> - </register> - </bank> -</model> diff --git a/xml/test_pywrap/names.xml b/xml/test_pywrap/names.xml deleted file mode 100644 index f6ddbcc..0000000 --- a/xml/test_pywrap/names.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0"?> -<model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <enum name="enumm1" description="enum towards temperatures register"> - <name name="high" value="0x100" min="0x2" max="0x300"/> - <name name="low" value="0x010"/> - </enum> - <enum name="enumm2" description="enum towards sensor_temperature register"> - <name name="high" value="0x120"/> - <name name="low" value="0x010" min="0x00" max="0x020"/> - </enum> - <enum name="enumm3" description="enum towards cmosis_exp_register register"> - <name name="short" value="0x000"/> - <name name="mid" value="0x010"/> - <name name="long" value="0x100" min="0x0F0"/> - </enum> -</model> diff --git a/xml/test_pywrap/props.xml b/xml/test_pywrap/props.xml deleted file mode 100644 index dae83f9..0000000 --- a/xml/test_pywrap/props.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0"?> -<model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <transform path="/test/prop1" - register="test_prop1" - unit="C" - read_from_register="(503975./1024000)*${/registers/fpga/reg1} + 28715./100" - description="formula to get real fpga temperature from the fpga_temperature register in decimal"/> - <transform path="/test/prop2" - register="test_prop2" - unit="C" - script="test_prop2.py" - description="test python script #1" - write_verification="0"/> - <transform path="/test/prop3" - register="test_prop3" - unit="C" - script="test_prop3.py" - description="test python script #2"/> - <transform path="/test/prop_mt" - register="test_prop_mt" - unit="C" - script="test_prop_mt.py" - description="Example of thread safe python property"/> -</model> diff --git a/xml/test_pywrap/test_prop2.py b/xml/test_pywrap/test_prop2.py deleted file mode 100644 index d78dbea..0000000 --- a/xml/test_pywrap/test_prop2.py +++ /dev/null @@ -1,6 +0,0 @@ -def read_from_register(ctx, value): - return ctx.get_property('/test/prop3') / 2 - -def write_to_register(ctx, value): - ctx.set_property(value*2, '/test/prop3') - diff --git a/xml/test_pywrap/test_prop3.py b/xml/test_pywrap/test_prop3.py deleted file mode 100644 index a082096..0000000 --- a/xml/test_pywrap/test_prop3.py +++ /dev/null @@ -1,5 +0,0 @@ -def read_from_register(ctx, value): - return ctx.get_property('/registers/fpga/reg1') - -def write_to_register(ctx, value): - ctx.set_property(value, '/registers/fpga/reg1') diff --git a/xml/test_pywrap/test_prop_mt.py b/xml/test_pywrap/test_prop_mt.py deleted file mode 100644 index 53ea797..0000000 --- a/xml/test_pywrap/test_prop_mt.py +++ /dev/null @@ -1,20 +0,0 @@ -import time -import threading -lock = threading.Lock() - -def read_from_register(ctx, value): - with lock: - ctx.lock('lock1') - cur = read_from_register.counter - read_from_register.counter += 1 - for i in range (0, 5): - time.sleep(0.1) - print cur - out = ctx.get_property('/test/prop3') / 2 - ctx.unlock('lock1') - return out -read_from_register.counter = 0 - -def write_to_register(ctx, value): - with lock: - ctx.set_property(value*2, '/test/prop3') diff --git a/xml/test_pywrap/units.xml b/xml/test_pywrap/units.xml deleted file mode 100644 index 74ab9f7..0000000 --- a/xml/test_pywrap/units.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0"?> -<model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <unit name="C"> - <transform unit="K" transform="$value+273.15"/> - <transform unit="F" transform="$value*(9./5)+32"/> - </unit> - <unit name="K"> - <transform unit="C" transform="$value-273.15"/> - <transform unit="F" transform="($value-273.15)*(9./5)+32"/> - </unit> - <unit name="F"> - <transform unit="C" transform="($value-32)*5./9"/> - <transform unit="K" transform="($value+273.15-32)*5./9"/> - </unit> - <unit name="s"> - <transform unit="ms" transform="$value*1000"/> - <transform unit="us" transform="$value*1000000"/> - <transform unit="ns" transform="$value*1000000000"/> - </unit> - <unit name="ms"> - <transform unit="s" transform="$value/1000"/> - <transform unit="us" transform="$value*1000"/> - <transform unit="ns" transform="$value*1000000"/> - </unit> - <unit name="us"> - <transform unit="s" transform="$value/1000000"/> - <transform unit="ms" transform="$value/1000"/> - <transform unit="ns" transform="$value*1000"/> - </unit> - <unit name="ns"> - <transform unit="s" transform="$value/1000000000"/> - <transform unit="ms" transform="$value/1000000"/> - <transform unit="us" transform="$value/1000"/> - </unit> -</model> diff --git a/xml/test_pywrap/views.xml b/xml/test_pywrap/views.xml deleted file mode 100644 index c40cd0f..0000000 --- a/xml/test_pywrap/views.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0"?> -<model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <transform name="formuu1" unit="C" read_from_register="(503975./1024000)*$value - 27315./100" write_to_register="($value + 27315./100)*(1024000./503975)" description="formula to get real fpga temperature from the fpga_temperature register in decimal"/> - <transform name="formuu2" unit="C1" read_from_register="((1./4)*($value - 1200)) if $freq==0 else ((3./10)*($value - 1000))" write_to_register="4*$value + 1200 if $freq==0 else (10./3)*$value + 1000" description="formula to get real sensor temperature from the sensor_temperature register in decimal"/> - <transform name="formuu3" unit="us" read_from_register="($value+(43./100))*129./(40*1000000)if $freq==0 else ($value+(43./100))*129./(48*1000000)" write_to_register="$value/129.*(40*1000000) - 43./100 if $freq==0 else $value/129.*(48*1000000) - 43./100" description="formula to get real exposure time from the cmosis_exp_time register in decimal"/> -</model> |