Example #1
0
    void execute(const Request& request, Response& response) {
        const auto& component = request.get_component();
        const auto& name = request.get_name();

        if (component != m_component || name != m_name) {
            throw exception::NotFound();
        }

        for (std::uint32_t i = 0; i < 10; ++i) {
            response.add_subcomponent(
                agent_framework::model::attribute::SubcomponentEntry(std::to_string(i)));
        }
    }
Example #2
0
 void response_add_submodules(const KeysList& keys, Response& response) {
     for (const auto& key : keys) {
         response.add_subcomponent(key);
     }
 }