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.
Response/SendFromSocketResponse.cpp@0:8e83b9448758, 2015-02-03 (annotated)
- Committer:
- yangcq88517
- Date:
- Tue Feb 03 21:24:15 2015 +0000
- Revision:
- 0:8e83b9448758
MuRata WiFi Module
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
yangcq88517 | 0:8e83b9448758 | 1 | #include "SendFromSocketResponse.h" |
yangcq88517 | 0:8e83b9448758 | 2 | |
yangcq88517 | 0:8e83b9448758 | 3 | using namespace SmartLabMuRata; |
yangcq88517 | 0:8e83b9448758 | 4 | |
yangcq88517 | 0:8e83b9448758 | 5 | SendFromSocketResponse::SendFromSocketResponse(Payload * payload) |
yangcq88517 | 0:8e83b9448758 | 6 | : Payload(payload) |
yangcq88517 | 0:8e83b9448758 | 7 | { } |
yangcq88517 | 0:8e83b9448758 | 8 | |
yangcq88517 | 0:8e83b9448758 | 9 | SNICCode SendFromSocketResponse::GetStatus() |
yangcq88517 | 0:8e83b9448758 | 10 | { |
yangcq88517 | 0:8e83b9448758 | 11 | return (SNICCode)GetData()[2]; |
yangcq88517 | 0:8e83b9448758 | 12 | } |
yangcq88517 | 0:8e83b9448758 | 13 | |
yangcq88517 | 0:8e83b9448758 | 14 | int SendFromSocketResponse::GetNumberofBytesSent() |
yangcq88517 | 0:8e83b9448758 | 15 | { |
yangcq88517 | 0:8e83b9448758 | 16 | if (GetStatus() == SNIC_SUCCESS) |
yangcq88517 | 0:8e83b9448758 | 17 | return GetData()[3] << 8 | GetData()[4]; |
yangcq88517 | 0:8e83b9448758 | 18 | |
yangcq88517 | 0:8e83b9448758 | 19 | return -1; |
yangcq88517 | 0:8e83b9448758 | 20 | } |