device.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 Intel Corporation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef MOVIDIUS_NCS_LIB_DEVICE_H
18 #define MOVIDIUS_NCS_LIB_DEVICE_H
19 
20 #include <string>
21 #include <memory>
23 
25 {
26 class Device
27 {
28 public:
29  using Ptr = std::shared_ptr<Device>;
30  using ConstPtr = std::shared_ptr<Device const>;
31 
32  enum LogLevel
33  {
37  };
38 
39  Device(int index, LogLevel log_level);
40  ~Device();
41 
42  void setLogLevel(LogLevel level);
44  void* getHandle();
45  std::string getName() const;
46  void monitorThermal() const;
47 
48 private:
50  {
54  };
55 
56  void open();
57  void close();
58 
59  void find();
61 
62  int index_;
63  std::string name_;
64  void* handle_;
65 };
66 } // namespace movidius_ncs_lib
67 
68 #endif // MOVIDIUS_NCS_LIB_DEVICE_H
void monitorThermal() const
Definition: device.cpp:74
void setLogLevel(LogLevel level)
Definition: device.cpp:89
std::shared_ptr< Device > Ptr
Definition: device.h:29
std::string getName() const
Definition: device.cpp:49
LogLevel getLogLevel()
Definition: device.cpp:98
ThermalThrottlingLevel getThermalThrottlingLevel() const
Definition: device.cpp:109
std::shared_ptr< Device const > ConstPtr
Definition: device.h:30
std::string name_
Definition: device.h:63
Device(int index, LogLevel log_level)
Definition: device.cpp:28


movidius_ncs_lib
Author(s): Xiaojun Huang
autogenerated on Mon Jun 10 2019 14:11:23