Program Listing for File data_exporter.hpp

Holoscan v2.1.0

Return to documentation for file (include/holoscan/core/analytics/data_exporter.hpp)

Copy
Copied!
            

/* * 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_ANALYTICS_DATA_EXPORTER_HPP #define HOLOSCAN_CORE_ANALYTICS_DATA_EXPORTER_HPP #include <string> #include <vector> #include "holoscan/core/errors.hpp" #include "holoscan/core/expected.hpp" namespace holoscan { class DataExporter { public: explicit DataExporter(const std::string& app_name); virtual ~DataExporter() = default; static expected<std::string, ErrorCode> get_analytics_data_directory_env(); virtual void export_data(const std::vector<std::string>& data) = 0; const std::string& app_name() const { return app_name_; } const std::string& data_directory() const { return directory_name_; } void cleanup_data_directory(); protected: std::string app_name_; std::string directory_name_; private: void create_data_directory_with_timestamp(); }; } // namespace holoscan #endif/* HOLOSCAN_CORE_ANALYTICS_DATA_EXPORTER_HPP */

© Copyright 2022-2024, NVIDIA. Last updated on Jul 3, 2024.