<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
	- $Id: Managment.xsd,v 1.3 2010-11-03 16:21:20 a.orlati Exp $
	- Author: Andrea Orlati
	-
	- History:
	-   24-01-2008  Created
        -   24-05-2012  Marco Bartolini added LogLevelType
        -	08-04-2013	Andrea Orlati expanded definitions of ScanAxisType
-->

<xs:schema
	targetNamespace="urn:schemas-cosylab-com:Managment:1.0"
	xmlns="urn:schemas-cosylab-com:Managment: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"
	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:simpleType name="TSubScanSignalBasicType">
		<xs:restriction base="xs:string">
	    	<xs:enumeration value="SIGNAL"/>
	    	<xs:enumeration value="REFERENCE"/>
	    	<xs:enumeration value="NONE"/>
		</xs:restriction>
	</xs:simpleType>
	
	<xs:simpleType name="TScanAxisEnumerationType">
		<xs:annotation><xs:documentation>
			Lists all axis managed by the minor servo system, a subset of the TScanAxis enumeration
		</xs:documentation></xs:annotation>
		<xs:restriction base="xs:string">

	    	<xs:enumeration value="MNG_NO_AXIS">
				<xs:annotation><xs:documentation>
					The scan involves no axis
				</xs:documentation></xs:annotation>	
	      	</xs:enumeration>

	    	<xs:enumeration value="MNG_HOR_LON">
				<xs:annotation><xs:documentation>
					The scan is along the horizontal longitude
				</xs:documentation></xs:annotation>	
	      	</xs:enumeration>
		
			<xs:enumeration value="MNG_HOR_LAT">
				<xs:annotation><xs:documentation>
					The scan is along the horizontal latitude
				</xs:documentation></xs:annotation>	
	      	</xs:enumeration>
	      	
			<xs:enumeration value="MNG_EQ_LON">
				<xs:annotation><xs:documentation>
					The scan is along the equatorial longitude
				</xs:documentation></xs:annotation>	
	      	</xs:enumeration>
	      	
			<xs:enumeration value="MNG_EQ_LAT">
				<xs:annotation><xs:documentation>
					The scan is along the equatorial latitude
				</xs:documentation></xs:annotation>	
	      	</xs:enumeration>

			<xs:enumeration value="MNG_GAL_LON">
				<xs:annotation><xs:documentation>
					The scan is along the galactic longitude
				</xs:documentation></xs:annotation>	
	      	</xs:enumeration>
	      	
			<xs:enumeration value="MNG_GAL_LAT">
				<xs:annotation><xs:documentation>
					The scan is along the galactic latitude
				</xs:documentation></xs:annotation>	
	      	</xs:enumeration>

			<xs:enumeration value="MNG_BEAMPARK">
				<xs:annotation><xs:documentation>
					The scan is beam park positioning
				</xs:documentation></xs:annotation>	
	      	</xs:enumeration>

			<xs:enumeration value="MNG_TRACK">
				<xs:annotation><xs:documentation>
					The scan is normal sidereal tracking
				</xs:documentation></xs:annotation>	
	      	</xs:enumeration>
	      	
			<xs:enumeration value="MNG_GCIRCLE">
				<xs:annotation><xs:documentation>
					The scan is along the great circle
				</xs:documentation></xs:annotation>	
	      	</xs:enumeration>
	      		
	    	<xs:enumeration value="SUBR_Z">
				<xs:annotation><xs:documentation>
					Scan along the Z (focus) of the subreflector
				</xs:documentation></xs:annotation>	
	      	</xs:enumeration>
	      	
	    	<xs:enumeration value="SUBR_X">
				<xs:annotation><xs:documentation>
					Scan along the X of the subreflector
				</xs:documentation></xs:annotation>	
	      	</xs:enumeration>

	    	<xs:enumeration value="SUBR_Y">
				<xs:annotation><xs:documentation>
					Scan along the Y of the subreflector
				</xs:documentation></xs:annotation>	
	      	</xs:enumeration>
	      	
	    	<xs:enumeration value="SUBR_ROTY">
				<xs:annotation><xs:documentation>
					rotate the subriflector along the Y axis
				</xs:documentation></xs:annotation>	
	      	</xs:enumeration>

	      	<xs:enumeration value="SUBR_ROTX">
				<xs:annotation><xs:documentation>
					rotate the subriflector along the X axis
				</xs:documentation></xs:annotation>	
	      	</xs:enumeration>
	      	
	    	<xs:enumeration value="PFP_Z">
				<xs:annotation><xs:documentation>
					Scan along the Z (focus) of the primary focus
				</xs:documentation></xs:annotation>	
	      	</xs:enumeration>

	    	<xs:enumeration value="PFP_Y">
				<xs:annotation><xs:documentation>
					Scan along the Y of the primary focus
				</xs:documentation></xs:annotation>	
	      	</xs:enumeration>

		</xs:restriction>
	</xs:simpleType>
	
	
	
	<xs:complexType name="SystemStatusType">
		<xs:complexContent>
			<xs:restriction base="baci:ROEnum">
				<xs:attribute name="graph_min" type="xs:int" use="optional" default="0" />
				<xs:attribute name="graph_max" type="xs:int" use="optional" default="2" />
				<xs:attribute name="statesDescription" type="xs:string" use="optional" default=
						"OK,WARNING,FAILURE"/>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>

	<xs:complexType name="BooleanType">
		<xs:complexContent>
			<xs:restriction base="baci:ROEnum">
				<xs:attribute name="graph_min" type="xs:int" use="optional" default="0" />
				<xs:attribute name="graph_max" type="xs:int" use="optional" default="1" />
				<xs:attribute name="statesDescription" type="xs:string" use="optional" default=
						"TRUE,FALSE"/>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>

	  <xs:complexType name="LogLevelType">
			<xs:complexContent>
				<xs:restriction base="baci:ROEnum">
					<xs:attribute name="graph_min" type="xs:int" use="optional" default="0" />
					<xs:attribute name="graph_max" type="xs:int" use="optional" default="8" />
					<xs:attribute name="statesDescription" type="xs:string" use="optional" default=
							"C_TRACE, C_DEBUG, C_INFO, C_NOTICE, C_WARNING, C_ERROR, C_CRITICAL, C_ALERT, C_EMERGENCY"/>
				</xs:restriction>
			</xs:complexContent>
	  </xs:complexType>

	<xs:complexType name="ScanAxisType">
		<xs:complexContent>
			<xs:restriction base="baci:ROEnum">
				<xs:attribute name="graph_min" type="xs:int" use="optional" default="0" />
				<xs:attribute name="graph_max" type="xs:int" use="optional" default="14" />
				<xs:attribute name="statesDescription" type="xs:string" use="optional" default=
						"NONE,HORIZONTAL_LONGITUDE,HORIZONTAL_LATITUDE,EQUATORIAL_LONGITUDE,EQUATORIAL_LATITUDE,GALACTIC_LONGITUDE,GALACTIC_LATITUDE,SUBREFLECTOR_Z,
						SUBREFLECTOR_X,SUBREFLECTOR_Y,PRIMARYFOCUS_Z,PRIMARYFOCUS_Y,BEAMPARK,SIDEREAL_TRACK,GREATCIRCLE"/>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>	
	
</xs:schema>
