1 /*
2  * Copyright (C) 2021 Intel Corporation
3  *
4  * SPDX-License-Identifier: MIT
5  *
6  */
7 
8 #pragma once
9 
10 #include "level_zero/tools/source/sysman/os_sysman.h"
11 #include <level_zero/zes_api.h>
12 
13 #include <memory>
14 #include <string>
15 #include <vector>
16 
17 namespace L0 {
18 
19 class OsDiagnostics {
20   public:
21     virtual void osGetDiagProperties(zes_diag_properties_t *pProperties) = 0;
22     virtual ze_result_t osGetDiagTests(uint32_t *pCount, zes_diag_test_t *pTests) = 0;
23     virtual ze_result_t osRunDiagTests(uint32_t start, uint32_t end, zes_diag_result_t *pResult) = 0;
24     static std::unique_ptr<OsDiagnostics> create(OsSysman *pOsSysman, const std::string &DiagTests, ze_bool_t onSubdevice, uint32_t subdeviceId);
25     static void getSupportedDiagTestsFromFW(void *pOsSysman, std::vector<std::string> &supportedDiagTests);
~OsDiagnostics()26     virtual ~OsDiagnostics() {}
27 };
28 
29 } // namespace L0
30