This is CoAP library with a focus on simplicity. It offers minimal CoAP PDU construction and decoding to and from byte buffers.
dbg.h@2:6c2e2cdea46a, 2019-01-20 (annotated)
- Committer:
- Ka_myk
- Date:
- Sun Jan 20 13:47:43 2019 +0000
- Revision:
- 2:6c2e2cdea46a
add inet and dbg
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Ka_myk | 2:6c2e2cdea46a | 1 | |
Ka_myk | 2:6c2e2cdea46a | 2 | #pragma once |
Ka_myk | 2:6c2e2cdea46a | 3 | #include <stdio.h> |
Ka_myk | 2:6c2e2cdea46a | 4 | |
Ka_myk | 2:6c2e2cdea46a | 5 | #define DEBUG 1 |
Ka_myk | 2:6c2e2cdea46a | 6 | //#undef DEBUG |
Ka_myk | 2:6c2e2cdea46a | 7 | |
Ka_myk | 2:6c2e2cdea46a | 8 | #define DBG_NEWLINE "\n" |
Ka_myk | 2:6c2e2cdea46a | 9 | |
Ka_myk | 2:6c2e2cdea46a | 10 | #define INFO(...) printf(__VA_ARGS__); printf(DBG_NEWLINE); |
Ka_myk | 2:6c2e2cdea46a | 11 | #define INFOX(...); printf(__VA_ARGS__); |
Ka_myk | 2:6c2e2cdea46a | 12 | #define ERR(...) printf(__VA_ARGS__); printf(DBG_NEWLINE); |
Ka_myk | 2:6c2e2cdea46a | 13 | |
Ka_myk | 2:6c2e2cdea46a | 14 | #ifdef DEBUG |
Ka_myk | 2:6c2e2cdea46a | 15 | #define DBG(...) fprintf(stderr,"%s:%d ",__FILE__,__LINE__); fprintf(stderr,__VA_ARGS__); fprintf(stderr,"\r\n"); |
Ka_myk | 2:6c2e2cdea46a | 16 | #define DBGX(...) fprintf(stderr,__VA_ARGS__); |
Ka_myk | 2:6c2e2cdea46a | 17 | #define DBGLX(...) fprintf(stderr,"%s:%d ",__FILE__,__LINE__); fprintf(stderr,__VA_ARGS__); |
Ka_myk | 2:6c2e2cdea46a | 18 | #define DBG_PDU() printBin(); |
Ka_myk | 2:6c2e2cdea46a | 19 | #else |
Ka_myk | 2:6c2e2cdea46a | 20 | #define DBG(...) {}; |
Ka_myk | 2:6c2e2cdea46a | 21 | #define DBGX(...) {}; |
Ka_myk | 2:6c2e2cdea46a | 22 | #define DBGLX(...) {}; |
Ka_myk | 2:6c2e2cdea46a | 23 | #define DBG_PDU() {}; |
Ka_myk | 2:6c2e2cdea46a | 24 | #endif |