37 std::optional<uint32_t>
idx;
39 AppID(
const std::string &
name, std::optional<uint32_t>
idx = std::nullopt)
47bool operator<(
const AppID &a,
const AppID &b);
51 using std::vector<
AppID>::vector;
55 std::string
toStr()
const;
61 std::optional<const Type *>
type;
65 std::optional<std::string>
name;
68 std::optional<std::string>
repo;
71 std::map<std::string, std::any>
extra;
121 operator const std::vector<uint8_t> &()
const {
return data; }
122 operator std::span<const uint8_t>()
const {
return data; }
136 template <
typename T>
137 const T *
as()
const {
138 if (
data.size() !=
sizeof(T))
139 throw std::runtime_error(
"Data size does not match type size. Size is " +
140 std::to_string(
data.size()) +
", expected " +
141 std::to_string(
sizeof(T)) +
".");
142 return reinterpret_cast<const T *
>(
data.data());
146 template <
typename T>
148 return MessageData(
reinterpret_cast<const uint8_t *
>(&t),
sizeof(T));
152 std::string
toHex()
const;
168std::string
toHex(
void *val);
169std::string
toHex(uint64_t val);
std::ostream & operator<<(std::ostream &, const esi::ModuleInfo &)
std::string toStr() const
AppIDPath operator+(const AppIDPath &b) const
A logical chunk of data representing serialized data.
const std::vector< uint8_t > & getData() const
Get the data as a vector of bytes.
const uint8_t * getBytes() const
std::string toHex() const
Convert the data to a hex string.
const T * as() const
Cast to a type.
std::vector< uint8_t > takeData()
Move the data out of this object.
size_t getSize() const
Get the size of the data in bytes.
MessageData()=default
Adopts the data vector buffer.
MessageData(const uint8_t *data, size_t size)
MessageData(std::vector< uint8_t > &data)
bool empty() const
Returns true if this message contains no data.
static MessageData from(T &t)
Cast from a type to its raw bytes.
std::vector< uint8_t > data
MessageData(std::vector< uint8_t > &&data)
std::map< std::string, std::any > ServiceImplDetails
std::string toHex(void *val)
std::map< std::string, ChannelAssignment > ChannelAssignments
bool operator<(const AppID &a, const AppID &b)
std::vector< HWClientDetail > HWClientDetails
bool operator!=(const AppID &other) const
bool operator==(const AppID &other) const
std::optional< uint32_t > idx
AppID(const std::string &name, std::optional< uint32_t > idx=std::nullopt)
Details about how to connect to a particular channel.
std::map< std::string, std::any > implOptions
Implementation-specific options.
std::string type
The name of the type of connection.
std::optional< const Type * > type
A description of a hardware client.
std::map< std::string, std::any > implOptions
ChannelAssignments channelAssignments
std::optional< std::string > version
std::optional< std::string > name
std::map< std::string, Constant > constants
std::optional< std::string > commitHash
std::optional< std::string > repo
std::map< std::string, std::any > extra
std::optional< std::string > summary
A description of a service port.