/** \file
 *
 *  Specifies the interface details for the Docked component in the
 *  DockModule.
 *
 *  Docked.h should only be included by Docked.cpp
 *  Other classes should include DockedIF.h
 *
 *  Copyright (c) 2007,2008,2009 MBARI
 *  MBARI Proprietary Information.  All Rights Reserved
 */

#ifndef DOCKEDIF_H_
#define DOCKEDIF_H_

#include "data/ElementURI.h"

/**
 *  Specifies the interface details for the Docked component in the
 *  DockModule.
 *
 *  Docked.h should only be included by Docked.cpp
 *  Other classes should include DockedIF.h
 *
 *  \ingroup modules_dock
 */
namespace DockedIF
{
/// Static const for component name
/// (Can be used by other components)
static const Str NAME( "Docked" );

/// Static consts for input settings

/// Configuration settings
static const ConfigURI DOCK_DEPTH_OFFSET_CFG( NAME, "dockingDepthOffset", "Offset from the dock "
        "xponder depth (workSite.beaconDepth) to use when docking. Positive down.", Units::METER );
static const ConfigURI DOCK_RANGE_CFG( NAME, "dockRange", "Maximum absolute range allowed from "
                                       "dock xponder.", Units::METER );
static const ConfigURI DOCK_PITCH_CFG( NAME, "dockPitch", "Pitch angle to hold "
                                       "while on the dock.", Units::DEGREE );
static const ConfigURI DETACH_TIMEOUT_CFG( NAME, "detachTimeout", "Time duration for determining "
        "if the vehicle is detached from the dock.", Units::SECOND );
static const ConfigURI DOCK_TIMEOUT_CFG( NAME, "dockTimeout", "Time duration for determining if "
        "the vehicle is ON the dock (transition from detached->docked).", Units::SECOND );
static const ConfigURI DATA_TIMEOUT_CFG( NAME, "dataTimeout", "Max time duration allowed with no "
        "stepper updates.", Units::SECOND );
static const ConfigURI RANGE_TIMEOUT_CFG( NAME, "rangeTimeout", "Max time duration allowed with no "
        "range updates. Must be longer than ping rate!", Units::SECOND );
static const ConfigURI VERBOSE( NAME, "verbose", "Report state transitions to shore when true",
                                Units::BOOL );

static const SettingURI SLIDE_TIMEOUT_SETTING( "slideTimeout", "Desired time to try to slide",
        Units::MINUTE );
static const SettingURI SINK_DURATION_SETTING( "slideSinkTime", "Time to sit at buoyancy minimum during a "
        "single slide iteration", Units::MINUTE );
static const SettingURI CLOSE_DURATION_SETTING( "slideCloseTime", "Time to keep arm closed to check power/comms"
        " once single slide iteration complete", Units::MINUTE );
static const SettingURI DRIVE_DURATION_SETTING( "slideDriveTime", "Time to either jog or whirl during a single "
        "slide iteration", Units::MINUTE );
static const SettingURI SLIDE_RETRY_COUNT_SETTING( "slideRetries", "Desired number of times to try to slide",
        Units::COUNT );
static const SettingURI WIGGLE_COUNT_SETTING( "wiggleCount", "How many wiggles to try before checking"
        " for success", Units::COUNT );
static const SettingURI TRY_SLIDE_SETTING( "slideAllowed", "Use slide mode?", Units::BOOL );
static const SettingURI TRY_WIGGLE_SETTING( "massWiggle", "Sweep the mass while negative in slide",
        Units::BOOL );
static const SettingURI TRY_JOG_SETTING( "propJog", "Repeatedly bump the prop forward and reverse while negative"
        " in slide", Units::BOOL );
static const SettingURI JOG_LENGTH_SETTING( "jogLength", "Duration for which to run the prop in each direction"
        " while in jog", Units::SECOND );
static const SettingURI TRY_WHIRL_SETTING( "driveWhirl", "Elevators down, rudder over, drive forward while"
        "negative in slide", Units::BOOL );
static const SettingURI WHIRL_SPEED_SETTING( "whirlSpeed", "Speed to drive forward in whirl", Units::METER_PER_SECOND );
typedef enum
{
    UNINITIALIZED,
    DOCKED,
    DETACHED,
    SLIDE
} DockState;

}

#endif /*DOCKEDIF_H_*/
