/****************************************************************************/
/* Copyright 2003 MBARI														*/
/****************************************************************************/
/* Summary	: Definitions for user paramters  for OASIS3 mooring controller */
/* Filename : parm.h														*/
/* Author	: Robert Herlien (rah)											*/
/* Project	: OASIS3 Mooring												*/
/* $Revision: 1.1 $															*/
/* Created	: 08/15/2003 rah												*/
/*																			*/
/* MBARI provides this documentation and code "as is", with no warranty,	*/
/* express or implied, of its quality or consistency. It is provided without*/
/* support and without obligation on the part of the Monterey Bay Aquarium	*/
/* Research Institute to assist in its use, correction, modification, or	*/
/* enhancement. This information should not be published or distributed to	*/
/* third parties without specific written permission from MBARI.			*/
/*																			*/
/****************************************************************************/
/* Modification History:													*/
/* 15aug2003 rah - created from usrcmds.h									*/
/****************************************************************************/

#ifndef INCparmh
#define INCparmh		1

typedef enum					/****************************************/
{								/* ParmType - enum for parameter type	*/
  PARM_DEC,						/* Numeric, decimal assumed unless overridden*/
  PARM_HEX,						/* Hexadecimal number					*/
  PARM_STRING,					/* ASCII String							*/
  PARM_BOOL						/* Boolean, true/false					*/
} ParmType;						/****************************************/

typedef struct					/****************************************/
{								/* Param - User Parameter STRUCT		*/
  char			*pt_name;		/* Name of parameter					*/
  Void			*pt_parm;		/* Pointer to parameter					*/
  ParmType		pt_type;		/* Parameter type						*/
  Word			pt_flags;		/* Flags, see below						*/
  void			(*pt_func)();	/* Function to call after parm changed*/
  char			*pt_help;		/* Help string for parameter			*/
} Param;						/****************************************/

typedef struct				/****************************************/
{							/* Param - User Parameter Array STRUCT	*/
  char		*pt_name;		/* Name of parameter array				*/
  Void		*pt_array;		/* Pointer to parameter array			*/
  Nat16		pt_size;		/* Number of elements in array			*/
  Word		pt_flags;		/* Flags, see below						*/
  void		(*pt_func)();	/* Function to call after parm changed	*/
  char		*pt_help;		/* Help string for parameter			*/
} ParamArray;				/****************************************/


/* pt_flags - Parm Flags	*/
#define PARM_IMMUTABLE	1		/* Parm can't be changed				*/
#define PARM_INVISIBLE	2		/* Don't show to user					*/


/****************************************/
/* Function Declarations				*/
/****************************************/

void	pNullFunc(Void);
Int16	setParm(char *name, char *value);
Int16	getParmArraySize(char* name);
Int16	setParmArray(char* name, char* value, Nat16 element);
Int16	params(Nat16, char *, char *);
Int16	param_arrays(Nat16, char *, char *);
void	pwrpermFunc(Void);
void	blinkyFunc(MBool *parmp);

#endif /* INCparmh */
