Skip to content

InscoperAPI/API/Base/Description/SubDeviceDescription.h

Namespaces

Name
Inscoper
Inscoper namespace.

Classes

Name
class Inscoper::SubDeviceDescription
SubDeviceDescription class provides sub-device information coming from drivers.

Source code

#ifndef SUBDEVICEDESCRIPTION_H
#define SUBDEVICEDESCRIPTION_H

#include <Base/Description/ESubDeviceLabel.h>
#include <Base/Description/FunctionDescription.h>
#include <Base/Diag/ESubDeviceStatus.h>

#include <atomic>
#include <memory>
#include <string>
#include <vector>

namespace Inscoper {

class INSCOPER_EXPORT SubDeviceDescription {
public:
  SubDeviceDescription();

  const std::string &getName() const;

  void setName(const std::string &name);

  std::vector<Inscoper::FunctionDescriptionPtr> getFunctions();

  Inscoper::FunctionDescriptionPtr getFunction(Inscoper::EFunctionType type);

  void setFunction(Inscoper::EFunctionType type, const Inscoper::FunctionDescriptionPtr &function);

  unsigned short getTag() const;

  void setTag(unsigned short tag);

  const std::vector<Inscoper::ESubDeviceLabel> &getLabelList() const;

  void addLabel(Inscoper::ESubDeviceLabel label);

  bool hasLabel(Inscoper::ESubDeviceLabel label);

  std::vector<unsigned short> getParams();

  bool isPostInit() const;

  void setPostInit(bool postInit);

private:
  unsigned short _tag;
  std::string _name;
  std::vector<Inscoper::ESubDeviceLabel> _labelList;
  std::atomic<bool> _postInit{false};

  Inscoper::FunctionDescriptionPtr _setter;
  Inscoper::FunctionDescriptionPtr _getter;
  Inscoper::FunctionDescriptionPtr _checker;
};

typedef std::shared_ptr<SubDeviceDescription> SubDeviceDescriptionPtr;

} // namespace Inscoper

#endif // SUBDEVICEDESCRIPTION_H

Updated on 2026-09-03 at 12:14:17 +0200