Hi. This is the feed program for Cosm. (The previous name of the services is Pachube.)
Dependencies: mbed ThermistorPack Pachube ConfigFile EthernetNetIf TextLCD HTTPClient_ToBeRemoved FatFileSystem SDFileSystem
extlib/EthernetNetIf/LPC1768/lwip/include/lwip/debug.h@0:521ba375aa0f, 2012-08-06 (annotated)
- Committer:
- shintamainjp
- Date:
- Mon Aug 06 12:37:59 2012 +0000
- Revision:
- 0:521ba375aa0f
Pachube renamed to Cosm.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shintamainjp | 0:521ba375aa0f | 1 | /* |
shintamainjp | 0:521ba375aa0f | 2 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science. |
shintamainjp | 0:521ba375aa0f | 3 | * All rights reserved. |
shintamainjp | 0:521ba375aa0f | 4 | * |
shintamainjp | 0:521ba375aa0f | 5 | * Redistribution and use in source and binary forms, with or without modification, |
shintamainjp | 0:521ba375aa0f | 6 | * are permitted provided that the following conditions are met: |
shintamainjp | 0:521ba375aa0f | 7 | * |
shintamainjp | 0:521ba375aa0f | 8 | * 1. Redistributions of source code must retain the above copyright notice, |
shintamainjp | 0:521ba375aa0f | 9 | * this list of conditions and the following disclaimer. |
shintamainjp | 0:521ba375aa0f | 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
shintamainjp | 0:521ba375aa0f | 11 | * this list of conditions and the following disclaimer in the documentation |
shintamainjp | 0:521ba375aa0f | 12 | * and/or other materials provided with the distribution. |
shintamainjp | 0:521ba375aa0f | 13 | * 3. The name of the author may not be used to endorse or promote products |
shintamainjp | 0:521ba375aa0f | 14 | * derived from this software without specific prior written permission. |
shintamainjp | 0:521ba375aa0f | 15 | * |
shintamainjp | 0:521ba375aa0f | 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED |
shintamainjp | 0:521ba375aa0f | 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
shintamainjp | 0:521ba375aa0f | 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT |
shintamainjp | 0:521ba375aa0f | 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
shintamainjp | 0:521ba375aa0f | 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT |
shintamainjp | 0:521ba375aa0f | 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
shintamainjp | 0:521ba375aa0f | 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
shintamainjp | 0:521ba375aa0f | 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
shintamainjp | 0:521ba375aa0f | 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY |
shintamainjp | 0:521ba375aa0f | 25 | * OF SUCH DAMAGE. |
shintamainjp | 0:521ba375aa0f | 26 | * |
shintamainjp | 0:521ba375aa0f | 27 | * This file is part of the lwIP TCP/IP stack. |
shintamainjp | 0:521ba375aa0f | 28 | * |
shintamainjp | 0:521ba375aa0f | 29 | * Author: Adam Dunkels <adam@sics.se> |
shintamainjp | 0:521ba375aa0f | 30 | * |
shintamainjp | 0:521ba375aa0f | 31 | */ |
shintamainjp | 0:521ba375aa0f | 32 | #ifndef __LWIP_DEBUG_H__ |
shintamainjp | 0:521ba375aa0f | 33 | #define __LWIP_DEBUG_H__ |
shintamainjp | 0:521ba375aa0f | 34 | |
shintamainjp | 0:521ba375aa0f | 35 | #include "lwip/arch.h" |
shintamainjp | 0:521ba375aa0f | 36 | |
shintamainjp | 0:521ba375aa0f | 37 | /** lower two bits indicate debug level |
shintamainjp | 0:521ba375aa0f | 38 | * - 0 all |
shintamainjp | 0:521ba375aa0f | 39 | * - 1 warning |
shintamainjp | 0:521ba375aa0f | 40 | * - 2 serious |
shintamainjp | 0:521ba375aa0f | 41 | * - 3 severe |
shintamainjp | 0:521ba375aa0f | 42 | */ |
shintamainjp | 0:521ba375aa0f | 43 | #define LWIP_DBG_LEVEL_ALL 0x00 |
shintamainjp | 0:521ba375aa0f | 44 | #define LWIP_DBG_LEVEL_OFF LWIP_DBG_LEVEL_ALL /* compatibility define only */ |
shintamainjp | 0:521ba375aa0f | 45 | #define LWIP_DBG_LEVEL_WARNING 0x01 /* bad checksums, dropped packets, ... */ |
shintamainjp | 0:521ba375aa0f | 46 | #define LWIP_DBG_LEVEL_SERIOUS 0x02 /* memory allocation failures, ... */ |
shintamainjp | 0:521ba375aa0f | 47 | #define LWIP_DBG_LEVEL_SEVERE 0x03 |
shintamainjp | 0:521ba375aa0f | 48 | #define LWIP_DBG_MASK_LEVEL 0x03 |
shintamainjp | 0:521ba375aa0f | 49 | |
shintamainjp | 0:521ba375aa0f | 50 | /** flag for LWIP_DEBUGF to enable that debug message */ |
shintamainjp | 0:521ba375aa0f | 51 | #define LWIP_DBG_ON 0x80U |
shintamainjp | 0:521ba375aa0f | 52 | /** flag for LWIP_DEBUGF to disable that debug message */ |
shintamainjp | 0:521ba375aa0f | 53 | #define LWIP_DBG_OFF 0x00U |
shintamainjp | 0:521ba375aa0f | 54 | |
shintamainjp | 0:521ba375aa0f | 55 | /** flag for LWIP_DEBUGF indicating a tracing message (to follow program flow) */ |
shintamainjp | 0:521ba375aa0f | 56 | #define LWIP_DBG_TRACE 0x40U |
shintamainjp | 0:521ba375aa0f | 57 | /** flag for LWIP_DEBUGF indicating a state debug message (to follow module states) */ |
shintamainjp | 0:521ba375aa0f | 58 | #define LWIP_DBG_STATE 0x20U |
shintamainjp | 0:521ba375aa0f | 59 | /** flag for LWIP_DEBUGF indicating newly added code, not thoroughly tested yet */ |
shintamainjp | 0:521ba375aa0f | 60 | #define LWIP_DBG_FRESH 0x10U |
shintamainjp | 0:521ba375aa0f | 61 | /** flag for LWIP_DEBUGF to halt after printing this debug message */ |
shintamainjp | 0:521ba375aa0f | 62 | #define LWIP_DBG_HALT 0x08U |
shintamainjp | 0:521ba375aa0f | 63 | |
shintamainjp | 0:521ba375aa0f | 64 | #ifndef LWIP_NOASSERT |
shintamainjp | 0:521ba375aa0f | 65 | #define LWIP_ASSERT(message, assertion) do { if(!(assertion)) \ |
shintamainjp | 0:521ba375aa0f | 66 | LWIP_PLATFORM_ASSERT(message); } while(0) |
shintamainjp | 0:521ba375aa0f | 67 | #else /* LWIP_NOASSERT */ |
shintamainjp | 0:521ba375aa0f | 68 | #define LWIP_ASSERT(message, assertion) |
shintamainjp | 0:521ba375aa0f | 69 | #endif /* LWIP_NOASSERT */ |
shintamainjp | 0:521ba375aa0f | 70 | |
shintamainjp | 0:521ba375aa0f | 71 | /** if "expression" isn't true, then print "message" and execute "handler" expression */ |
shintamainjp | 0:521ba375aa0f | 72 | #ifndef LWIP_ERROR |
shintamainjp | 0:521ba375aa0f | 73 | #define LWIP_ERROR(message, expression, handler) do { if (!(expression)) { \ |
shintamainjp | 0:521ba375aa0f | 74 | LWIP_PLATFORM_ASSERT(message); handler;}} while(0) |
shintamainjp | 0:521ba375aa0f | 75 | #endif /* LWIP_ERROR */ |
shintamainjp | 0:521ba375aa0f | 76 | |
shintamainjp | 0:521ba375aa0f | 77 | #ifdef LWIP_DEBUG |
shintamainjp | 0:521ba375aa0f | 78 | /** print debug message only if debug message type is enabled... |
shintamainjp | 0:521ba375aa0f | 79 | * AND is of correct type AND is at least LWIP_DBG_LEVEL |
shintamainjp | 0:521ba375aa0f | 80 | */ |
shintamainjp | 0:521ba375aa0f | 81 | #define LWIP_DEBUGF(debug, message) do { \ |
shintamainjp | 0:521ba375aa0f | 82 | if ( \ |
shintamainjp | 0:521ba375aa0f | 83 | ((debug) & LWIP_DBG_ON) && \ |
shintamainjp | 0:521ba375aa0f | 84 | ((debug) & LWIP_DBG_TYPES_ON) && \ |
shintamainjp | 0:521ba375aa0f | 85 | ((s16_t)((debug) & LWIP_DBG_MASK_LEVEL) >= LWIP_DBG_MIN_LEVEL)) { \ |
shintamainjp | 0:521ba375aa0f | 86 | LWIP_PLATFORM_DIAG(message); \ |
shintamainjp | 0:521ba375aa0f | 87 | if ((debug) & LWIP_DBG_HALT) { \ |
shintamainjp | 0:521ba375aa0f | 88 | while(1); \ |
shintamainjp | 0:521ba375aa0f | 89 | } \ |
shintamainjp | 0:521ba375aa0f | 90 | } \ |
shintamainjp | 0:521ba375aa0f | 91 | } while(0) |
shintamainjp | 0:521ba375aa0f | 92 | |
shintamainjp | 0:521ba375aa0f | 93 | #else /* LWIP_DEBUG */ |
shintamainjp | 0:521ba375aa0f | 94 | #define LWIP_DEBUGF(debug, message) |
shintamainjp | 0:521ba375aa0f | 95 | #endif /* LWIP_DEBUG */ |
shintamainjp | 0:521ba375aa0f | 96 | |
shintamainjp | 0:521ba375aa0f | 97 | #endif /* __LWIP_DEBUG_H__ */ |
shintamainjp | 0:521ba375aa0f | 98 |