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

#ifndef WETLABS_UBATIF_H
#define WETLABS_UBATIF_H

#include "data/ElementURI.h"

/**
 *  Specifies the interface details for the WetLabs UBAT component in the
 *  ScienceModule.
 *
 *  WetLabsUBAT.h should only be included by WetLabsUBAT.cpp
 *  Other classes should include WetLabsUBATIF.h
 *
 *  \ingroup modules_science
 */
namespace WetLabsUBATIF
{
/// Static const for component name
/// (Can be used by other components)
static const Str NAME( "WetLabsUBAT" );

// Include common ConfigURIs -- must be in namespace and follow definition of NAME
#include "component/HasLoadAtStartupIF.h"
#include "component/HasHardwareIF.h"
#include "component/HasLoadControlIF.h"
#include "component/HasPowerIF.h"
#include "component/HasUartIF.h"

static const ConfigURI SERIALNO( NAME, "serial", "UBAT device s/n", Units::NONE );
static const ConfigURI FLOWRATE_CAL_COEFF( NAME, "flowrateCalibCoeff", "flowrate calibration coefficient", Units::NONE_FLOAT );
static const ConfigURI MIN_FLOWRATE_THRESHOLD( NAME, "minFlowrate", "minimum flowrate threshold", Units::LITER_PER_SECOND );

// Slate out
static const DataURI UBAT_RECORD_NUM( NAME, "record_number", "UBAT record number", Units::COUNT );
static const DataURI AVG_BIOLUM( NAME, "average_bioluminescence", "Average bioluminescence (photons s-1)", Units::PHOTON_PER_SECOND );
static const DataURI HV_STEP_CAL_COEFF( NAME, "hv_step_calibration_coefficient", "Calibration coefficient for HV step (photons s-1)", Units::NONE );
static const DataURI FLOW_RATE( NAME, "flow_rate", Units::LITER_PER_SECOND );
static const DataURI UBAT_ENABLE_MODE( NAME, "enableUBAT", "Allows the UBAT component to run when mode is set to UBAT_ENABLE, disables the component when UBAT_DISABLE.", Units::COUNT );

/// Number of 60 Hz digitized raw A/D counts in each msg
static const unsigned short RAW_AD_DATA_SIZE = 60;

static const BlobURI RAW_AD_COUNT( NAME, "digitized_raw_ad_counts", Units::COUNT, BLOB_INT32LE, RAW_AD_DATA_SIZE );

typedef enum
{
    UBAT_DISABLE,
    UBAT_ENABLE
} UBATMode;

}

#endif /* WETLABS_UBATIF */
