pdcomm::opcua::buffer
Class
Owned, immutable byte buffer returned by the library.
class buffer : public ownedHolds a discovery result, a local address, a DataValue or (as response) a service response. The bytes stay valid after the client or server that produced them is closed or destroyed.
Notes
- const member functions may be called from any thread.
Members
buffer
Constructor
Takes ownership of a buffer handle.
explicit buffer(pdcomm_opcua_handle handle) noexceptParameters
| Name | Description |
|---|---|
handle | Buffer handle returned by the C ABI. |
copy
Method
Copies the buffer contents.
std::vector<uint8_t> copy() constReturns
The bytes, without a terminator.
Notes
- Throws
error: if the handle is empty or invalid.