Program Listing for File gxf_component_info.hpp
↰ Return to documentation for file (include/holoscan/core/gxf/gxf_component_info.hpp
)
/*
* SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef HOLOSCAN_CORE_GXF_GXF_COMPONENT_INFO_HPP
#define HOLOSCAN_CORE_GXF_GXF_COMPONENT_INFO_HPP
#include <gxf/core/gxf.h>
#include <string>
#include <unordered_map>
#include <vector>
#include "holoscan/core/arg.hpp"
namespace holoscan::gxf {
class ComponentInfo {
public:
static constexpr int MAX_PARAM_COUNT = 512;
ComponentInfo(gxf_context_t context, gxf_tid_t tid);
~ComponentInfo();
static ArgType get_arg_type(const gxf_parameter_info_t& param_info);
gxf_tid_t receiver_tid() const;
gxf_tid_t transmitter_tid() const;
const gxf_component_info_t& component_info() const;
const std::vector<const char*>& parameter_keys() const;
const std::vector<gxf_parameter_info_t>& parameter_infos() const;
const std::unordered_map<std::string, gxf_parameter_info_t>& parameter_info_map() const;
const std::vector<const char*>& receiver_parameters() const;
const std::vector<const char*>& transmitter_parameters() const;
const std::vector<const char*>& normal_parameters() const;
private:
gxf_context_t gxf_context_ = nullptr;
gxf_tid_t component_tid_ = GxfTidNull();
gxf_component_info_t component_info_{};
std::vector<const char*> parameter_keys_;
std::vector<gxf_parameter_info_t> parameter_infos_;
std::unordered_map<std::string, gxf_parameter_info_t> parameter_info_map_;
std::vector<const char*> receiver_parameters_;
std::vector<const char*> transmitter_parameters_;
std::vector<const char*> normal_parameters_;
};
} // namespace holoscan::gxf
#endif/* HOLOSCAN_CORE_GXF_GXF_COMPONENT_INFO_HPP */