SSCMA-Micro CPP SDK  v2.0.0
SSCMA-Micro is a cross-platform machine learning inference framework designed for embedded devices.
ma::Sensor Class Referenceabstract

#include <ma_sensor.h>

Inheritance diagram for ma::Sensor:
Collaboration diagram for ma::Sensor:

Classes

struct  Preset
 

Public Types

enum class  Type : int { kUnknown = 0 , kCamera = 1 , kMicrophone = 2 , kIMU = 3 }
 
using Presets = std::vector< Preset >
 

Public Member Functions

 Sensor (size_t id, Type type) noexcept
 
virtual ~Sensor ()=default
 
virtual ma_err_t init (size_t preset_idx) noexcept=0
 
virtual void deInit () noexcept=0
 
 operator bool () const noexcept
 
size_t getID () const noexcept
 
Type getType () const noexcept
 
const PresetsavailablePresets () const noexcept
 
const PresetcurrentPreset () const noexcept
 
const size_t currentPresetIdx () const noexcept
 

Static Public Member Functions

static std::string __repr__ (Type type) noexcept
 

Protected Attributes

const size_t m_id
 
const Type m_type
 
bool m_initialized
 
size_t m_preset_idx
 
Presets m_presets
 

Member Typedef Documentation

◆ Presets

using ma::Sensor::Presets = std::vector<Preset>

Member Enumeration Documentation

◆ Type

enum ma::Sensor::Type : int
strong
Enumerator
kUnknown 
kCamera 
kMicrophone 
kIMU 

Constructor & Destructor Documentation

◆ Sensor()

ma::Sensor::Sensor ( size_t  id,
Type  type 
)
inlineexplicitnoexcept

◆ ~Sensor()

virtual ma::Sensor::~Sensor ( )
virtualdefault

Member Function Documentation

◆ __repr__()

static std::string ma::Sensor::__repr__ ( Type  type)
inlinestaticnoexcept
Here is the caller graph for this function:

◆ availablePresets()

const Presets& ma::Sensor::availablePresets ( ) const
inlinenoexcept

◆ currentPreset()

const Preset& ma::Sensor::currentPreset ( ) const
inlinenoexcept

◆ currentPresetIdx()

const size_t ma::Sensor::currentPresetIdx ( ) const
inlinenoexcept

◆ deInit()

virtual void ma::Sensor::deInit ( )
pure virtualnoexcept
Here is the caller graph for this function:

◆ getID()

size_t ma::Sensor::getID ( ) const
inlinenoexcept

◆ getType()

Type ma::Sensor::getType ( ) const
inlinenoexcept

◆ init()

virtual ma_err_t ma::Sensor::init ( size_t  preset_idx)
pure virtualnoexcept

◆ operator bool()

ma::Sensor::operator bool ( ) const
inlinenoexcept

Member Data Documentation

◆ m_id

const size_t ma::Sensor::m_id
protected

◆ m_initialized

bool ma::Sensor::m_initialized
protected

◆ m_preset_idx

size_t ma::Sensor::m_preset_idx
protected

◆ m_presets

Presets ma::Sensor::m_presets
protected

◆ m_type

const Type ma::Sensor::m_type
protected