/*-=-=-=-=-=-=-=-=-=-=-=- RCCL/RCI Notice of Copyright -=-=-=-=-=-=-=-=-=-=-*
 *									    *
 *	Copyright (C) 1987, 1991 by John E. Lloyd.			    *
 *									    *
 *	Information on copyright permissions, as well as a complete	    *
 *	disclaimer of warranty, is given in the file COPYRIGHT.		    *
 *									    *
 *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/

/* ---- genernal types of errors ---- */

#define EMemory		100	/* system out of memory or shared memory */
#define ENoFile		101	/* file cannot be openned or accessed */
#define EBadFile	102	/* file is malformed or corrupted */
#define ENoDev		103	/* device cannot be openned */
#define EBadDev		104	/* device does not provide required support */
#define ENotAvail	105	/* resource not available */
#define EDuplicate	106	/* some name or option is duplicated */
#define EBusy		107	/* device or resource is currently busy */
#define ESyntax		108	/* syntax error in input ot file */
#define ERange		109	/* argument is out of range */
#define EDescriptor	110	/* bad or malformed descriptor argument */
#define ETableFull	111	/* an internal buffer is full */
#define ETooMany	112	/* too many things specified; overflow */
#define ETimeout	113	/* timeout condition raised */
#define ETooLate	114	/* past the deadline! */
#define EEnviron	115	/* can't find required environment variable */
#define ENoSpecify	116	/* something not previously specified */
#define ENotDefined	117	/* no definition found for specified item */
#define EDeadLock	118	/* dead lock condition detected */
#define ENoSpace	119	/* out of allocatable space */
#define EBadArg		120	/* illegal argument value */
#define ENotSupported	121	/* feature not supported by current system */

/* ---- specific errors related to RCI primitives ---- */

#define EConfigSyntax	150	/* syntax or format error in config file */
#define EConfigParams	151	/* invalid parameter value in config file */
#define ENoSchedAvail	152	/* No scheduler available */
#define ENoInterDev	153	/* No interrupt device for task */
#define ENoIODevice	154 	/* No I/O device given for task */
#define ENoPageAlign	155	/* argument is not page aligned */
#define ETaskActive	156	/* control task is currently active */
#define EAuxHalted	157	/* aux CPU seems to be in console mode */

/* ---- errors related to the control task monitors ---- */

#define EInitFxn	200	/* error in task initialization function */
#define EInitRbt	201	/* error in robot initialization function */
#define ETaskFxn	202	/* error reported by task function */
#define ERbtFxn		203	/* error reported by robot interface function*/
#define ERunTimeout	204	/* Task took too long to execute */
#define EBlkTimeout	205	/* Task had to wait too long to run */
#define ELagTimeout	206	/* Task fell too far behind schedule */
#define EBadTask	207	/* Primitive call made from wrong task */

/* ---- error codes related to robot interface functions ---- */

#define ERobotError	250	/* robot reports error */
#define ELimit		251	/* general limit exceeded condition */
#define EBadCmd		252	/* bad command specified */
#define EMaxPos		253	/* position exceeds limits */
#define EMaxVel		254	/* velocity exceeds limits */
#define EMaxTor		255	/* torque exceeds limits */
#define EReqPos		256	/* requested position out of bounds */
#define EReqVel		257	/* requested velocity exceeds limits */
#define EReqTor		258	/* requested torque exceeds limits */
#define EEStop		259	/* emergency stop switch hit */
#define ESingular	260	/* robot is at singularity */

/* ---- errors related to the I/O device drivers ---- */

#define ETransmit	300	/* data corruption detected */
#define ECount		301	/* too much data received or transmitted */
#define ESync		302	/* we lost sync on IO */
#define EConnect	303	/* target device is not ready, can't connect*/
#define EBadIoctl	304	/* bad ioctl to the device driver */

/* ---- error codes related to RCCL and robot control ----- */

#define EBadMove	350	/* illegal robot motion specified */
#define ENoT6		351	/* position equation had no T6 value */

/* ---- error codes related to system failure or mis-configuration ---- */

#define EBadAccess	500	/* can't access system file or device */
#define EBadObj		501	/* system file or device is corrupted */
#define EBadFxn		502	/* bad or missing table-referenced function */
#define EInternal	503	/* internal software error or failure */

#define EFatal		600	/* user code indicating fatal condition */
