/****************************************************************************/
/* Copyright 1995 to 1996 MBARI                                             */
/****************************************************************************/
/* Summary  : Sets Vehicle Dive Number                                      */
/* Filename : diveNo.c                                                      */
/* Author   : Andrew Pearce                                                 */
/* Project  : Tiburon                                                       */
/* Version  : Version 1.0                                                   */
/* Created  : 10/17/96                                                      */
/* Modified : 10/17/96                                                      */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/* $Header:
 * $Log:
 */
/****************************************************************************/

#include <vxWorks.h>                /* vxWorks system declarations          */
#include <semLib.h>                 /* vxWorks semaphore functions          */
#include <stdioLib.h>               /* vxWorks standard I/O functions       */
#include <msgQLib.h>                /* vxWorks Message Queue Library        */

#include "mbariTypes.h"             /* MBARI style guide type declarations  */
#include "mbariConst.h"             /* Miscellaneous constants              */

#include "rovPriority.h"            /* MBARI Rov Application Priorities     */
#include "usrTime.h"                /* MBARI time and date functions        */

#include "datamgr.h"                /* Data Manager declarations            */
#include "dm_errno.h"               /* Data Manager error declarations      */

#include "tiburon.h"                /* Tiburon definitions                  */

/****************************************************************************/
/* Function    : setDiveNo                                                  */
/* Purpose     : Sets Dive No                                               */
/* Inputs      : Dive Number                                                */
/* Outputs     : NONE, but DM Item is modified                              */
/****************************************************************************/
   STATUS
setDiveNo( Nat32 diveNo )
{
    DM_Item diveNoDm;               /* Vehicle Dive Number Data Manager Item*/

    diveNoDm =
        initMicroDmItem(TIBURON_DM_PREFIX, TIBURON_DIVE_NO_DM, DM_NAT32, 1);

    dm_start_provider(diveNoDm, DM_STATIC);
    writeDmItem(diveNoDm, &diveNo, sizeof(diveNo));
    dm_stop_provider(diveNoDm);
} /* setDiveNo() */





