<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
	- $Id: DBBC.xsd,
	- Author: Andrea Melis
	-
	- History:
	-   30-07-2009  Created
-->

<xs:schema
	targetNamespace="urn:schemas-cosylab-com:DBBC:1.0"
	xmlns="urn:schemas-cosylab-com:DBBC:1.0"
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns:cdb="urn:schemas-cosylab-com:CDB:1.0"
	xmlns:baci="urn:schemas-cosylab-com:BACI:1.0"
	xmlns:mng="urn:schemas-cosylab-com:Managment:1.0"
	xmlns:bcknd="urn:schemas-cosylab-com:GenericBackend:1.0"
	elementFormDefault="qualified"
	attributeFormDefault="unqualified">
	<xs:import namespace="urn:schemas-cosylab-com:CDB:1.0" schemaLocation="CDB.xsd"/>
	<xs:import namespace="urn:schemas-cosylab-com:BACI:1.0" schemaLocation="BACI.xsd"/>
	<xs:import namespace="urn:schemas-cosylab-com:GenericBackend:1.0" schemaLocation="GenericBackend.xsd"/>
	<xs:import namespace="urn:schemas-cosylab-com:Managment:1.0" schemaLocation="Managment.xsd"/>

	<xs:complexType name="BackendStatusType">
		<xs:complexContent>
			<xs:restriction base="baci:ROpattern">
				<xs:attribute name="resolution" type="xs:int" use="optional" default="2"/>
                        	<xs:attribute name="bitDescription" type="xs:string" use="optional" default= "Busy"/>
				<xs:attribute name="whenSet" type="xs:string" use="optional" default=    	"1"/>
        		    	<xs:attribute name="whenCleared" type="xs:string" use="optional" default=    		"3"/>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>	
	
	<xs:complexType name="DBBCType">
		<xs:complexContent>
			<xs:extension base="bcknd:GenericBackendType">
				<xs:sequence>
					<xs:element name="time" type="baci:ROuLongLong" />
					<xs:element name="backendName" type="baci:ROstring" />
					<xs:element name="bandWidth" type="baci:ROdoubleSeq" />
					<xs:element name="frequency" type="baci:ROdoubleSeq" />
					<xs:element name="sampleRate" type="baci:ROdoubleSeq" />
					<xs:element name="attenuation" type="baci:ROdoubleSeq" />
					<xs:element name="polarization" type="baci:ROlongSeq" />
					<xs:element name="bins" type="baci:ROlongSeq" />
					<xs:element name="feed" type="baci:ROlongSeq" />
					<xs:element name="systemTemperature" type="baci:ROdoubleSeq" />
					<xs:element name="inputSection" type="baci:ROlongSeq" />
					<xs:element name="inputsNumber" type="baci:ROlong" />
					<xs:element name="sectionsNumber" type="baci:ROlong" />
					<xs:element name="integration" type="baci:ROlong" />
					<xs:element name="status" type="BackendStatusType" />
					<xs:element name="busy" type="mng:BooleanType" />
				</xs:sequence>
				<!-- Sender thread sleep time (microseconds), sender duty cycle-->
				<xs:attribute name="SenderSleepTime" type="xs:unsignedLong" use="required" />
				<!-- Sender thread response time (microseconds), hart beat time -->
				<xs:attribute name="SenderResponseTime" type="xs:unsignedLong" use="required" />
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>

	<xs:element name="DBBC" type="DBBCType"/>
</xs:schema>

