X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=support%2Fsdk%2Fcpp%2Fsf%2Fsfpacket.h;h=4a650edfd6f70930fb92de6a79d797e53dd707d7;hb=6a945452aa08d9a8a847995cd7b0505ffc5d6a21;hp=d3f5fdefbb3fdb90b984e7c7c29f0da01fd06011;hpb=315f1769b096f0db0bc4f99e89b9f153297b1ff5;p=tinyos-2.x.git diff --git a/support/sdk/cpp/sf/sfpacket.h b/support/sdk/cpp/sf/sfpacket.h index d3f5fdef..4a650edf 100644 --- a/support/sdk/cpp/sf/sfpacket.h +++ b/support/sdk/cpp/sf/sfpacket.h @@ -66,8 +66,9 @@ public: /** member vars **/ protected: - /* payload buffer */ - char payloadBuffer[cMaxPacketLength]; + /* internal buffer */ + char buffer[cMaxPacketLength + 1]; + /* length of byte buffer */ int length; /* type */ @@ -92,6 +93,12 @@ public: /* returns length of buffer */ int getLength() const; + /* return the length that shall be transmitted via TCP */ + int getTcpLength() const; + + /* return the payload of the TCP packet */ + const char* getTcpPayload(); + /* returns the seqno of this packet */ int getSeqno() const;