<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
   - $Id: FitsWriter.xsd,v 1.5 2011-04-15 09:08:40 a.orlati Exp $
   -
   - Author: Andrea Orlati (a.orlati@ira.inaf.it)
   -
   - History:
   -   2009-13-01  Created
  -->
<xs:schema 
  targetNamespace="urn:schemas-cosylab-com:FitsWriter:1.0"
  xmlns="urn:schemas-cosylab-com:FitsWriter: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="FitsWriterType">
   <xs:complexContent>
    <xs:extension base="baci:CharacteristicComponent">
     <xs:sequence>
		<xs:element name="fileName" type="baci:ROstring"/>
		<xs:element name="status" type="mng:SystemStatusType" />
		<xs:element name="projectName" type="baci:ROstring"/>
		<xs:element name="observer" type="baci:ROstring"/>
		<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: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" />
	 <!-- limit the enquire rate to the minor servo subsystem. It is the minimum time between two enquires (microseconds) -->
	 <xs:attribute name="MinorServoEnquireMinGap" type="xs:unsignedLong" use="required" />	
	 <!-- this time set the time delay used when generating fake timestamps (microseconds) -->
	 <xs:attribute name="FakeDataTimeDelay" 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 component that leads the minor servo subsystem -->
	 <xs:attribute name="MinorServoBossInterface" 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:extension>
   </xs:complexContent>
  </xs:complexType>
  <xs:element name="FitsWriter" type="FitsWriterType"/>
</xs:schema>

