Skip to content

InscoperAPI/API/Base/Config/DeviceConfig.h

Namespaces

Name
Inscoper
Inscoper namespace.

Classes

Name
class Inscoper::DeviceConfig
DeviceConfig class provides information for device configuration.

Source code

#ifndef DEVICECONFIG_H
#define DEVICECONFIG_H

#include <Base/Config/ConnectionConfig.h>
#include <Base/Config/DriverConfig.h>
#include <Base/Config/SubDeviceGroupConfig.h>
#include <Base/Driver/EDriverType.h>

#include <NBO/NBO/ENBOType.h>

#include <memory>
#include <string>

namespace Inscoper {

class INSCOPER_EXPORT DeviceConfig {
public:
  explicit DeviceConfig(Inscoper::EDriverType driverType);

  void fromXML(Inscoper::XMLNode &deviceNode) INSCOPER_EXCEPTION;

  void toXML(Inscoper::XMLNode &xmlParent) INSCOPER_EXCEPTION;

  const std::string &getId() const;

  void setId(const std::string &id);

  const std::string &getMetaDeviceId() const;

  void setMetaDeviceId(const std::string &metaDeviceId);

  Inscoper::EDriverType getDriverType() const;

  void setDriverType(Inscoper::EDriverType driverType);

  Inscoper::NBO::ENBOType getNBOType() const;

  bool hasNBOType() const;

  void setNBOType(Inscoper::NBO::ENBOType nboType);

  void unsetNBOType();

  const std::vector<Inscoper::SubDeviceGroupConfigPtr> &getSubDeviceGroupConfigList() const;

  void setSubDeviceGroupConfigList(const std::vector<Inscoper::SubDeviceGroupConfigPtr> &subDeviceGroups);

  void addSubDeviceGroupConfig(const Inscoper::SubDeviceGroupConfigPtr &subDeviceGroup);

  const Inscoper::DriverConfigPtr &getDriverConfig() const;

  void setDriverConfig(const Inscoper::DriverConfigPtr &driverConfig);

private:
  // Common
  std::string _id;
  std::string _metaDeviceId;
  Inscoper::EDriverType _driverType;
  Inscoper::NBO::ENBOType _nboType;
  bool _hasNBOType;
  std::vector<Inscoper::SubDeviceGroupConfigPtr> _subDeviceGroups;

  Inscoper::DriverConfigPtr _driverConfig;
};

typedef std::shared_ptr<DeviceConfig> DeviceConfigPtr;

} // namespace Inscoper

#endif // DEVICECONFIG_H

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