Skip to content

InscoperAPI/API/Base/Status/Status.h

Namespaces

Name
Core
Inscoper
Inscoper namespace.

Classes

Name
class Inscoper::Status
Status class represents a state of the system.

Source code

#ifndef STATUS_H
#define STATUS_H

#include <Base/Status/StatusParam.h>
#include <Global.h>

#include <memory>
#include <vector>

namespace Core {
class InternalStatus;
}

namespace Inscoper {

class XMLNode;

class INSCOPER_EXPORT Status {
public:
  Status();

  Status(const std::vector<Inscoper::StatusParamPtr> &statusParams, const std::vector<std::string> &tags);

  Status(const std::shared_ptr<Status> &status, bool copy = false) INSCOPER_EXCEPTION;

  ~Status();

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

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

  void setStatus(const std::shared_ptr<Status> &status, bool copy = false) INSCOPER_EXCEPTION;

  std::vector<Inscoper::StatusParamPtr> getParamList();

  Inscoper::StatusParamPtr getParam(const Inscoper::SubDeviceId &subDeviceId);

  bool hasParamValue(const Inscoper::SubDeviceId &subDeviceId) INSCOPER_EXCEPTION;

  std::string getParamStringValue(const Inscoper::SubDeviceId &subDeviceId) INSCOPER_EXCEPTION;

  unsigned char getParamUnsignedCharValue(const Inscoper::SubDeviceId &subDeviceId) INSCOPER_EXCEPTION;

  char getParamCharValue(const Inscoper::SubDeviceId &subDeviceId) INSCOPER_EXCEPTION;

  unsigned short getParamUnsignedShortValue(const Inscoper::SubDeviceId &subDeviceId) INSCOPER_EXCEPTION;

  short getParamShortValue(const Inscoper::SubDeviceId &subDeviceId) INSCOPER_EXCEPTION;

  unsigned int getParamUnsignedIntValue(const Inscoper::SubDeviceId &subDeviceId) INSCOPER_EXCEPTION;

  int getParamIntValue(const Inscoper::SubDeviceId &subDeviceId) INSCOPER_EXCEPTION;

  unsigned long long int getParamUnsignedLongValue(const Inscoper::SubDeviceId &subDeviceId) INSCOPER_EXCEPTION;

  long long int getParamLongValue(const Inscoper::SubDeviceId &subDeviceId) INSCOPER_EXCEPTION;

  float getParamFloatValue(const Inscoper::SubDeviceId &subDeviceId) INSCOPER_EXCEPTION;

  double getParamDoubleValue(const Inscoper::SubDeviceId &subDeviceId) INSCOPER_EXCEPTION;

  Inscoper::EParamType getValueType(const Inscoper::SubDeviceId &subDeviceId) INSCOPER_EXCEPTION;

  const std::vector<std::string> &getTags() const;

  void addTag(const std::string &tag);

  void addTags(const std::vector<std::string> &tagList);

  void addParam(const Inscoper::SubDeviceId &subDeviceId) INSCOPER_EXCEPTION;

  void addParam(const Inscoper::SubDeviceId &subDeviceId, const std::string &value) INSCOPER_EXCEPTION;

  void addParam(const Inscoper::SubDeviceId &subDeviceId, unsigned char value) INSCOPER_EXCEPTION;

  void addParam(const Inscoper::SubDeviceId &subDeviceId, char value) INSCOPER_EXCEPTION;

  void addParam(const Inscoper::SubDeviceId &subDeviceId, unsigned short value) INSCOPER_EXCEPTION;

  void addParam(const Inscoper::SubDeviceId &subDeviceId, short value) INSCOPER_EXCEPTION;

  void addParam(const Inscoper::SubDeviceId &subDeviceId, unsigned int value) INSCOPER_EXCEPTION;

  void addParam(const Inscoper::SubDeviceId &subDeviceId, int value) INSCOPER_EXCEPTION;

  void addParam(const Inscoper::SubDeviceId &subDeviceId, unsigned long long int value) INSCOPER_EXCEPTION;

  void addParam(const Inscoper::SubDeviceId &subDeviceId, long long int value) INSCOPER_EXCEPTION;

  void addParam(const Inscoper::SubDeviceId &subDeviceId, float value) INSCOPER_EXCEPTION;

  void addParam(const Inscoper::SubDeviceId &subDeviceId, double value) INSCOPER_EXCEPTION;

  void addParam(const Inscoper::SubDeviceId &subDeviceId, bool value) INSCOPER_EXCEPTION;

  void addParam(const Inscoper::SubDeviceId &subDeviceId, const char *value) INSCOPER_EXCEPTION;

  void addParam(const Inscoper::StatusParamPtr &newParam) INSCOPER_EXCEPTION;

