The (alpha of the) official Exosite library, CoAP version.
NOTE: This mirror repository may be out of date, check the main repo for changes. If there are any remind me to update this mirror.
This is an unstable alpha of the Official Exosite library, there are known issues with the port to this platform. You probably shouldn't use this library yet if you just want to get things done.
This version uses CoAP for the application protocol.
picocoap/README.md@29:004c318e63fa, 2015-01-07 (annotated)
- Committer:
- Patrick Barrett
- Date:
- Wed Jan 07 14:20:56 2015 -0600
- Revision:
- 29:004c318e63fa
- Parent:
- 7:f9df43829cea
added retry on network error
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Patrick Barrett |
7:f9df43829cea | 1 | PicoCoAP is a very minimal CoAP library written in C. The main goal of this |
Patrick Barrett |
7:f9df43829cea | 2 | library is to implement the CoAP protocol while using a little memory as |
Patrick Barrett |
7:f9df43829cea | 3 | possible. |
Patrick Barrett |
7:f9df43829cea | 4 | |
Patrick Barrett |
7:f9df43829cea | 5 | # Values |
Patrick Barrett |
7:f9df43829cea | 6 | |
Patrick Barrett |
7:f9df43829cea | 7 | 1. Safety |
Patrick Barrett |
7:f9df43829cea | 8 | * Above all, this library aims to be safe. All memory operations are done with |
Patrick Barrett |
7:f9df43829cea | 9 | explicitly stated bounds. In the event of a malformed packet it should fail |
Patrick Barrett |
7:f9df43829cea | 10 | safely. |
Patrick Barrett |
7:f9df43829cea | 11 | 2. Completeness |
Patrick Barrett |
7:f9df43829cea | 12 | * This is intended to be a complete implementation of the protocol and tries not |
Patrick Barrett |
7:f9df43829cea | 13 | to make simplifications that are "usually" safe to make. |
Patrick Barrett |
7:f9df43829cea | 14 | 3. Memory Usage |
Patrick Barrett |
7:f9df43829cea | 15 | * All operations try to use the absolute minimum amount of memory possible, |
Patrick Barrett |
7:f9df43829cea | 16 | while not violating the first two values, even at the expense of processing |
Patrick Barrett |
7:f9df43829cea | 17 | time. All operations are done on a buffers containing the actual message |
Patrick Barrett |
7:f9df43829cea | 18 | network binary representation for each method call. |
Patrick Barrett |
7:f9df43829cea | 19 | 4. Simple API |
Patrick Barrett |
7:f9df43829cea | 20 | * This library should be able to be used by users who only have a basic |
Patrick Barrett |
7:f9df43829cea | 21 | understanding of the protocol. Terminology is intended to be simple, but |
Patrick Barrett |
7:f9df43829cea | 22 | does not invent new terms that the RFC already defines. |
Patrick Barrett |
7:f9df43829cea | 23 | |
Patrick Barrett |
7:f9df43829cea | 24 | # Status |
Patrick Barrett |
7:f9df43829cea | 25 | |
Patrick Barrett |
7:f9df43829cea | 26 | Currently only message encoding and decoding is currently implemented. I will be |
Patrick Barrett |
7:f9df43829cea | 27 | looking into creating a server that handles the actual sending and receiving of |
Patrick Barrett |
7:f9df43829cea | 28 | messages along with the associated retries and other protocol complexity. This |
Patrick Barrett |
7:f9df43829cea | 29 | may or may not ever be added. |
Patrick Barrett |
7:f9df43829cea | 30 | |
Patrick Barrett |
7:f9df43829cea | 31 | As this is a new library there may be bugs, please report them. The best way is |
Patrick Barrett |
7:f9df43829cea | 32 | to open a pull request with a test case that shows the bug and better yet also a |
Patrick Barrett |
7:f9df43829cea | 33 | patch to fix it. Additionally, general comments about design and usability are |
Patrick Barrett |
7:f9df43829cea | 34 | also welcome. |