Program Listing for File data_logger.hpp
↰ Return to documentation for file (include/holoscan/core/data_logger.hpp
)
/*
* SPDX-FileCopyrightText: Copyright (c) 2025 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_DATA_LOGGER_HPP
#define HOLOSCAN_CORE_DATA_LOGGER_HPP
#include <any>
#include <cstdint>
#include <memory>
#include <string>
#include "./io_spec.hpp"
namespace holoscan {
class MetadataDictionary; // forward declaration
class Tensor; // forward declaration
class TensorMap; // forward declaration
class DataLogger {
public:
DataLogger() = default;
virtual ~DataLogger() = default;
virtual bool log_data(std::any data, const std::string& unique_id,
int64_t acquisition_timestamp = -1,
std::shared_ptr<MetadataDictionary> metadata = nullptr,
IOSpec::IOType io_type = IOSpec::IOType::kOutput) = 0;
virtual bool log_tensor_data(const std::shared_ptr<Tensor>& tensor, const std::string& unique_id,
int64_t acquisition_timestamp = -1,
const std::shared_ptr<MetadataDictionary>& metadata = nullptr,
IOSpec::IOType io_type = IOSpec::IOType::kOutput) = 0;
virtual bool log_tensormap_data(const TensorMap& tensor_map, const std::string& unique_id,
int64_t acquisition_timestamp = -1,
const std::shared_ptr<MetadataDictionary>& metadata = nullptr,
IOSpec::IOType io_type = IOSpec::IOType::kOutput) = 0;
virtual bool should_log_output() const = 0;
virtual bool should_log_input() const = 0;
};
} // namespace holoscan
#endif/* HOLOSCAN_CORE_DATA_LOGGER_HPP */