/* VectorNav HSI Calibration Library v1.0.0.2
 *
 * Copyright (c) 2018 VectorNav Technologies, LLC
 *
 * This source code is proprietary to and copyrighted by VectorNav Technologies, LLC and is
 * available solely under license from VectorNav. All rights reserved. If you do not have a
 * license to use this source code from VectorNav, any use hereof is strictly prohibited by
 * U.S. law and other applicable law. This source code is restricted for use solely with the
 * products of VectorNav and as otherwise set forth in any agreement with VectorNav. Any
 * disclosure of this source code to the public or to any third party is also prohibited.
 */
#ifndef _VNCOMMON_H_
#define _VNCOMMON_H_

#include <stddef.h>
#include "vnenum.h"

#ifdef __cplusplus
extern "C" {
#endif

/** \brief Enumeration of the available asynchronous ASCII message types. */
enum VnAsciiAsync
{
  VNOFF  = 0,    /**< Asynchronous output is turned off. */
  VNYPR  = 1,    /**< Asynchronous output type is Yaw, Pitch, Roll. */
  VNQTN  = 2,    /**< Asynchronous output type is Quaternion. */
  VNQMR  = 8,    /**< Asynchronous output type is Quaternion, Magnetic, Acceleration and Angular Rates. */
  VNMAG  = 10,    /**< Asynchronous output type is Magnetic Measurements. */
  VNACC  = 11,    /**< Asynchronous output type is Acceleration Measurements. */
  VNGYR  = 12,    /**< Asynchronous output type is Angular Rate Measurements. */
  VNMAR  = 13,    /**< Asynchronous output type is Magnetic, Acceleration, and Angular Rate Measurements. */
  VNYMR  = 14,    /**< Asynchronous output type is Yaw, Pitch, Roll, Magnetic, Acceleration, and Angular Rate Measurements. */
  VNYBA  = 16,    /**< Asynchronous output type is Yaw, Pitch, Roll, Body True Acceleration. */
  VNYIA  = 17,    /**< Asynchronous output type is Yaw, Pitch, Roll, Inertial True Acceleration. */
  VNIMU  = 19,    /**< Asynchronous output type is Calibrated Inertial Measurements. */
  VNGPS  = 20,    /**< Asynchronous output type is GPS LLA. */
  VNGPE  = 21,    /**< Asynchronous output type is GPS ECEF. */
  VNINS  = 22,    /**< Asynchronous output type is INS LLA solution. */
  VNINE  = 23,    /**< Asynchronous output type is INS ECEF solution. */
  VNISL  = 28,    /**< Asynchronous output type is INS LLA 2 solution. */
  VNISE  = 29,    /**< Asynchronous output type is INS ECEF 2 solution. */
  VNDTV  = 30    /**< Asynchronous output type is Delta Theta and Delta Velocity. */
};

#ifndef __cplusplus
typedef enum VnAsciiAsync VnAsciiAsync_t;
#endif

/**\brief Converts a <c>VnAsciiAsync</c> to a string representation.
 * \param[out] out The char buffer to output the result to.
 * \param[in] outSize Size of the buffer <c>out</c>.
 * \param[in] v The <c>VnAsciiAsync</c> to convert.
 * \return Any errors encountered. */
enum VnError
to_string_VnAsciiAsync(
    char* out,
    size_t outSize,
    enum VnAsciiAsync v);

/**\brief Retrieves a short user-friendly description of the provided
 *     <c>VnAsciiAsync</c> value.
 * \param[out] out The buffer to place the string in.
 * \param[in] outSize Size of <c>out</c> buffer.
 * \param[in] value The <c>VnAsciiAsync</c> value to get a description for.
 * \return Any errors encountered. */
enum VnError
description_VnAsciiAsync(
    char *out,
    size_t outSize,
    enum VnAsciiAsync value);

#ifdef __cplusplus
}
#endif

#endif
