35 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;
58 const std::optional<std::string>
name;
61 const std::optional<std::string>
repo;
63 const std::map<std::string, std::any>
extra;
101 template <
typename T>
102 const T *
as()
const {
103 if (
data.size() !=
sizeof(T))
104 throw std::runtime_error(
"Data size does not match type size. Size is " +
105 std::to_string(
data.size()) +
", expected " +
106 std::to_string(
sizeof(T)) +
".");
107 return reinterpret_cast<const T *
>(
data.data());
111 template <
typename T>
113 return MessageData(
reinterpret_cast<const uint8_t *
>(&t),
sizeof(T));
130 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.
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)
bool operator<(const AppID &a, const AppID &b)
std::vector< HWClientDetail > HWClientDetails
bool operator!=(const AppID &other) const
bool operator==(const AppID &other) const
AppID(const AppID &)=default
std::optional< uint32_t > idx
AppID(const std::string &name, std::optional< uint32_t > idx=std::nullopt)
A description of a hardware client.
std::map< std::string, std::any > implOptions
const std::optional< std::string > commitHash
const std::optional< std::string > repo
const std::optional< std::string > version
const std::optional< std::string > summary
const std::map< std::string, std::any > extra
const std::optional< std::string > name
A description of a service port.