Yes We Can / yeswecancoap

Dependencies:   DebugLib EthernetInterface cantcoap mbed-rtos

Dependents:   COAP coap

Fork of yeswecancoap by Sille Van Landschoot

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?

UserRevisionLine numberNew 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 }