  void addMultiParam(const Inscoper::SubDeviceId &subDeviceId, unsigned short tag,
                     const std::string &value) INSCOPER_EXCEPTION;

  void addMultiParam(const Inscoper::SubDeviceId &subDeviceId, unsigned short tag,
                     unsigned char value) INSCOPER_EXCEPTION;

  void addMultiParam(const Inscoper::SubDeviceId &subDeviceId, unsigned short tag, char value) INSCOPER_EXCEPTION;

  void addMultiParam(const Inscoper::SubDeviceId &subDeviceId, unsigned short tag,
                     unsigned short value) INSCOPER_EXCEPTION;

  void addMultiParam(const Inscoper::SubDeviceId &subDeviceId, unsigned short tag, short value) INSCOPER_EXCEPTION;

  void addMultiParam(const Inscoper::SubDeviceId &subDeviceId, unsigned short tag,
                     unsigned int value) INSCOPER_EXCEPTION;

  void addMultiParam(const Inscoper::SubDeviceId &subDeviceId, unsigned short tag, int value) INSCOPER_EXCEPTION;

  void addMultiParam(const Inscoper::SubDeviceId &subDeviceId, unsigned short tag,
                     unsigned long long int value) INSCOPER_EXCEPTION;

  void addMultiParam(const Inscoper::SubDeviceId &subDeviceId, unsigned short tag,
                     long long int value) INSCOPER_EXCEPTION;

  void addMultiParam(const Inscoper::SubDeviceId &subDeviceId, unsigned short tag, float value) INSCOPER_EXCEPTION;

  void addMultiParam(const Inscoper::SubDeviceId &subDeviceId, unsigned short tag, double value) INSCOPER_EXCEPTION;

  void addMultiParam(const Inscoper::SubDeviceId &subDeviceId, unsigned short tag, bool value) INSCOPER_EXCEPTION;

  void addMultiParam(const Inscoper::SubDeviceId &subDeviceId, unsigned short tag,
                     const char *value) INSCOPER_EXCEPTION;

  void addMultiParam(unsigned short index, const Inscoper::SubDeviceId &subDeviceId, unsigned short tag,
                     const std::string &value) INSCOPER_EXCEPTION;

  void addMultiParam(unsigned short index, const Inscoper::SubDeviceId &subDeviceId, unsigned short tag,
                     unsigned char value) INSCOPER_EXCEPTION;

  void addMultiParam(unsigned short index, const Inscoper::SubDeviceId &subDeviceId, unsigned short tag,
                     char value) INSCOPER_EXCEPTION;

  void addMultiParam(unsigned short index, const Inscoper::SubDeviceId &subDeviceId, unsigned short tag,
                     unsigned short value) INSCOPER_EXCEPTION;

  void addMultiParam(unsigned short index, const Inscoper::SubDeviceId &subDeviceId, unsigned short tag,
                     short value) INSCOPER_EXCEPTION;

  void addMultiParam(unsigned short index, const Inscoper::SubDeviceId &subDeviceId, unsigned short tag,
                     unsigned int value) INSCOPER_EXCEPTION;

  void addMultiParam(unsigned short index, const Inscoper::SubDeviceId &subDeviceId, unsigned short tag,
                     int value) INSCOPER_EXCEPTION;

  void addMultiParam(unsigned short index, const Inscoper::SubDeviceId &subDeviceId, unsigned short tag,
                     unsigned long long int value) INSCOPER_EXCEPTION;

  void addMultiParam(unsigned short index, const Inscoper::SubDeviceId &subDeviceId, unsigned short tag,
                     long long int value) INSCOPER_EXCEPTION;

  void addMultiParam(unsigned short index, const Inscoper::SubDeviceId &subDeviceId, unsigned short tag,
                     float value) INSCOPER_EXCEPTION;

  void addMultiParam(unsigned short index, const Inscoper::SubDeviceId &subDeviceId, unsigned short tag,
                     double value) INSCOPER_EXCEPTION;

  void addMultiParam(unsigned short index, const Inscoper::SubDeviceId &subDeviceId, unsigned short tag,
                     bool value) INSCOPER_EXCEPTION;

  void addMultiParam(unsigned short index, const Inscoper::SubDeviceId &subDeviceId, unsigned short tag,
                     const char *value) INSCOPER_EXCEPTION;

  bool containsParam(const Inscoper::SubDeviceId &subDeviceId);

  void removeParam(const Inscoper::SubDeviceId &subDeviceId);

  virtual bool equals(const std::shared_ptr<Status> &other);

  virtual size_t getHash();

  std::shared_ptr<Core::InternalStatus> getInternal();

private:
  std::shared_ptr<Core::InternalStatus> _internal;
};

typedef std::shared_ptr<Status> StatusPtr;

} // namespace Inscoper

#endif // STATUS_H

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