diff options
Diffstat (limited to 'xml')
-rw-r--r-- | xml/references.xsd | 4 | ||||
-rw-r--r-- | xml/test/camera.xml | 1 | ||||
-rw-r--r-- | xml/types.xsd | 3 |
3 files changed, 7 insertions, 1 deletions
diff --git a/xml/references.xsd b/xml/references.xsd index 810913c..f382840 100644 --- a/xml/references.xsd +++ b/xml/references.xsd @@ -37,6 +37,10 @@ <xsd:selector xpath="unit" /> <xsd:field xpath="@name" /> </xsd:key> + <xsd:key name="pcilib_path_key"> + <xsd:selector xpath="transform" /> + <xsd:field xpath="@path" /> + </xsd:key> <xsd:keyref name="pcilib_register_view_ref" refer="pcilib_view_key"> <xsd:selector xpath="bank/register/view|bank/register/field/view" /> diff --git a/xml/test/camera.xml b/xml/test/camera.xml index a12d26b..9df8de2 100644 --- a/xml/test/camera.xml +++ b/xml/test/camera.xml @@ -106,6 +106,7 @@ <register address="0x1b0" offset="0" size="32" default="0" rwmask="0" mode="R" name="ddr_num_frames"/> </bank> <bank bar="0" size="0x0200" protocol="software_registers" read_address="0x0" write_address="0x0" word_size="32" endianess="little" format="0x%lx" name="dma" description="DMA Registers"/> + <transform path="/test/prop1" unit="C" read_from_register="(503975./1024000)*$sensor_temperature - 27315./100" write_to_register="($sensor_temperature + 27315./100)*(1024000./503975)" description="formula to get real fpga temperature from the fpga_temperature register in decimal"/> <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"/> diff --git a/xml/types.xsd b/xml/types.xsd index 6edb35e..f6b5bcd 100644 --- a/xml/types.xsd +++ b/xml/types.xsd @@ -52,7 +52,7 @@ </xsd:complexType> <xsd:complexType name="pcilib_view_t"> - <xsd:attribute name="name" type="xsd:ID" use="required" /> + <xsd:attribute name="name" type="xsd:ID" /> <xsd:attribute name="unit" type="xsd:string" /> <xsd:attribute name="type" type="pcilib_data_type_t" /> <xsd:attribute name="visible" type="bool_t" default="0" /> @@ -62,6 +62,7 @@ <xsd:complexType name="pcilib_transform_view_t"> <xsd:complexContent> <xsd:extension base="pcilib_view_t"> + <xsd:attribute name="path" type="xsd:string" /> <xsd:attribute name="read_from_register" type="xsd:string" /> <xsd:attribute name="write_to_register" type="xsd:string" /> </xsd:extension> |