csp_error.h
Go to the documentation of this file.
1 /*
2 Cubesat Space Protocol - A small network-layer protocol designed for Cubesats
3 Copyright (C) 2012 GomSpace ApS (http://www.gomspace.com)
4 Copyright (C) 2012 AAUSAT3 Project (http://aausat3.space.aau.dk)
5 
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10 
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15 
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20 
27 #ifndef _CSP_ERROR_H_
28 #define _CSP_ERROR_H_
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #define CSP_ERR_NONE 0 /* No error */
35 #define CSP_ERR_NOMEM -1 /* Not enough memory */
36 #define CSP_ERR_INVAL -2 /* Invalid argument */
37 #define CSP_ERR_TIMEDOUT -3 /* Operation timed out */
38 #define CSP_ERR_USED -4 /* Resource already in use */
39 #define CSP_ERR_NOTSUP -5 /* Operation not supported */
40 #define CSP_ERR_BUSY -6 /* Device or resource busy */
41 #define CSP_ERR_ALREADY -7 /* Connection already in progress */
42 #define CSP_ERR_RESET -8 /* Connection reset */
43 #define CSP_ERR_NOBUFS -9 /* No more buffer space available */
44 #define CSP_ERR_TX -10 /* Transmission failed */
45 #define CSP_ERR_DRIVER -11 /* Error in driver layer */
46 #define CSP_ERR_AGAIN -12 /* Resource temporarily unavailable */
47 
48 #define CSP_ERR_HMAC -100 /* HMAC failed */
49 #define CSP_ERR_XTEA -101 /* XTEA failed */
50 #define CSP_ERR_CRC32 -102 /* CRC32 failed */
51 
52 #ifdef __cplusplus
53 } /* extern "C" */
54 #endif
55 
56 #endif // _CSP_ERROR_H_
57 
58 /* @} */