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
00001 #include "response.h" 00002 00003 00004 Response::Response() : CoapPDU() 00005 { 00006 00007 } 00008 00009 Response::Response(uint8_t *pdu, int pduLength) : CoapPDU(pdu, pduLength) 00010 { 00011 00012 } 00013 00014 Response::Response(uint8_t *buffer, int bufferLength, int pduLength) : CoapPDU(buffer, bufferLength, pduLength) 00015 { 00016 00017 } 00018 00019 void Response::setContent(char* content, int length) 00020 { 00021 CoapPDU::setCode(Response::COAP_CONTENT); 00022 setPayload(reinterpret_cast<uint8_t*>(content), length); 00023 } 00024 00025 void Response::setCode(int code) 00026 { 00027 CoapPDU::setCode((CoapPDU::Code) code); 00028 }
Generated on Wed Jul 13 2022 18:09:57 by
1.7.2
