<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
	- $Id: NoiseGenerator.xsd,v 1.2 2011-05-05 12:25:50 c.migoni Exp $
	- Author: Andrea Orlati
	-
	- History:
	-   18-09-2008  Created
-->

<xs:schema
	targetNamespace="urn:schemas-cosylab-com:NoiseGenerator:1.0"
	xmlns="urn:schemas-cosylab-com:NoiseGenerator: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:unsignedLong" 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="NoiseGeneratorType">
		<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="NoiseGenerator" type="NoiseGeneratorType"/>
	
</xs:schema>
