| 
    INET Framework for OMNeT++/OMNEST
    
   | 
 
Class that carries raw bytes. More...
#include <ByteArray.h>
  
 Public Member Functions | |
| ByteArray () | |
| Constructor.  More... | |
| ByteArray (const ByteArray &other) | |
| Copy constructor.  More... | |
| ByteArray & | operator= (const ByteArray &other) | 
| operator =  More... | |
| virtual ByteArray * | dup () const override | 
| Creates and returns an exact copy of this object.  More... | |
| virtual void | setDataFromBuffer (const void *ptr, unsigned int length) | 
| Copy data from buffer.  More... | |
| virtual void | copyDataFromBuffer (unsigned int destOffset, const void *ptr, unsigned int length) | 
| Copy data from buffer.  More... | |
| virtual void | setDataFromByteArray (const ByteArray &other, unsigned int srcOffset, unsigned int length) | 
| Copy data from other ByteArray.  More... | |
| virtual void | copyDataFromByteArray (unsigned int destOffset, const ByteArray &other, unsigned int srcOffset, unsigned int length) | 
| Copy data from other ByteArray.  More... | |
| virtual void | addDataFromBuffer (const void *ptr, unsigned int length) | 
| Add data from buffer to the end of existing content.  More... | |
| virtual unsigned int | copyDataToBuffer (void *ptr, unsigned int length, unsigned int srcOffs=0) const | 
| Copy data content to buffer.  More... | |
| virtual void | assignBuffer (void *ptr, unsigned int length) | 
| Set buffer pointer and buffer length.  More... | |
| virtual void | truncateData (unsigned int truncleft, unsigned int truncright) | 
| Truncate data content.  More... | |
| virtual void | expandData (unsigned int addLeft, unsigned int addRight) | 
| Expand data content.  More... | |
| virtual char * | getDataPtr () | 
  Public Member Functions inherited from inet::ByteArray_Base | |
| virtual | ~ByteArray_Base () | 
| virtual void | parsimPack (omnetpp::cCommBuffer *b) const override | 
| virtual void | parsimUnpack (omnetpp::cCommBuffer *b) override | 
| virtual void | setDataArraySize (unsigned int size) | 
| virtual unsigned int | getDataArraySize () const | 
| virtual char | getData (unsigned int k) const | 
| virtual void | setData (unsigned int k, char data) | 
Additional Inherited Members | |
  Protected Member Functions inherited from inet::ByteArray_Base | |
| bool | operator== (const ByteArray_Base &) | 
| ByteArray_Base () | |
| ByteArray_Base (const ByteArray_Base &other) | |
| ByteArray_Base & | operator= (const ByteArray_Base &other) | 
  Protected Attributes inherited from inet::ByteArray_Base | |
| char * | data | 
| unsigned int | data_arraysize | 
Class that carries raw bytes.
      
  | 
  inline | 
Constructor.
      
  | 
  inline | 
Copy constructor.
      
  | 
  virtual | 
Add data from buffer to the end of existing content.
| ptr | pointer to input buffer | 
| length | length of data | 
Referenced by inet::RawPacket::addDataFromBuffer().
      
  | 
  virtual | 
Set buffer pointer and buffer length.
| ptr | pointer to new buffer, must created by buffer = new char[length1]; where length1>=length  | 
| length | length of buffer | 
Referenced by inet::TCPSessionApp::createDataPacket(), inet::tcp::TCPByteStreamSendQueue::createSegmentWithBytes(), inet::tcp::TCP_NSC_ByteStreamReceiveQueue::extractBytesUpTo(), inet::tcp::TcpLwipByteStreamReceiveQueue::extractBytesUpTo(), and inet::tcp::TCPByteStreamRcvQueue::Region::merge().
      
  | 
  virtual | 
Copy data from buffer.
| destOffset | first byte from buffer will be written to here | 
| ptr | pointer to buffer | 
| length | length of data | 
Referenced by inet::IPv4FragBuf::addFragment(), and copyDataFromByteArray().
      
  | 
  virtual | 
Copy data from other ByteArray.
| destOffset | first byte from other will be written to here | 
| other | reference to other ByteArray | 
| srcOffset | skipped first bytes from other | 
| length | length of data from other | 
      
  | 
  virtual | 
Copy data content to buffer.
| ptr | pointer to output buffer | 
| length | length of buffer, maximum of copied bytes | 
| srcOffs | number of skipped bytes from source | 
Referenced by inet::RawPacket::copyDataToBuffer(), and inet::tcp::TCPByteStreamRcvQueue::Region::merge().
      
  | 
  inlineoverridevirtual | 
      
  | 
  virtual | 
Expand data content.
| addLeft | The number of bytes will be added at beginning of the content | 
| addRight | The number of bytes will be added at end of the content added bytes are unfilled | 
Referenced by inet::IPv4FragBuf::addFragment().
      
  | 
  inlinevirtual | 
Referenced by inet::IPv4FragBuf::addFragment().
operator =
      
  | 
  virtual | 
Copy data from buffer.
| ptr | pointer to buffer | 
| length | length of data | 
Referenced by inet::serializer::TCPSerializer::deserialize(), inet::RawPacket::setDataFromBuffer(), and setDataFromByteArray().
      
  | 
  virtual | 
Copy data from other ByteArray.
| other | reference to other ByteArray | 
| srcOffset | skipped first bytes from other | 
| length | length of data | 
Referenced by inet::tcp::TCPByteStreamRcvQueue::Region::split().
      
  | 
  virtual | 
Truncate data content.
| truncleft | The number of bytes from the beginning of the content be remove | 
| truncright | The number of bytes from the end of the content be remove Generate assert when not have enough bytes for truncation | 
Referenced by inet::RawPacket::removePrefix(), and inet::tcp::TCPByteStreamRcvQueue::Region::split().