36 std::optional<uint32_t>
idx;
38 AppID(
const std::string &
name, std::optional<uint32_t>
idx = std::nullopt)
46 bool operator<(
const AppID &a,
const AppID &b);
50 using std::vector<AppID>::vector;
53 std::string
toStr()
const;
59 std::optional<const Type *>
type;
63 std::optional<std::string>
name;
66 std::optional<std::string>
repo;
69 std::map<std::string, std::any>
extra;
118 template <
typename T>
119 const T *
as()
const {
120 if (
data.size() !=
sizeof(T))
121 throw std::runtime_error(
"Data size does not match type size. Size is " +
122 std::to_string(
data.size()) +
", expected " +
123 std::to_string(
sizeof(T)) +
".");
124 return reinterpret_cast<const T *
>(
data.data());
128 template <
typename T>
130 return MessageData(
reinterpret_cast<const uint8_t *
>(&t),
sizeof(T));
134 std::string
toHex()
const;
150 std::string
toHex(uint32_t val);
std::ostream & operator<<(std::ostream &, const esi::ModuleInfo &)
std::string toStr() const
AppIDPath operator+(const AppIDPath &b)
A logical chunk of data representing serialized data.
std::string toHex() const
Convert the data to a hex string.
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)
const T * as() const
Cast to a type.
MessageData(std::vector< uint8_t > &data)
static MessageData from(T &t)
Cast from a type to its raw bytes.
std::vector< uint8_t > data
const uint8_t * getBytes() const
std::map< std::string, std::any > ServiceImplDetails
std::string toHex(uint32_t 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.