Class Buffer¶
Defined in File Buffer.h
Class Documentation¶
-
class
Buffer¶ Implements decode and encode data according CIP specification.
An example:
Buffer buffer1(); cip::CipUint var1 = 1; cip::CipDint var2 = 0xaa00000; buffer1 << var1 << var2; buffer1.data(); # => {0x01, 0x0, 0x0 ,0x0, 0x0, 0xaa}Public Functions
-
Buffer(size_t capacity)¶ Creates an empty buffer
- Parameters
capacity: the size that will be reserved in the buffer
-
Buffer(const std::vector<uint8_t> &data)¶ Creates a buffer that contains the given data
- Parameters
data: The data to encode
-
Buffer()¶ Creates an empty buffer
-
Buffer &
operator<<(cip::CipRevision v)¶
-
Buffer &
operator>>(cip::CipRevision &val)¶
-
std::vector<uint8_t>
data() const¶
-
size_t
size() const¶
-
size_t
pos() const¶
-
bool
isValid() const¶
-
bool
empty() const¶
-