OpenRTM-aist  2.1.0
ByteData.h
Go to the documentation of this file.
1 #ifndef RTC_BYTEDATA_H
2 #define RTC_BYTEDATA_H
3 
4 
5 
6 namespace RTC
7 {
8  class ByteDataStreamBase;
29  class ByteData
30  {
31  public:
79  ByteData(const ByteData &rhs);
155  void readData(unsigned char* data, unsigned long length) const;
176  void writeData(const unsigned char* data, unsigned long length);
193  unsigned char* getBuffer() const;
210  unsigned long getDataLength() const;
228  void isLittleEndian(bool little_endian);
246  void setDataLength(unsigned long length);
264  bool getEndian();
265  private:
266  unsigned char* m_buf{nullptr};
267  unsigned long m_len{0};
268  bool m_little_endian{true};
269  };
270 
271 } // namespace RTC
272 
273 
274 #endif // RTC_BYTEDATA_H
Definition: ByteDataStreamBase.h:63
Definition: ByteData.h:30
bool getEndian()
unsigned long getDataLength() const
unsigned char * getBuffer() const
void setDataLength(unsigned long length)
ByteData(const ByteDataStreamBase &rhs)
Copy Constructor.
ByteData()
Constructor.
void writeData(const unsigned char *data, unsigned long length)
ByteData & operator=(const ByteData &rhs)
void isLittleEndian(bool little_endian)
void readData(unsigned char *data, unsigned long length) const
ByteData(const ByteData &rhs)
Copy Constructor.
~ByteData()
Destructor.
RT-Component.