Murata RF modules are designed to simplify wireless development and certification by minimizing the amount of RF expertise you need to wirelessly enable a wide range of applications.

Committer:
yangcq88517
Date:
Tue Feb 03 21:24:15 2015 +0000
Revision:
0:8e83b9448758
Child:
2:f8e393a81c25
MuRata WiFi Module

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yangcq88517 0:8e83b9448758 1 #include "HTTPResponseIndication.h"
yangcq88517 0:8e83b9448758 2
yangcq88517 0:8e83b9448758 3 using namespace SmartLabMuRata;
yangcq88517 0:8e83b9448758 4
yangcq88517 0:8e83b9448758 5 HTTPResponseIndication::HTTPResponseIndication(Payload * payload)
yangcq88517 0:8e83b9448758 6 : Payload(payload)
yangcq88517 0:8e83b9448758 7 {
yangcq88517 0:8e83b9448758 8 contentLength = (GetData()[2] & 0x7F) << 8 | GetData()[3];
yangcq88517 0:8e83b9448758 9 }
yangcq88517 0:8e83b9448758 10
yangcq88517 0:8e83b9448758 11 bool HTTPResponseIndication::isMoreDataComing()
yangcq88517 0:8e83b9448758 12 {
yangcq88517 0:8e83b9448758 13 return (GetData()[2] >> 7) == 0x01 ? true : false;
yangcq88517 0:8e83b9448758 14 }
yangcq88517 0:8e83b9448758 15
yangcq88517 0:8e83b9448758 16 int HTTPResponseIndication::GetContentLength()
yangcq88517 0:8e83b9448758 17 {
yangcq88517 0:8e83b9448758 18 return contentLength;
yangcq88517 0:8e83b9448758 19 }
yangcq88517 0:8e83b9448758 20
yangcq88517 0:8e83b9448758 21 char HTTPResponseIndication::GetContent(int index)
yangcq88517 0:8e83b9448758 22 {
yangcq88517 0:8e83b9448758 23 return GetData()[index + PAYLOAD_OFFSET];
yangcq88517 0:8e83b9448758 24 }
yangcq88517 0:8e83b9448758 25
yangcq88517 0:8e83b9448758 26 const char * HTTPResponseIndication::GetContent()
yangcq88517 0:8e83b9448758 27 {
yangcq88517 0:8e83b9448758 28 return GetData() + PAYLOAD_OFFSET;
yangcq88517 0:8e83b9448758 29 }
yangcq88517 0:8e83b9448758 30
yangcq88517 0:8e83b9448758 31 int HTTPResponseIndication::GetContentOffset()
yangcq88517 0:8e83b9448758 32 {
yangcq88517 0:8e83b9448758 33 return PAYLOAD_OFFSET;
yangcq88517 0:8e83b9448758 34 }