forked from Xilinx/XRT
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSubCmdExamine.h
More file actions
47 lines (37 loc) · 1.54 KB
/
SubCmdExamine.h
File metadata and controls
47 lines (37 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// SPDX-License-Identifier: Apache-2.0
// Copyright (C) 2020 Xilinx, Inc
// Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
#ifndef __SubCmdExamine_h_
#define __SubCmdExamine_h_
#include "tools/common/SubCmd.h"
#include "tools/common/Report.h"
#include "tools/common/OptionOptions.h"
#include "core/common/smi.h"
// 3rd Party Library - Include Files
#include <boost/property_tree/ptree.hpp>
// System - Include Files
#include <memory>
#include <optional>
namespace XBU = XBUtilities;
namespace po = boost::program_options;
struct SubCmdExamineOptions {
std::string m_device;
std::vector<std::string> m_reportNames;
std::vector<std::string> m_elementsFilter;
std::string m_format;
std::string m_output;
bool m_help;
std::optional<unsigned> m_watchIntervalSec;
};
class SubCmdExamine : public SubCmd {
ReportCollection uniqueReportCollection;
std::vector<std::shared_ptr<OptionOptions>> m_optionOptionsCollection;
void fill_option_values(const boost::program_options::variables_map& vm, SubCmdExamineOptions& options) const;
std::vector<std::shared_ptr<Report>> getReportsList(const xrt_core::smi::tuple_vector&) const;
std::shared_ptr<OptionOptions> checkForSubOption(const boost::program_options::variables_map& vm) const;
public:
SubCmdExamine(bool _isHidden, bool _isDepricated, bool _isPreliminary);
void execute(const SubCmdOptions &_options) const override;
void setOptionConfig(const boost::property_tree::ptree &config) override;
};
#endif