Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Generating

...

Module

The directory ICD has to be generated using the following command:

Code Block
languagebash
titleConsole
getTemplateForDirectory MODROOT_WS ICD

Makefile

The Makefile was generated with the previous command, but the following entries need to be modified / added:

Code Block
titleMakefile
#
# Generate ACS Error System classes
#
ACSERRDEF := SystemErr

# 
# IDL Files and flags
# 
IDL_FILES = Types Console DataBase Instrument Scheduler Telescope TelescopeControl Camera Storage
IDL_TAO_FLAGS = 
USER_IDL =

TypesStubs_LIBS = acscomponentStubs
ConsoleStubs_LIBS = acscomponentStubs SYSTEMErrStubs TypesStubs
DataBaseStubs_LIBS = acscomponentStubs SYSTEMErrStubs TypesStubs
InstrumentStubs_LIBS = acscomponentStubs SYSTEMErrStubs TypesStubs
SchedulerStubs_LIBS = acscomponentStubs SYSTEMErrStubs
TelescopeStubs_LIBS = acscomponentStubs SYSTEMErrStubs TypesStubs
TelescopeControlStubs_LIBS = baciStubs acscomponentStubs SYSTEMErrStubs TypesStubs
CameraStubs_LIBS = baciStubs acscomponentStubs SYSTEMErrStubs TypesStubs
StorageStubs_LIBS = acscomponent TypesStubs

IDL Files

The IDL files have to be placed in the ICD/idl directory:

...

Code Block
languagecpp
titleTypes.idl
linenumberstrue
collapsetrue
#ifndef _TYPES_IDL_
#define _TYPES_IDL_

/*******************************************************************************
*    ACS Community - https://github.com/ACS-Community/ACS-Workshop
*    
*    This library is free software; you can redistribute it and/or
*    modify it under the terms of the GNU Lesser General Public
*    License as published by the Free Software Foundation; either
*    version 2.1 of the License, or (at your option) any later version.
*    
*    This library is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
*    Lesser General Public License for more details.
*    
*    You should have received a copy of the GNU Lesser General Public
*    License along with this library; if not, write to the Free Software
*    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
*/

#pragma prefix "acsws"


/** @file Types.idl
 *  IDL specification of Mount object for ACS Course
 *
 *  There are 4 different interfaces that show the implementation
 *  of a Mount component with increasing complexity.
 *  At every step we add new functionality, aligned with what 
 *  is demonstrated in the course
 */

module TYPES
{ 
    // Image types
    typedef sequence<octet> ImageType;
    typedef sequence<ImageType> ImageList;

	// Coordinates type
	struct Position {
		double az;
		double el;
	};

	// Targets types
	struct Target {
		long     tid;
		Position coordinates;
		long   expTime;  /* seconds */
	};
	typedef sequence<Target>  TargetList;

	// Proposal types
	struct Proposal {
		long pid; /* proposal ID */
		TargetList targets;
		long status; /* 0 queued, 1 running, 2 ready */
	};
	typedef sequence<Proposal>  ProposalList;

	// RGB Configuration of the CCD
	struct RGB { 
		long red; 
		long green;
		long blue;
	};

};

#endif

...