MakingThings
  • Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

error.h

00001 /*********************************************************************************
00002 
00003  Copyright 2006-2008 MakingThings
00004 
00005  Licensed under the Apache License, 
00006  Version 2.0 (the "License"); you may not use this file except in compliance 
00007  with the License. You may obtain a copy of the License at
00008 
00009  http://www.apache.org/licenses/LICENSE-2.0 
00010  
00011  Unless required by applicable law or agreed to in writing, software distributed
00012  under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
00013  CONDITIONS OF ANY KIND, either express or implied. See the License for
00014  the specific language governing permissions and limitations under the License.
00015 
00016 *********************************************************************************/
00017 
00018 /*
00019   error.h
00020   Error return codes.
00021 */
00022 
00023 #ifndef ERROR_H
00024 #define ERROR_H
00025 
00026 /**
00027 \defgroup Error Error Return Codes
00028 Error return values for Make Controller API calls.
00029 \ingroup Core
00030 @{
00031 */
00032 
00033 /** All's well here */
00034 #define CONTROLLER_OK                                0
00035 /** Can't get a lock on a resource */
00036 #define CONTROLLER_ERROR_CANT_LOCK                  -1
00037 /** There are too many other users on this resource */
00038 #define CONTROLLER_ERROR_TOO_MANY_USERS             -2
00039 /** This resource has already been stopped too many times */
00040 #define CONTROLLER_ERROR_TOO_MANY_STOPS             -3
00041 /** Lock attempt was unsuccessful */
00042 #define CONTROLLER_ERROR_NOT_LOCKED                 -4
00043 /** The requested index is not valid */
00044 #define CONTROLLER_ERROR_ILLEGAL_INDEX              -5
00045 /** The requested ID is not valid */
00046 #define CONTROLLER_ERROR_ILLEGAL_ID                 -6
00047 /** Parameter is not valid */
00048 #define CONTROLLER_ERROR_ILLEGAL_PARAMETER_VALUE    -7
00049 /** Resource is not open */
00050 #define CONTROLLER_ERROR_NOT_OPEN                   -8
00051 /** Not enough memory available */
00052 #define CONTROLLER_ERROR_INSUFFICIENT_RESOURCES     -9
00053 /** Error reading data */
00054 #define CONTROLLER_ERROR_BAD_DATA                   -10
00055 /** Not enough space for the requested operation */
00056 #define CONTROLLER_ERROR_NO_SPACE                   -11
00057 /** Resource is missing */
00058 #define CONTROLLER_ERROR_RESOURCE_MISSING           -12
00059 /** Board doesn't have an address */
00060 #define CONTROLLER_ERROR_NO_ADDRESS                 -13
00061 /** The operation has timed out */
00062 #define CONTROLLER_ERROR_TIMEOUT                    -14
00063 /** Address is not valid */
00064 #define CONTROLLER_ERROR_BAD_ADDRESS                -15
00065 /** Data passed in the wrong format */
00066 #define CONTROLLER_ERROR_BAD_FORMAT                 -16
00067 /** Couldn't complete operation because the subsystem is inactive */
00068 #define CONTROLLER_ERROR_SUBSYSTEM_INACTIVE         -17
00069 /** An error with the queue */
00070 #define CONTROLLER_ERROR_QUEUE_ERROR                -18
00071 /** Property specified is not valid */
00072 #define CONTROLLER_ERROR_UNKNOWN_PROPERTY           -19
00073 /** OSC data type is not valid */
00074 #define CONTROLLER_ERROR_INCORRECT_DATA_TYPE        -20
00075 /** Couldn't find the type tag in this OSC message */
00076 #define CONTROLLER_ERROR_NO_TYPE_TAG                -21
00077 /** No OSC property specified */
00078 #define CONTROLLER_ERROR_NO_PROPERTY                -22
00079 /** The network is not up */
00080 #define CONTROLLER_ERROR_NO_NETWORK                 -23
00081 /** Specified string is too long */
00082 #define CONTROLLER_ERROR_STRING_TOO_LONG            -24
00083 /** The system is not active */
00084 #define CONTROLLER_ERROR_SYSTEM_NOT_ACTIVE          -25
00085 /** A requested write was unsuccessful */
00086 #define CONTROLLER_ERROR_WRITE_FAILED               -26
00087 /** Not enough memory available for the requested operation */
00088 #define CONTROLLER_ERROR_INSUFFICIENT_MEMORY        -27
00089 /** Task did not start successfully */
00090 #define CONTROLLER_ERROR_CANT_START_TASK            -28
00091 
00092 /** Unexpected count returned */
00093 #define CONTROLLER_ERROR_COUNT_MISMATCH             -100
00094 /** Requested operation failed to start */
00095 #define CONTROLLER_ERROR_START_FAILED               -101
00096 /** Requested stop operation failed */
00097 #define CONTROLLER_ERROR_STOP_FAILED                -102
00098 /** The user count is not valid */
00099 #define CONTROLLER_ERROR_WRONG_USER_COUNT           -103
00100 /** A data structure's size was not valid */
00101 #define CONTROLLER_ERROR_DATA_STRUCTURE_SIZE_WRONG  -104
00102 /** Initialization was not successful */
00103 #define CONTROLLER_ERROR_INCORRECT_INIT             -105
00104 /** De-initialization was not successful */
00105 #define CONTROLLER_ERROR_INCORRECT_DEINIT           -106
00106 /** An error occurred while trying to lock */
00107 #define CONTROLLER_ERROR_LOCK_ERROR                 -107
00108 /** An error occurred when granting a lock */
00109 #define CONTROLLER_ERROR_LOCK_GRANTED_ERROR         -108
00110 /** A use error occurred */
00111 #define CONTROLLER_ERROR_USE_GRANTED_ERROR          -109
00112 /** Initialization was not successful */
00113 #define CONTROLLER_ERROR_INITIALIZATION             -110
00114 
00115 /* @} */
00116 #endif // ERROR_H
00117 
00118 

The Make Controller Kit is an open source project maintained by MakingThings.
MakingThings code is released under the Apache 2.0 license.
Bug tracker, development wiki and status can be found at http://dev.makingthings.com.
This document was last updated on 18 May 2009.