1 /* 2 * The contents of this file are subject to the Mozilla Public License 3 * Version 1.0 (the "License"); you may not use this file except in 4 * compliance with the License. You may obtain a copy of the License at 5 * http://www.mozilla.org/MPL/ 6 * 7 * Software distributed under the License is distributed on an "AS IS" 8 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the 9 * License for the specific language governing rights and limitations 10 * under the License. 11 * 12 * The Initial Developer of this code is David Baum. 13 * Portions created by David Baum are Copyright (C) 1998 David Baum. 14 * All Rights Reserved. 15 * 16 * Portions created by John Hansen are Copyright (C) 2005 John Hansen. 17 * All Rights Reserved. 18 * 19 */ 20 21 #ifndef __RCX_Result_h 22 #define __RCX_Result_h 23 24 typedef int RCX_Result; 25 26 // result codes 27 #define kRCX_OK 0 28 #define kRCX_OpenSerialError -1 // serial port could not be opened and/or configured 29 #define kRCX_IREchoError -2 // no echo receieved from IR tower 30 #define kRCX_ReplyError -3 // no (or invalid) reply from RCX 31 #define kRCX_RequestError -4 // attempt to send too much data 32 #define kRCX_FileError -5 // could not open/read/write file 33 #define kRCX_FormatError -6 // unknown file format 34 #define kRCX_AbortError -7 // canceled by RCX_Link::DownloadProgress() 35 #define kRCX_MemFullError -8 // not enough room in RCX program memory 36 37 // new error codes as of 2.4a3 38 #define kRCX_PipeModeError -9 // feature not supported by the pipe (e.g. CM target on IR tower) 39 #define kRCX_USBUnsupportedError -10 // USB is not yet supported (depends on the OS) 40 #define kRCX_GhostNotFoundError -11 // USB requires Ghost, which is not installed 41 42 #define kRCX_LastError -11 // last error code 43 44 #define RCX_ERROR(result) ((result) < 0) 45 46 #endif 47