Built-in type consisting of a variable-length array of opaque bytes.
More...
#include <dds/core/BuiltinTopicTypes.hpp>
Built-in type consisting of a variable-length array of opaque bytes.
- See also
- Built-in Types
◆ BytesTopicType() [1/2]
dds::core::BytesTopicType::BytesTopicType |
( |
| ) |
|
|
inline |
Creates a sample with an empty array of bytes.
◆ BytesTopicType() [2/2]
dds::core::BytesTopicType::BytesTopicType |
( |
const std::vector< uint8_t > & |
the_data | ) |
|
|
inline |
Creates a sample with a vector of bytes.
- Parameters
-
Note that this constructor is implicit so you can use a std::vector<uint8_t> wherever a BytesTopicType instance is expected
◆ operator std::vector< uint8_t >()
dds::core::BytesTopicType::operator std::vector< uint8_t > |
( |
| ) |
const |
|
inline |
Automatic conversion to std::vector.
- Returns
- A copy of the bytes
◆ data() [1/2]
std::vector< uint8_t > dds::core::BytesTopicType::data |
( |
| ) |
const |
|
inline |
Gets the bytes in a std::vector.
- Returns
- A copy of the bytes
◆ data() [2/2]
void dds::core::BytesTopicType::data |
( |
const std::vector< uint8_t > & |
value | ) |
|
|
inline |
Sets the bytes.
- Parameters
-
◆ operator[]() [1/2]
uint8_t & dds::core::BytesTopicType::operator[] |
( |
uint32_t |
index | ) |
|
|
inline |
◆ operator[]() [2/2]
uint8_t dds::core::BytesTopicType::operator[] |
( |
uint32_t |
index | ) |
const |
|
inline |
◆ length()
int32_t dds::core::BytesTopicType::length |
( |
| ) |
const |
|
inline |