COSMOS core  1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
cosmos-errno.h
Go to the documentation of this file.
1 /********************************************************************
2 * Copyright (C) 2015 by Interstel Technologies, Inc.
3 * and Hawaii Space Flight Laboratory.
4 *
5 * This file is part of the COSMOS/core that is the central
6 * module for COSMOS. For more information on COSMOS go to
7 * <http://cosmos-project.com>
8 *
9 * The COSMOS/core software is licenced under the
10 * GNU Lesser General Public License (LGPL) version 3 licence.
11 *
12 * You should have received a copy of the
13 * GNU Lesser General Public License
14 * If not, go to <http://www.gnu.org/licenses/>
15 *
16 * COSMOS/core is free software: you can redistribute it and/or
17 * modify it under the terms of the GNU Lesser General Public License
18 * as published by the Free Software Foundation, either version 3 of
19 * the License, or (at your option) any later version.
20 *
21 * COSMOS/core is distributed in the hope that it will be useful, but
22 * WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 * Lesser General Public License for more details.
25 *
26 * Refer to the "licences" folder for further information on the
27 * condititons and terms to use this software.
28 ********************************************************************/
29 
30 #ifndef _COSMOS_ERROR_H
31 #define _COSMOS_ERROR_H 1
32 
33 #include "support/configCosmos.h"
34 #include <errno.h>
35 
39 
51 // All COSMOS errors are less than -200 since the range of standard system errors
52 // is 1-200
53 #define GS232B_ERROR_OPEN -201
54 #define GS232B_ERROR_CLOSED -202
55 #define GS232B_ERROR_OUTOFRANGE -203
56 #define GS232B_ERROR_SEND -204
57 
59 #define MICROSTRAIN_ERROR_OPEN -211
60 #define MICROSTRAIN_ERROR_CLOSED -212
61 #define MICROSTRAIN_ERROR_OUTOFRANGE -213
62 #define MICROSTRAIN_ERROR_FAILED -214
63 #define MICROSTRAIN_ERROR_TOOMANY -215
64 #define MICROSTRAIN_ERROR_FUNCTION -216
65 #define MICROSTRAIN_ERROR_SEND -217
66 
67 #define SINCLAIR_ERROR_OPEN -221
68 #define SINCLAIR_ERROR_CLOSED -222
69 #define SINCLAIR_ERROR_OUTOFRANGE -223
70 #define SINCLAIR_ERROR_FAILED -224
71 #define SINCLAIR_ERROR_TOOMANY -225
72 
73 #define NSP_ERROR_CRC -226
74 #define NSP_ERROR_SIZE -227
75 #define NSP_ERROR_NACK -228
76 
77 #define TS2000_ERROR_OPEN -231
78 #define TS2000_ERROR_CLOSED -232
79 #define TS2000_ERROR_OUTOFRANGE -233
80 
81 #define VMT35_ERROR_RODNUM -241
82 #define VMT35_ERROR_BYTE -242
83 #define VMT35_ERROR_OUTOFRANGE -243
84 #define VMT35_ERROR_OPENED -244
85 #define VMT35_ERROR_CLOSED -245
86 #define VMT35_ERROR_NACK -246
87 #define VMT35_ERROR_CRC -247
88 #define VMT35_ERROR_DEVNAME -248
89 
90 #define JSON_ERROR_NAME_LENGTH -251
91 #define JSON_ERROR_DATA_LENGTH -252
92 #define JSON_ERROR_INDEX_SIZE -253
93 #define JSON_ERROR_NOJMAP -254
94 #define JSON_ERROR_NOENTRY -255
95 #define JSON_ERROR_EOS -256
96 #define JSON_ERROR_SCAN -257
97 #define JSON_ERROR_JSTRING -258
98 #define JSON_ERROR_NAN -259
99 
100 #define SLIP_ERROR_CRC -261
101 #define SLIP_ERROR_PACKING -262
102 #define SLIP_ERROR_BUFFER -263
103 
104 #define AGENT_ERROR_SERVER_RUNNING -270
105 #define AGENT_ERROR_JSON_CREATE -271
106 #define AGENT_ERROR_REQ_COUNT -272
107 #define AGENT_ERROR_MEMORY -273
108 #define AGENT_ERROR_SOCKET -274
109 #define AGENT_ERROR_CHANNEL -275
110 #define AGENT_ERROR_BUFLEN -276
111 #define AGENT_ERROR_NULL -277
112 #define AGENT_ERROR_DISCOVERY -278
113 #define AGENT_ERROR_REQUEST -279
114 
115 #define MATH_ERROR_GJ_UNDEFINED -281
116 #define MATH_ERROR_GJ_OUTOFRANGE -282
117 
118 #define AGENT_ERROR_LCM_CREATE -291
119 #define AGENT_ERROR_LCM_SUBSCRIBE -292
120 #define AGENT_ERROR_LCM_TIMEOUT -293
121 
122 #define RW_ERROR_OPEN -301
123 #define RW_ERROR_CLOSED -302
124 #define RW_ERROR_OUTOFRANGE -303
125 #define RW_ERROR_FAILED -304
126 #define RW_ERROR_TOOMANY -305
127 #define RW_ERROR_SEND -306
128 
129 #define STK_ERROR_LOWINDEX -311
130 #define STK_ERROR_HIGHINDEX -312
131 #define STK_ERROR_OUTOFRANGE -313
132 #define STK_ERROR_NOTFOUND -314
133 
134 #define DEM_ERROR_SEMINIT -321
135 #define DEM_ERROR_OPEN -322
136 #define DEM_ERROR_INSUFFICIENT_MEMORY -323
137 #define DEM_ERROR_NOTFOUND -324
138 
139 #define TLE_ERROR_OUTOFRANGE -331
140 #define ORBIT_ERROR_NOTSUPPORTED -332
141 #define TLE_ERROR_NOTFOUND -334
142 
143 #define NODE_ERROR_NODE -341 // node.ini does not exist
144 #define NODE_ERROR_GROUNDSTATION -342
145 #define NODE_ERROR_ROOTDIR -343
146 
147 #define MOST_USER_CANCELLED -351
148 
149 #define DATA_ERROR_ARCHIVE -361
150 #define DATA_ERROR_SIZE_MISMATCH -362
151 #define DATA_ERROR_CRC -363
152 #define DATA_ERROR_FORMAT -364
153 #define DATA_ERROR_RESOURCES_FOLDER -365 // if agent can't find the cosmos/resources folder
154 #define DATA_ERROR_NODES_FOLDER -366
155 #define DATA_ERROR_ROOT_FOLDER -367
156 
157 #define GIGE_ERROR_NACK -371
158 
159 #define CSSL_ERROR_BASE -380
160 #define CSSL_ERROR_CHECKSUM -381
161 #define CSSL_ERROR_READ -382
162 #define CSSL_ERROR_TIMEOUT -383
163 #define CSSL_ERROR_EOT -384
164 #define CSSL_ERROR_SLIPIN -385
165 #define CSSL_ERROR_SLIPOUT -386
166 #define CSSL_ERROR_BUFFER_SIZE_EXCEEDED -387
167 #define CSSL_ERROR_BAD_ESCAPE -388
168 
169 #define SERIAL_ERROR_CHECKSUM -381
170 #define SERIAL_ERROR_READ -382
171 #define SERIAL_ERROR_TIMEOUT -383
172 #define SERIAL_ERROR_EOT -384
173 #define SERIAL_ERROR_SLIPIN -385
174 #define SERIAL_ERROR_SLIPOUT -386
175 #define SERIAL_ERROR_BUFFER_SIZE_EXCEEDED -387
176 #define SERIAL_ERROR_BAD_ESCAPE -388
177 #define SERIAL_ERROR_OPEN -389
178 
179 
180 #define IC9100_ERROR_OPEN -391
181 #define IC9100_ERROR_CLOSED -392
182 #define IC9100_ERROR_OUTOFRANGE -393
183 #define IC9100_ERROR_WRITE -394
184 #define IC9100_ERROR_NG -395
185 #define IC9100_ERROR_READ -396
186 #define IC9100_ERROR_ADDR -397
187 
188 #define GPS_ERROR_OPEN -401
189 #define GPS_ERROR_CLOSED -402
190 
191 #define OEMV_ERROR_OPEN -411
192 #define OEMV_ERROR_CLOSED -412
193 #define OEMV_ERROR_CRC -413
194 #define OEMV_ERROR_RESPONSE -414
195 
196 #define PIC_ERROR_OPEN -421
197 #define PIC_ERROR_CLOSED -422
198 #define PIC_ERROR_PORT -423
199 #define PIC_ERROR_NACK -424
200 #define PIC_ERROR_SIZE -425
201 #define PIC_ERROR_ERR -426
202 #define PIC_ERROR_TYPE -427
203 
204 #define ASTRODEV_ERROR_HEADER_CS -431
205 #define ASTRODEV_ERROR_SYNC0 -432
206 #define ASTRODEV_ERROR_NACK -433
207 #define ASTRODEV_ERROR_PAYLOAD_CS -434
208 #define ASTRODEV_ERROR_SYNC1 -435
209 #define ASTRODEV_ERROR_HEADER -436
210 #define ASTRODEV_ERROR_PAYLOAD -437
211 
212 #define SUCHI_ERROR_CLOSED -441
213 
214 #define VN100_ERROR_OPEN -451
215 #define VN100_ERROR_NACK -452
216 #define VN100_ERROR_SCAN -453
217 
218 #define ISC_ERROR_CLOSED -461
219 
220 #define TRANSFER_ERROR_MATCH -471
221 #define TRANSFER_ERROR_QUEUEFULL -472
222 #define TRANSFER_ERROR_INDEX -473
223 #define TRANSFER_ERROR_NODE -474
224 #define TRANSFER_ERROR_FILENAME -475
225 #define TRANSFER_ERROR_DUPLICATE -476
226 #define TRANSFER_ERROR_FILESIZE -477
227 #define TRANSFER_ERROR_FILEZERO -478
228 
229 #define SOCKET_ERROR_CS -481
230 #define SOCKET_ERROR_PROTOCOL -482
231 #define SOCKET_READ_TIMEOUT -483
232 #define SOCKET_ERROR_OPEN -484
233 #define SOCKET_ERROR_OPEN_RECEIVE -485
234 #define SOCKET_ERROR_OPEN_TRANSMIT -486
235 #define SOCKET_ERROR_OPEN_CONNECT -487
236 #define SOCKET_ERROR_CLOSE -488
237 
238 #define TRIMBLE_ERROR_CS -491
239 
240 #define JPLEPHEM_ERROR_NOTFOUND -501
241 #define JPLEPHEM_ERROR_INSUFFICIENT_MEMORY -502
242 #define JPLEPHEM_ERROR_OUTOFRANGE -503
243 #define JPLEPHEM_ERROR_NUTATIONS -504
244 #define JPLEPHEM_ERROR_LIBRATIONS -505
245 
246 #define GEOMAG_ERROR_NOTFOUND -511 // WMM File not found
247 #define GEOMAG_ERROR_OUTOFRANGE -512
248 
249 #define PRKX2SU_ERROR_OPEN -521
250 #define PRKX2SU_ERROR_CLOSED -522
251 #define PRKX2SU_ERROR_OUTOFRANGE -523
252 #define PRKX2SU_ERROR_SEND -524
253 
254 #define CONVERT_ERROR_UTC -531
255 
256 
257 #define CUBEADCS_SERIALCOMM_RESPONSE -601
258 #define CUBEADCS_INVALID_RESPONSE -602
259 #define CUBEADCS_NOT_CONNECTED -603
260 #define CUBEADCS_SERIAL_PROTOCOL -604
261 
262 #define CLYDE_EPS_NOT_CONNECTED -611
263 #define CLYDE_BATTERY_NOT_CONNECTED -612
264 #define CLYDE_GENERAL_BAD_ADDRESS -613
265 
266 #define MEADE_MOUNT_ERROR_NOT_CONNECTED -620
267 #define MEADE_MOUNT_ERROR_BAD_RESPONSE -621
268 #define MEADE_MOUNT_ERROR_VALUE_INVALID -622
269 #define MEADE_MOUNT_ERROR_OUTSIDE_LIMITS -623
270 
271 #define SCPI_ERROR_NOT_CONNECTED -630
272 #define SCPI_ERROR_BAD_RESPONSE -631
273 #define SCPI_ERROR_VALUE_INVALID -632
274 #define SCPI_ERROR_OUTSIDE_LIMITS -633
275 #define SCPI_ERROR_OUTSIDE_RANGE -634
276 
277 #define GENERAL_OK 0 /* everything is all right */
278 #define GENERAL_ERROR_NO_SIGNAL -2001 /* there's no free signal */
279 #define GENERAL_ERROR_NOTSTARTED -2002 /* uninitialized error */
280 #define GENERAL_ERROR_NULLPOINTER -2003 /* you gave a null pointer to the function */
281 #define GENERAL_ERROR_OOPS -2004 /* internal error, something's erong */
282 #define GENERAL_ERROR_MEMORY -2005 /* there's no memory for more of something */
283 #define GENERAL_ERROR_OPEN -2006 /* file doesnt exist or you aren't good user */
284 #define GENERAL_ERROR_CRC -2007 /* crc error */
285 #define GENERAL_ERROR_OVERSIZE -2008 /* input was too large */
286 #define GENERAL_ERROR_ZEROSIZE -2009 /* input cannot be zero size */
287 #define GENERAL_ERROR_UNIMPLEMENTED -2010 /* command is not implemented */
288 #define GENERAL_ERROR_EMPTY -2011 /* usually indicates that a buffer was empty */
289 #define GENERAL_ERROR_UNHANDLED_ERR -2012 /* error that is not currently handled */
290 #define GENERAL_ERROR_UNDERSIZE -2013 /* packet is smaller than expected size */
291 #define GENERAL_ERROR_BAD_SIZE -2014 /* packet is an invalid size */
292 #define GENERAL_ERROR_TIMEOUT -2015 /* a timer expired */
293 #define GENERAL_ERROR_INPUT -2016 /* invalid input was provided */
294 #define GENERAL_ERROR_OUTPUT -2017 /* output from a routine returned bad output, possibly related to bad input */
295 #define GENERAL_ERROR_UNDEFINED -2018
296 #define GENERAL_ERROR_OUTOFRANGE -2019
297 #define GENERAL_ERROR_NOTREADY -2020
298 #define GENERAL_ERROR_BUSY -2021
299 #define GENERAL_ERROR_NO_CARRIER -2022
300 #define GENERAL_ERROR_NO_DIALTONE -2023
301 #define GENERAL_ERROR_NO_ANSWER -2024
302 #define GENERAL_ERROR_DUPLICATE -2025
303 #define GENERAL_ERROR_MISMATCH -2026
304 #define GENERAL_ERROR_ERROR -2027
305 #define GENERAL_ERROR_ARGS -2028
306 #define GENERAL_ERROR_TOO_LOW -2029
307 
308 #define GPHOTO2_ERROR -3000
309 
310 
312 
313 
317 string cosmos_error_string(int32_t cosmos_errno);
319 
320 #endif
string cosmos_error_string(int32_t cosmos_errno)
Definition: cosmos-errno.cpp:45
Headers and definitions common to all COSMOS.