SSCMA-Micro CPP SDK  v2.0.0
SSCMA-Micro is a cross-platform machine learning inference framework designed for embedded devices.
ma_device.h
Go to the documentation of this file.
1 #ifndef _MA_DEVICE_H_
2 #define _MA_DEVICE_H_
3 
4 #include <core/ma_common.h>
5 
6 #include <vector>
7 
8 #include "ma_camera.h"
9 #include "ma_sensor.h"
10 #include "ma_storage.h"
11 #include "ma_transport.h"
12 
13 namespace ma {
14 
15 class Device final {
16  public:
17  static Device* getInstance() noexcept;
18  ~Device();
19 
20  public:
21  const std::string& name() const noexcept { return m_name; }
22  const std::string& id() const noexcept { return m_id; }
23  const std::string& version() const noexcept { return m_version; }
24  size_t bootCount() const noexcept { return m_bootcount; }
25 
26  const std::vector<Transport*>& getTransports() noexcept { return m_transports; }
27  const std::vector<Sensor*>& getSensors() noexcept { return m_sensors; }
28  const std::vector<ma_model_t>& getModels() noexcept { return m_models; }
29  Storage* getStorage() noexcept { return m_storage; }
30 
31  private:
32  Device(const Device&) = delete;
33  Device& operator=(const Device&) = delete;
34 
35  Device() noexcept;
36 
37  private:
38  std::string m_name;
39  std::string m_id;
40  std::string m_version;
41  size_t m_bootcount;
42 
43  std::vector<Transport*> m_transports;
44  std::vector<Sensor*> m_sensors;
45  std::vector<ma_model_t> m_models;
46  Storage* m_storage;
47 };
48 
49 } // namespace ma
50 
51 #endif // _MA_DEVICE_H_
Definition: ma_device.h:15
const std::string & version() const noexcept
Definition: ma_device.h:23
const std::string & id() const noexcept
Definition: ma_device.h:22
Storage * getStorage() noexcept
Definition: ma_device.h:29
static Device * getInstance() noexcept
const std::vector< Sensor * > & getSensors() noexcept
Definition: ma_device.h:27
const std::string & name() const noexcept
Definition: ma_device.h:21
const std::vector< Transport * > & getTransports() noexcept
Definition: ma_device.h:26
const std::vector< ma_model_t > & getModels() noexcept
Definition: ma_device.h:28
size_t bootCount() const noexcept
Definition: ma_device.h:24
Definition: ma_sensor.h:12
Definition: ma_storage.h:227
Definition: ma_transport.h:12
Definition: ma_cv.cpp:7
Definition: ma_types.h:289