Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of MQTTPacket by
StackTrace.h@20:18bc6c007ce2, 2015-08-12 (annotated)
- Committer:
- ericliang
- Date:
- Wed Aug 12 02:38:26 2015 +0000
- Revision:
- 20:18bc6c007ce2
- Parent:
- 12:cd99ac9cb25a
Modify MQTTPacket Size to 400 Bytes
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
icraggs | 0:7734401cc1b4 | 1 | /******************************************************************************* |
icraggs | 0:7734401cc1b4 | 2 | * Copyright (c) 2014 IBM Corp. |
icraggs | 0:7734401cc1b4 | 3 | * |
icraggs | 0:7734401cc1b4 | 4 | * All rights reserved. This program and the accompanying materials |
icraggs | 0:7734401cc1b4 | 5 | * are made available under the terms of the Eclipse Public License v1.0 |
icraggs | 0:7734401cc1b4 | 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. |
icraggs | 0:7734401cc1b4 | 7 | * |
icraggs | 0:7734401cc1b4 | 8 | * The Eclipse Public License is available at |
icraggs | 0:7734401cc1b4 | 9 | * http://www.eclipse.org/legal/epl-v10.html |
icraggs | 0:7734401cc1b4 | 10 | * and the Eclipse Distribution License is available at |
icraggs | 0:7734401cc1b4 | 11 | * http://www.eclipse.org/org/documents/edl-v10.php. |
icraggs | 0:7734401cc1b4 | 12 | * |
icraggs | 0:7734401cc1b4 | 13 | * Contributors: |
icraggs | 0:7734401cc1b4 | 14 | * Ian Craggs - initial API and implementation and/or initial documentation |
Ian Craggs |
12:cd99ac9cb25a | 15 | * Ian Craggs - fix for bug #434081 |
icraggs | 0:7734401cc1b4 | 16 | *******************************************************************************/ |
icraggs | 0:7734401cc1b4 | 17 | |
icraggs | 0:7734401cc1b4 | 18 | #ifndef STACKTRACE_H_ |
icraggs | 0:7734401cc1b4 | 19 | #define STACKTRACE_H_ |
icraggs | 0:7734401cc1b4 | 20 | |
icraggs | 0:7734401cc1b4 | 21 | #include <stdio.h> |
icraggs | 0:7734401cc1b4 | 22 | #define NOSTACKTRACE 1 |
icraggs | 0:7734401cc1b4 | 23 | |
icraggs | 0:7734401cc1b4 | 24 | #if defined(NOSTACKTRACE) |
icraggs | 0:7734401cc1b4 | 25 | #define FUNC_ENTRY |
icraggs | 0:7734401cc1b4 | 26 | #define FUNC_ENTRY_NOLOG |
icraggs | 0:7734401cc1b4 | 27 | #define FUNC_ENTRY_MED |
icraggs | 0:7734401cc1b4 | 28 | #define FUNC_ENTRY_MAX |
icraggs | 0:7734401cc1b4 | 29 | #define FUNC_EXIT |
icraggs | 0:7734401cc1b4 | 30 | #define FUNC_EXIT_NOLOG |
icraggs | 0:7734401cc1b4 | 31 | #define FUNC_EXIT_MED |
icraggs | 0:7734401cc1b4 | 32 | #define FUNC_EXIT_MAX |
icraggs | 0:7734401cc1b4 | 33 | #define FUNC_EXIT_RC(x) |
icraggs | 0:7734401cc1b4 | 34 | #define FUNC_EXIT_MED_RC(x) |
icraggs | 0:7734401cc1b4 | 35 | #define FUNC_EXIT_MAX_RC(x) |
Ian Craggs |
12:cd99ac9cb25a | 36 | |
icraggs | 0:7734401cc1b4 | 37 | #else |
Ian Craggs |
12:cd99ac9cb25a | 38 | |
icraggs | 0:7734401cc1b4 | 39 | #if defined(WIN32) |
icraggs | 0:7734401cc1b4 | 40 | #define inline __inline |
icraggs | 0:7734401cc1b4 | 41 | #define FUNC_ENTRY StackTrace_entry(__FUNCTION__, __LINE__, TRACE_MINIMUM) |
icraggs | 0:7734401cc1b4 | 42 | #define FUNC_ENTRY_NOLOG StackTrace_entry(__FUNCTION__, __LINE__, -1) |
icraggs | 0:7734401cc1b4 | 43 | #define FUNC_ENTRY_MED StackTrace_entry(__FUNCTION__, __LINE__, TRACE_MEDIUM) |
icraggs | 0:7734401cc1b4 | 44 | #define FUNC_ENTRY_MAX StackTrace_entry(__FUNCTION__, __LINE__, TRACE_MAXIMUM) |
icraggs | 0:7734401cc1b4 | 45 | #define FUNC_EXIT StackTrace_exit(__FUNCTION__, __LINE__, NULL, TRACE_MINIMUM) |
icraggs | 0:7734401cc1b4 | 46 | #define FUNC_EXIT_NOLOG StackTrace_exit(__FUNCTION__, __LINE__, -1) |
icraggs | 0:7734401cc1b4 | 47 | #define FUNC_EXIT_MED StackTrace_exit(__FUNCTION__, __LINE__, NULL, TRACE_MEDIUM) |
icraggs | 0:7734401cc1b4 | 48 | #define FUNC_EXIT_MAX StackTrace_exit(__FUNCTION__, __LINE__, NULL, TRACE_MAXIMUM) |
icraggs | 0:7734401cc1b4 | 49 | #define FUNC_EXIT_RC(x) StackTrace_exit(__FUNCTION__, __LINE__, &x, TRACE_MINIMUM) |
icraggs | 0:7734401cc1b4 | 50 | #define FUNC_EXIT_MED_RC(x) StackTrace_exit(__FUNCTION__, __LINE__, &x, TRACE_MEDIUM) |
icraggs | 0:7734401cc1b4 | 51 | #define FUNC_EXIT_MAX_RC(x) StackTrace_exit(__FUNCTION__, __LINE__, &x, TRACE_MAXIMUM) |
icraggs | 0:7734401cc1b4 | 52 | #else |
icraggs | 0:7734401cc1b4 | 53 | #define FUNC_ENTRY StackTrace_entry(__func__, __LINE__, TRACE_MINIMUM) |
icraggs | 0:7734401cc1b4 | 54 | #define FUNC_ENTRY_NOLOG StackTrace_entry(__func__, __LINE__, -1) |
icraggs | 0:7734401cc1b4 | 55 | #define FUNC_ENTRY_MED StackTrace_entry(__func__, __LINE__, TRACE_MEDIUM) |
icraggs | 0:7734401cc1b4 | 56 | #define FUNC_ENTRY_MAX StackTrace_entry(__func__, __LINE__, TRACE_MAXIMUM) |
icraggs | 0:7734401cc1b4 | 57 | #define FUNC_EXIT StackTrace_exit(__func__, __LINE__, NULL, TRACE_MINIMUM) |
icraggs | 0:7734401cc1b4 | 58 | #define FUNC_EXIT_NOLOG StackTrace_exit(__func__, __LINE__, NULL, -1) |
icraggs | 0:7734401cc1b4 | 59 | #define FUNC_EXIT_MED StackTrace_exit(__func__, __LINE__, NULL, TRACE_MEDIUM) |
icraggs | 0:7734401cc1b4 | 60 | #define FUNC_EXIT_MAX StackTrace_exit(__func__, __LINE__, NULL, TRACE_MAXIMUM) |
icraggs | 0:7734401cc1b4 | 61 | #define FUNC_EXIT_RC(x) StackTrace_exit(__func__, __LINE__, &x, TRACE_MINIMUM) |
icraggs | 0:7734401cc1b4 | 62 | #define FUNC_EXIT_MED_RC(x) StackTrace_exit(__func__, __LINE__, &x, TRACE_MEDIUM) |
icraggs | 0:7734401cc1b4 | 63 | #define FUNC_EXIT_MAX_RC(x) StackTrace_exit(__func__, __LINE__, &x, TRACE_MAXIMUM) |
icraggs | 0:7734401cc1b4 | 64 | |
icraggs | 0:7734401cc1b4 | 65 | void StackTrace_entry(const char* name, int line, int trace); |
icraggs | 0:7734401cc1b4 | 66 | void StackTrace_exit(const char* name, int line, void* return_value, int trace); |
icraggs | 0:7734401cc1b4 | 67 | |
icraggs | 0:7734401cc1b4 | 68 | void StackTrace_printStack(FILE* dest); |
icraggs | 0:7734401cc1b4 | 69 | char* StackTrace_get(unsigned long); |
icraggs | 0:7734401cc1b4 | 70 | |
Ian Craggs |
12:cd99ac9cb25a | 71 | #endif |
Ian Craggs |
12:cd99ac9cb25a | 72 | |
Ian Craggs |
12:cd99ac9cb25a | 73 | #endif |
Ian Craggs |
12:cd99ac9cb25a | 74 | |
Ian Craggs |
12:cd99ac9cb25a | 75 | |
Ian Craggs |
12:cd99ac9cb25a | 76 | |
icraggs | 0:7734401cc1b4 | 77 | |
icraggs | 0:7734401cc1b4 | 78 | #endif /* STACKTRACE_H_ */ |