<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema
  targetNamespace="urn:schemas-cosylab-com:MBFitsWriter:1.0"
  xmlns="urn:schemas-cosylab-com:MBFitsWriter: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"
  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:Managment:1.0"	schemaLocation="Managment.xsd"	/>

  <xs:complexType name="MBFitsWriterType">
		<xs:sequence>
			<xs:element name="fileName"				type="baci:ROstring"				/>
			<xs:element name="projectName"		type="baci:ROstring"				/>
			<xs:element name="observer"				type="baci:ROstring"				/>
			<xs:element name="scanIdentifier" type="baci:ROlong"					/>
			<xs:element name="deviceID"				type="baci:ROlong"					/>
			<xs:element name="scanAxis"				type="mng:ScanAxisType"			/>

			<xs:element name="dataX"					type="baci:ROdouble"				/>
			<xs:element name="dataY"					type="baci:ROdouble"				/>
			<xs:element name="arrayDataX"			type="baci:ROdoubleSeq"			/>
			<xs:element name="arrayDataY"			type="baci:ROdoubleSeq"			/>

			<xs:element name="status"					type="mng:SystemStatusType"	/>
		</xs:sequence>



		<xs:attribute name="recv_protocols" type="xs:string" use="optional" />



		<!-- sleep time of the working thread (microseconds), this is the thread that saves the data into the file -->
		<xs:attribute name="WorkingThreadTime"				type="xs:unsignedLong" use="required" />

		<!-- this is the time slice of the thread (microseconds), the thread must complete one iteration within that time -->
		<xs:attribute name="WorkingThreadTimeSlice" 	type="xs:unsignedLong" use="required" />

		<!-- sleep time of the collector thread (microseconds), this is the thread that collects the complementary information to be stored in the file  -->
		<xs:attribute name="CollectorThreadTime"			type="xs:unsignedLong" use="required" />

		<!-- the cache time (microseconds) for logging repetition filter -->
		<xs:attribute name="RepetitionCacheTime"			type="xs:unsignedLong" use="required" />

		<!-- the expire time (microseconds) for logging repetition filter -->
		<xs:attribute name="RepetitionExpireTime"			type="xs:unsignedLong" use="required" />

		<!-- the gap between two meteo parameters refresh (microseconds) -->
		<xs:attribute name="MeteoParameterDutyCycle"	type="xs:unsignedLong" use="required" />

		<!-- the gap for tracking flag refresh (microseconds) -->
		<xs:attribute name="TrackingFlagDutyCycle"		type="xs:unsignedLong" use="required" />



		<!-- the interface of the component that leads the Antenna subsystem -->
		<xs:attribute name="AntennaBossInterface"			type="xs:string" use="required" />

		<!-- the interface of component that stores observatory information -->
		<xs:attribute name="ObservatoryInterface"			type="xs:string" use="required" />

		<!-- the interface of component that leads the receivers subsystem -->
		<xs:attribute name="ReceiversBossInterface"		type="xs:string" use="required" />

		<!-- the interface of the component that leads the system and carries on the observation -->
		<xs:attribute name="SchedulerInterface"				type="xs:string" use="required" />

		<!-- the instance name of the component that samples the meteo data -->
		<xs:attribute name="MeteoInstance"						type="xs:string" use="required" />
  </xs:complexType>

  <xs:element name="MBFitsWriter" type="MBFitsWriterType" />
</xs:schema>
