Control of mbed using OSC. Based on code from the Make Controller. Right now you can turn the onboard LEDs on/off and toggle 8 digital out pins. More I/O will be done in the future.

Dependencies:   mbed

Committer:
pehrhovey
Date:
Wed Mar 17 03:17:38 2010 +0000
Revision:
0:439354122597

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pehrhovey 0:439354122597 1 /*********************************************************************************
pehrhovey 0:439354122597 2
pehrhovey 0:439354122597 3 Copyright 2006-2009 MakingThings
pehrhovey 0:439354122597 4
pehrhovey 0:439354122597 5 Licensed under the Apache License,
pehrhovey 0:439354122597 6 Version 2.0 (the "License"); you may not use this file except in compliance
pehrhovey 0:439354122597 7 with the License. You may obtain a copy of the License at
pehrhovey 0:439354122597 8
pehrhovey 0:439354122597 9 http://www.apache.org/licenses/LICENSE-2.0
pehrhovey 0:439354122597 10
pehrhovey 0:439354122597 11 Unless required by applicable law or agreed to in writing, software distributed
pehrhovey 0:439354122597 12 under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
pehrhovey 0:439354122597 13 CONDITIONS OF ANY KIND, either express or implied. See the License for
pehrhovey 0:439354122597 14 the specific language governing permissions and limitations under the License.
pehrhovey 0:439354122597 15
pehrhovey 0:439354122597 16 *********************************************************************************/
pehrhovey 0:439354122597 17
pehrhovey 0:439354122597 18 /*
pehrhovey 0:439354122597 19 error.h
pehrhovey 0:439354122597 20 Error return codes.
pehrhovey 0:439354122597 21 */
pehrhovey 0:439354122597 22
pehrhovey 0:439354122597 23 #ifndef ERROR_H
pehrhovey 0:439354122597 24 #define ERROR_H
pehrhovey 0:439354122597 25
pehrhovey 0:439354122597 26 /**
pehrhovey 0:439354122597 27 \defgroup Error Error Return Codes
pehrhovey 0:439354122597 28 Error return values for Make Controller API calls.
pehrhovey 0:439354122597 29 \ingroup Core
pehrhovey 0:439354122597 30 @{
pehrhovey 0:439354122597 31 */
pehrhovey 0:439354122597 32
pehrhovey 0:439354122597 33 /** All's well here */
pehrhovey 0:439354122597 34 #define CONTROLLER_OK 0
pehrhovey 0:439354122597 35 /** Can't get a lock on a resource */
pehrhovey 0:439354122597 36 #define CONTROLLER_ERROR_CANT_LOCK -1
pehrhovey 0:439354122597 37 /** There are too many other users on this resource */
pehrhovey 0:439354122597 38 #define CONTROLLER_ERROR_TOO_MANY_USERS -2
pehrhovey 0:439354122597 39 /** This resource has already been stopped too many times */
pehrhovey 0:439354122597 40 #define CONTROLLER_ERROR_TOO_MANY_STOPS -3
pehrhovey 0:439354122597 41 /** Lock attempt was unsuccessful */
pehrhovey 0:439354122597 42 #define CONTROLLER_ERROR_NOT_LOCKED -4
pehrhovey 0:439354122597 43 /** The requested index is not valid */
pehrhovey 0:439354122597 44 #define CONTROLLER_ERROR_ILLEGAL_INDEX -5
pehrhovey 0:439354122597 45 /** The requested ID is not valid */
pehrhovey 0:439354122597 46 #define CONTROLLER_ERROR_ILLEGAL_ID -6
pehrhovey 0:439354122597 47 /** Parameter is not valid */
pehrhovey 0:439354122597 48 #define CONTROLLER_ERROR_ILLEGAL_PARAMETER_VALUE -7
pehrhovey 0:439354122597 49 /** Resource is not open */
pehrhovey 0:439354122597 50 #define CONTROLLER_ERROR_NOT_OPEN -8
pehrhovey 0:439354122597 51 /** Not enough memory available */
pehrhovey 0:439354122597 52 #define CONTROLLER_ERROR_INSUFFICIENT_RESOURCES -9
pehrhovey 0:439354122597 53 /** Error reading data */
pehrhovey 0:439354122597 54 #define CONTROLLER_ERROR_BAD_DATA -10
pehrhovey 0:439354122597 55 /** Not enough space for the requested operation */
pehrhovey 0:439354122597 56 #define CONTROLLER_ERROR_NO_SPACE -11
pehrhovey 0:439354122597 57 /** Resource is missing */
pehrhovey 0:439354122597 58 #define CONTROLLER_ERROR_RESOURCE_MISSING -12
pehrhovey 0:439354122597 59 /** Board doesn't have an address */
pehrhovey 0:439354122597 60 #define CONTROLLER_ERROR_NO_ADDRESS -13
pehrhovey 0:439354122597 61 /** The operation has timed out */
pehrhovey 0:439354122597 62 #define CONTROLLER_ERROR_TIMEOUT -14
pehrhovey 0:439354122597 63 /** Address is not valid */
pehrhovey 0:439354122597 64 #define CONTROLLER_ERROR_BAD_ADDRESS -15
pehrhovey 0:439354122597 65 /** Data passed in the wrong format */
pehrhovey 0:439354122597 66 #define CONTROLLER_ERROR_BAD_FORMAT -16
pehrhovey 0:439354122597 67 /** Couldn't complete operation because the subsystem is inactive */
pehrhovey 0:439354122597 68 #define CONTROLLER_ERROR_SUBSYSTEM_INACTIVE -17
pehrhovey 0:439354122597 69 /** An error with the queue */
pehrhovey 0:439354122597 70 #define CONTROLLER_ERROR_QUEUE_ERROR -18
pehrhovey 0:439354122597 71 /** Property specified is not valid */
pehrhovey 0:439354122597 72 #define CONTROLLER_ERROR_UNKNOWN_PROPERTY -19
pehrhovey 0:439354122597 73 /** OSC data type is not valid */
pehrhovey 0:439354122597 74 #define CONTROLLER_ERROR_INCORRECT_DATA_TYPE -20
pehrhovey 0:439354122597 75 /** Couldn't find the type tag in this OSC message */
pehrhovey 0:439354122597 76 #define CONTROLLER_ERROR_NO_TYPE_TAG -21
pehrhovey 0:439354122597 77 /** No OSC property specified */
pehrhovey 0:439354122597 78 #define CONTROLLER_ERROR_NO_PROPERTY -22
pehrhovey 0:439354122597 79 /** The network is not up */
pehrhovey 0:439354122597 80 #define CONTROLLER_ERROR_NO_NETWORK -23
pehrhovey 0:439354122597 81 /** Specified string is too long */
pehrhovey 0:439354122597 82 #define CONTROLLER_ERROR_STRING_TOO_LONG -24
pehrhovey 0:439354122597 83 /** The system is not active */
pehrhovey 0:439354122597 84 #define CONTROLLER_ERROR_SYSTEM_NOT_ACTIVE -25
pehrhovey 0:439354122597 85 /** A requested write was unsuccessful */
pehrhovey 0:439354122597 86 #define CONTROLLER_ERROR_WRITE_FAILED -26
pehrhovey 0:439354122597 87 /** Not enough memory available for the requested operation */
pehrhovey 0:439354122597 88 #define CONTROLLER_ERROR_INSUFFICIENT_MEMORY -27
pehrhovey 0:439354122597 89 /** Task did not start successfully */
pehrhovey 0:439354122597 90 #define CONTROLLER_ERROR_CANT_START_TASK -28
pehrhovey 0:439354122597 91
pehrhovey 0:439354122597 92 /** Unexpected count returned */
pehrhovey 0:439354122597 93 #define CONTROLLER_ERROR_COUNT_MISMATCH -100
pehrhovey 0:439354122597 94 /** Requested operation failed to start */
pehrhovey 0:439354122597 95 #define CONTROLLER_ERROR_START_FAILED -101
pehrhovey 0:439354122597 96 /** Requested stop operation failed */
pehrhovey 0:439354122597 97 #define CONTROLLER_ERROR_STOP_FAILED -102
pehrhovey 0:439354122597 98 /** The user count is not valid */
pehrhovey 0:439354122597 99 #define CONTROLLER_ERROR_WRONG_USER_COUNT -103
pehrhovey 0:439354122597 100 /** A data structure's size was not valid */
pehrhovey 0:439354122597 101 #define CONTROLLER_ERROR_DATA_STRUCTURE_SIZE_WRONG -104
pehrhovey 0:439354122597 102 /** Initialization was not successful */
pehrhovey 0:439354122597 103 #define CONTROLLER_ERROR_INCORRECT_INIT -105
pehrhovey 0:439354122597 104 /** De-initialization was not successful */
pehrhovey 0:439354122597 105 #define CONTROLLER_ERROR_INCORRECT_DEINIT -106
pehrhovey 0:439354122597 106 /** An error occurred while trying to lock */
pehrhovey 0:439354122597 107 #define CONTROLLER_ERROR_LOCK_ERROR -107
pehrhovey 0:439354122597 108 /** An error occurred when granting a lock */
pehrhovey 0:439354122597 109 #define CONTROLLER_ERROR_LOCK_GRANTED_ERROR -108
pehrhovey 0:439354122597 110 /** A use error occurred */
pehrhovey 0:439354122597 111 #define CONTROLLER_ERROR_USE_GRANTED_ERROR -109
pehrhovey 0:439354122597 112 /** Initialization was not successful */
pehrhovey 0:439354122597 113 #define CONTROLLER_ERROR_INITIALIZATION -110
pehrhovey 0:439354122597 114
pehrhovey 0:439354122597 115 /* @} */
pehrhovey 0:439354122597 116 #endif // ERROR_H
pehrhovey 0:439354122597 117
pehrhovey 0:439354122597 118