/*!
  \file
  \brief URG のエラーコード

  \author Satofumi KAMIMURA

  $Id: urg_errno.c 1299 2009-09-15 00:56:12Z satofumi $
*/

#include "urg_errno.h"


/* エラー文字列を返す */
const char* urg_strerror(const int errno)
{
  /* !!! 追加、変更に弱すぎ。修正すべき */

  const char *errorStr[] = {
    "No Error.",
    "Not Implemented.",
    "Send fail.",
    "Receive fail.",
    "SCIP1.1 protocol is not supported. Please update URG firmware.",
    "SS fail.",
    "Adjust baudrate fail.",
    "Invalid parameters.",
    "Urg invalid response.",
    "Serial connection fail.",
    "Serial receive fail.",
    "Response mismatch.",
    "No Response.",
    "UTM-30LX is not supported GD_INTENSITY. Please use MD_INTENSITY",
    "dummy.",

    /* !!! */
  };

  return errorStr[-errno];
}
