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.
Dependencies: DebugLib EthernetInterface cantcoap mbed-rtos
Fork of yeswecancoap by
response.cpp@6:0c477f5b79ff, 2015-10-21 (annotated)
- Committer:
- sillevl
- Date:
- Wed Oct 21 08:51:38 2015 +0000
- Revision:
- 6:0c477f5b79ff
- Parent:
- 5:1924c60356d0
- Child:
- 7:1bed29e1b0a4
polymophic request and responses
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| sillevl | 4:34a62b7cb2f9 | 1 | #include "response.h" |
| sillevl | 4:34a62b7cb2f9 | 2 | |
| sillevl | 4:34a62b7cb2f9 | 3 | |
| sillevl | 4:34a62b7cb2f9 | 4 | Response::Response() : CoapPDU() |
| sillevl | 4:34a62b7cb2f9 | 5 | { |
| sillevl | 5:1924c60356d0 | 6 | |
| sillevl | 5:1924c60356d0 | 7 | } |
| sillevl | 5:1924c60356d0 | 8 | |
| sillevl | 5:1924c60356d0 | 9 | Response::Response(uint8_t *pdu, int pduLength) : CoapPDU(pdu, pduLength) |
| sillevl | 5:1924c60356d0 | 10 | { |
| sillevl | 4:34a62b7cb2f9 | 11 | |
| sillevl | 5:1924c60356d0 | 12 | } |
| sillevl | 5:1924c60356d0 | 13 | |
| sillevl | 5:1924c60356d0 | 14 | Response::Response(uint8_t *buffer, int bufferLength, int pduLength) : CoapPDU(buffer, bufferLength, pduLength) |
| sillevl | 5:1924c60356d0 | 15 | { |
| sillevl | 4:34a62b7cb2f9 | 16 | |
| sillevl | 6:0c477f5b79ff | 17 | } |
| sillevl | 6:0c477f5b79ff | 18 | |
| sillevl | 6:0c477f5b79ff | 19 | void Response::setContent(char* content, int length) |
| sillevl | 6:0c477f5b79ff | 20 | { |
| sillevl | 6:0c477f5b79ff | 21 | setPayload(reinterpret_cast<uint8_t*>(content), length); |
| sillevl | 4:34a62b7cb2f9 | 22 | } |
