/*****************************************************************************/
/* Copyright 1994 MBARI                                                      */
/*****************************************************************************/
/* Summary  : Variable Bouyancy System Data Manager Definitions              */
/* Filename : vbSystem.h                                                     */
/* Author   : Andrew Pearce                                                  */
/* Project  : New ROV                                                        */
/* Version  : Version 1.0                                                    */
/* Created  : 05/28/96                                                       */
/* Modified : 06/10/96                                                       */
/* Archived :                                                                */
/*****************************************************************************/
/* Modification History:                                                     */
/* $Header: /usr/tiburon/.cvsroot/vw/h/vbSystem.h,v 1.1.1.1 1997/05/16 22:33:02 pean Exp $
 * $Log: vbSystem.h,v $
 * Revision 1.1.1.1  1997/05/16 22:33:02  pean
 * Initial check in after software freeze.
 *
*/
/*****************************************************************************/

#ifndef VB_SYSTEM_H
#define VB_SYSTEM_H

#define VB_SYSTEM_DM_PREFIX               "TIBURON.VB_SYSTEM"
#define VB_MOTOR_DM_PREFIX                "TIBURON.VB_MOTOR."

#define VB_SYSTEM_LEVEL_MM_DM             "VB_SYSTEM.LEVEL_MM"
#define VB_SYSTEM_VOLUME_DM               "VB_SYSTEM.VOLUME"
#define VB_SYSTEM_WEIGHT_DM               "VB_SYSTEM.WEIGHT"
#define VB_SYSTEM_STATUS_DM               "VB_SYSTEM.STATUS"
#define VB_SYSTEM_FLOOD_DM                "VB_SYSTEM.FLOOD"
#define VB_SYSTEM_EMPTY_DM                "VB_SYSTEM.EMPTY"
#define VB_SYSTEM_SET_WEIGHT_DM           "VB_SYSTEM.SET_WEIGHT"
#define VB_SYSTEM_CHANGE_WEIGHT_DM        "VB_SYSTEM.CHANGE_WEIGHT"
#define VB_SYSTEM_WEIGHT_SETPOINT_DM      "VB_SYSTEM.WEIGHT_SETPOINT"
#define VB_SYSTEM_DELTA_WEIGHT_DM         "VB_SYSTEM.DELTA_WEIGHT"
#define VB_SYSTEM_SETPOINT_ERROR_DM       "VB_SYSTEM.SETPOINT_ERROR"
#define VB_SYSTEM_OPEN_VALVE_DM           "VB_SYSTEM.OPEN_VALVE"
#define VB_SYSTEM_MASS_INC_FACTOR_DM      "VB_SYSTEM.MASS_INCREMENT_FACTOR"
#define VB_SYSTEM_MASS_DEC_FACTOR_DM      "VB_SYSTEM.MASS_DECREMENT_FACTOR"
#define VB_SYSTEM_DELTA_MASS_DM           "VB_SYSTEM.DELTA_MASS"

#define VB_SYSTEM_PUMP_MODE_SELECT_DM     "VB_SYSTEM.PUMP_MODE_SELECT"
#define VB_SYSTEM_PUMP_MODE_STATUS_DM     "VB_SYSTEM.PUMP_MODE_STATUS"

#define VB_MOTOR_RUN_DM                   "RUN"

#define INCHES_TO_CM(inches) inches * 2.54

#define VB_SPHERE_COUNT           4         /* 4 Spheres in the VB System   */
#define VB_SPHERE_RADIUS INCHES_TO_CM(6.5)  /* Radius of a single sphere    */
#define VB_SPHERE_OFFSET INCHES_TO_CM(0.625)/* Height Offset for 4th sphere */
#define VB_HEIGHT_SENSOR_OFFSET  236        /* Height Sensor Offset  (mm)   */

#define VB_SEAWATER_DENSITY     1.027       /* Seawater Desnity in g/CM3    */
#define VB_FRESHWATER_DENSITY   1.000

typedef enum
{
  VB_MOTOR_OFF,
  VB_MOTOR_LOW,
  VB_MOTOR_HIGH
} vbMotorRunMode;

typedef enum
{
    VB_MODE,
    ARM_HYDRAULICS,
    TOOLSLED_HYDRAULICS
} vbPumpMode;
                                           /* VB system operation status    */
typedef enum
{
    IDLE,
    FULL,
    EMPTY,
    FILLING,
    EMPTYING
} vbOpStatus;
                                    /* VB Motor Interface Task Stack Size+TCB*/
#define VB_MOTOR_SRQ_STACKSIZE THRUST_SRQ_STACKSIZE

#ifdef __STDC__

STATUS vbMotorTask( Nat16 serialChannel );

#endif

#endif /* VB_SYSTEM_H */
