SFBErrors.h

Go to the documentation of this file.
00001 /*                                              -*- mode:C++; fill-column:100 -*-
00002   SFBErrors.h - Names for SFB errors, in terms of 'blink maps'.
00003   Copyright (C) 2008 The Regents of the University of New Mexico.  All rights reserved.
00004 
00005   This library is free software; you can redistribute it and/or
00006   modify it under the terms of the GNU Lesser General Public
00007   License as published by the Free Software Foundation; either
00008   version 2.1 of the License, or (at your option) any later version.
00009 
00010   This library is distributed in the hope that it will be useful,
00011   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013   Lesser General Public License for more details.
00014 
00015   You should have received a copy of the GNU General Public License
00016   along with this library; if not, write to the Free Software
00017   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
00018   USA
00019 */
00020 
00052 #ifndef SFBERRORS_H_
00053 #define SFBERRORS_H_
00054 
00055 #include "SFBConstants.h"
00056 
00057 #define E_API_DEBUG_POISON0      BLINK_MAP(1,0,0)  
00058 #define E_API_DEBUG_POISON1      BLINK_MAP(1,0,1)  
00059 #define E_API_DEBUG_POISON2      BLINK_MAP(1,0,2)  
00060 #define E_API_DEBUG_POISON3      BLINK_MAP(1,0,3)  
00061 #define E_API_DEBUG_POISON4      BLINK_MAP(1,0,4)  
00062 #define E_API_DEBUG_POISON5      BLINK_MAP(1,0,5)  
00063 #define E_API_DEBUG_POISON6      BLINK_MAP(1,0,6)  
00065 #define E_API_ARGUMENT           BLINK_MAP(1,1,0)  
00066 #define E_API_ILLEGAL_STATE      BLINK_MAP(1,1,1)  
00067 #define E_API_BAD_PIN            BLINK_MAP(1,1,2)  
00068 #define E_API_BAD_FACE           BLINK_MAP(1,1,3)  
00069 #define E_API_MAX_RANGE          BLINK_MAP(1,1,4)  
00070 #define E_API_TRUE               BLINK_MAP(1,1,5)  
00071 #define E_API_FALSE              BLINK_MAP(1,1,6)  
00073 #define E_API_PACKET_ERROR       BLINK_MAP(1,2,0)  
00074 #define E_API_EQUAL              BLINK_MAP(1,2,1)  
00075 #define E_API_ZERO               BLINK_MAP(1,2,2)  
00076 #define E_API_NONZERO            BLINK_MAP(1,2,3)  
00077 #define E_API_NOT_EQUAL          BLINK_MAP(1,2,4)  
00078 #define E_API_LESS               BLINK_MAP(1,2,5)  
00079 #define E_API_LESS_EQUAL         BLINK_MAP(1,2,6)  
00081 #define E_API_GREATER            BLINK_MAP(1,3,0)  
00082 #define E_API_GREATER_EQUAL      BLINK_MAP(1,3,1)  
00083 #define E_API_PURE_VIRTUAL       BLINK_MAP(1,3,2)  
00084 #define E_API_MALLOC_CALL        BLINK_MAP(1,3,3)  
00085 #define E_API_FREE_CALL          BLINK_MAP(1,3,4)  
00086 #define E_API_REFLEX_FULL        BLINK_MAP(1,3,5)  
00087 #define E_API_BAD_REFLEX         BLINK_MAP(1,3,6)  
00089 #define E_API_BAD_BAUD           BLINK_MAP(1,4,0)  
00090 #define E_API_BAD_ALARM          BLINK_MAP(1,4,1)  
00091 #define E_API_NULL_HANDLER       BLINK_MAP(1,4,2)  
00092 #define E_API_BAD_TRIGGER        BLINK_MAP(1,4,3)  
00093 #define E_API_BAD_FORGET         BLINK_MAP(1,4,4)  
00094 #define E_API_MEMCPY             BLINK_MAP(1,4,5)  
00095 #define E_API_FORMAT_ARG         BLINK_MAP(1,4,6)  
00097 #define E_API_HALFWORD_ALIGNED   BLINK_MAP(1,5,0)  
00098 #define E_API_WORD_ALIGNED       BLINK_MAP(1,5,1)  
00099 #define E_API_DOUBLEWORD_ALIGNED BLINK_MAP(1,5,2)  
00100 #define E_API_BAD_SECTOR         BLINK_MAP(1,5,3)  
00101 #define E_API_REFLEX_REDEF       BLINK_MAP(1,5,4)  
00102 #define E_API_CXA_GUARD          BLINK_MAP(1,5,5)  
00103 #define E_API_NO_MORE_ALARMS     BLINK_MAP(1,5,6)  
00105 #define E_API_POSITIVE           BLINK_MAP(1,6,0)  
00106 #define E_API_NONNEGATIVE        BLINK_MAP(1,6,1)  
00107 #define E_API_DEAD_FRAME         BLINK_MAP(1,6,2)  
00108 #define E_API_NO_TRANSPORT       BLINK_MAP(1,6,3)  
00109 #define E_API_TRANSPORT_CONFIG   BLINK_MAP(1,6,4)  
00110 #define E_API_USE_BEFORE_INIT    BLINK_MAP(1,6,5)  
00112 #define E_API_NULL_PACKET        BLINK_MAP(2,0,1)  
00113 #define E_API_NULL_POINTER       BLINK_MAP(2,0,2)  
00114 #define E_API_POINTER_ALIGNMENT  BLINK_MAP(2,0,3)  
00115 #define E_API_INVALID_PACKET     BLINK_MAP(2,0,4)  
00116 #define E_API_NOT_HEAP_PACKET    BLINK_MAP(2,0,5)  
00117 #define E_API_BAD_FREE_ARG       BLINK_MAP(2,0,6)  
00119 #define E_API_BAD_FORMAT_CODE    BLINK_MAP(2,1,0)  
00120 #define E_API_BAD_INTERRUPT_PIN  BLINK_MAP(2,1,1)  
00121 #define E_API_NO_MORE_INTERRUPTS BLINK_MAP(2,1,2)  
00122 #define E_API_EEPROM_ADDRESS     BLINK_MAP(2,1,3)  
00123 #define E_API_EEPROM_RESPONSE    BLINK_MAP(2,1,4)  
00124 #define E_API_EEPROM_DATA        BLINK_MAP(2,1,5)  
00125 #define E_API_BUFFER_LOCKED      BLINK_MAP(2,1,6)  
00127 #define E_API_RESOURCE_EXHAUSTED BLINK_MAP(2,2,0)  
00128 #define E_API_EXIT_CALLED        BLINK_MAP(2,2,1)  
00129 #define E_API_NONNULL_POINTER    BLINK_MAP(2,2,2)  
00131 #define E_HW_UNDEF               BLINK_MAP(4,0,0)  
00132 #define E_HW_DABT                BLINK_MAP(4,0,1)  
00133 #define E_HW_PABT                BLINK_MAP(4,0,2)  
00134 #define E_HW_SWI                 BLINK_MAP(4,0,3)  
00135 #define E_HW_FIQ                 BLINK_MAP(4,0,4)  
00137 #define E_B3_IAP_FAILURE         BLINK_MAP(4,1,0)  
00138 #define E_B3_VERIFY_FAILURE      BLINK_MAP(4,1,1)  
00140 #define E_BUG_NO_SETUP           BLINK_MAP(6,0,1)  
00141 #define E_BUG_NO_LOOP            BLINK_MAP(6,0,2)  
00143 #define E_BUG_STACK_CORRUPT      BLINK_MAP(6,0,3)  
00147 #define E_BUG_UNIMPLEMENTED      BLINK_MAP(6,1,1)  
00148 #define E_BUG_REFLEX_RECURSION   BLINK_MAP(6,1,2)  
00149 #define E_BUG_INCONSISTENT_STATE BLINK_MAP(6,1,3)  
00150 #define E_BUG_RECURSIVE_DEATH    BLINK_MAP(6,1,4)  
00152 #define E_BUG_UNSPECIFIED_BUG    BLINK_MAP(6,6,6)  
00155 /****************** Bug macros, and death function declarations ******************/
00156 
00157 extern
00158 #ifdef __cplusplus
00159  "C"
00160 #endif
00161 
00163 void _apiError_(u32 blinkCode, const char * file, int lineno) __attribute__ ((noreturn));
00177 #define BUG_CODE(message,code) _apiError_(code, #message " - " __FILE__, __LINE__)
00178 
00188 #define BUG(message) BUG_CODE(message, E_BUG_UNSPECIFIED_BUG)
00189 
00198 #define BUG_IF_CODE(code, condition) do { if (condition) BUG_CODE("", code); } while (0)
00199 
00206 #define BUG_UNIMPLEMENTED() BUG_CODE("Unimplemented",E_BUG_UNIMPLEMENTED)
00207 
00208 
00209 
00210 #endif /*SFBERRORS_H_*/

Generated on Fri Apr 22 06:54:11 2011 for SFB by doxygen 1.5.9