]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - support/sdk/cpp/sf/sfpacket.h
- write a packet in one go to the tcp side
[tinyos-2.x.git] / support / sdk / cpp / sf / sfpacket.h
index d3f5fdefbb3fdb90b984e7c7c29f0da01fd06011..4a650edfd6f70930fb92de6a79d797e53dd707d7 100644 (file)
@@ -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;