summaryrefslogtreecommitdiffstats
path: root/xml
diff options
context:
space:
mode:
Diffstat (limited to 'xml')
-rw-r--r--xml/test2/camera.xml6
-rw-r--r--xml/test2/names.xml16
-rw-r--r--xml/test2/props.xml4
-rw-r--r--xml/test2/reg2.py0
-rw-r--r--xml/test2/units.xml35
-rw-r--r--xml/test2/views.xml6
6 files changed, 67 insertions, 0 deletions
diff --git a/xml/test2/camera.xml b/xml/test2/camera.xml
new file mode 100644
index 0000000..4b31209
--- /dev/null
+++ b/xml/test2/camera.xml
@@ -0,0 +1,6 @@
+<?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"/>
+ </bank>
+</model>
diff --git a/xml/test2/names.xml b/xml/test2/names.xml
new file mode 100644
index 0000000..f6ddbcc
--- /dev/null
+++ b/xml/test2/names.xml
@@ -0,0 +1,16 @@
+<?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/test2/props.xml b/xml/test2/props.xml
new file mode 100644
index 0000000..f7a1329
--- /dev/null
+++ b/xml/test2/props.xml
@@ -0,0 +1,4 @@
+<?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"/>
+</model>
diff --git a/xml/test2/reg2.py b/xml/test2/reg2.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/xml/test2/reg2.py
diff --git a/xml/test2/units.xml b/xml/test2/units.xml
new file mode 100644
index 0000000..74ab9f7
--- /dev/null
+++ b/xml/test2/units.xml
@@ -0,0 +1,35 @@
+<?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/test2/views.xml b/xml/test2/views.xml
new file mode 100644
index 0000000..c40cd0f
--- /dev/null
+++ b/xml/test2/views.xml
@@ -0,0 +1,6 @@
+<?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>