123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335 |
- #ifndef __DAHUA_GENICAM_GENERAL_PARAMETERS_H__
- #define __DAHUA_GENICAM_GENERAL_PARAMETERS_H__
-
- #include "Defs.h"
- #include "Camera.h"
- #include "Infra/CString.h"
-
- GENICAM_NAMESPACE_BEGIN
-
- class CIntNode;
- class CDoubleNode;
- class CEnumNode;
- class CBoolNode;
- class CCmdNode;
- class CStringNode;
-
- typedef Memory::TSharedPtr<CIntNode> CIntNodePtr;
- typedef Memory::TSharedPtr<CDoubleNode> CDoubleNodePtr;
- typedef Memory::TSharedPtr<CEnumNode> CEnumNodePtr;
- typedef Memory::TSharedPtr<CBoolNode> CBoolNodePtr;
- typedef Memory::TSharedPtr<CCmdNode> CCmdNodePtr;
- typedef Memory::TSharedPtr<CStringNode> CStringNodePtr;
-
-
- /// \~chinese
- /// \brief 常用参数对象接口
- /// \defgroup config 属性配置相关操作接口
- /// \~english
- /// \brief common parameter object interface
- /// \defgroup config Property Operation interface
- /// @{
-
- /// \~chinese
- /// \brief Class CNodeBase 属性操作基类接口
- /// \~english
- /// \brief Class CNodeBase property operation base class interface
- class GENICAM_API CNodeBase
- {
- public:
- virtual ~CNodeBase();
-
- public:
- /// \~chinese
- /// \brief 属性是否可用
- /// \return 可用返回true,否则返回false
- /// \~english
- /// \brief check the property is available or not
- /// \return available:true, not available:false
- bool isAvailable() const;
-
- /// \~chinese
- /// \brief 属性是否可读
- /// \return 可读返回true,否则返回false
- /// \~english
- /// \brief check the property is readable or not
- /// \return readable:true, not readable:false
- bool isReadable() const;
-
- /// \~chinese
- /// \brief 属性是否可写
- /// \return 可写返回true,否则返回false
- /// \~english
- /// \brief check the property is writeable or not
- /// \return writeable:true, not writeable:false
- bool isWriteable() const;
-
- /// \~chinese
- /// \brief 属性是否Streamable
- /// \return 是则返回true,否则返回false
- /// \~english
- /// \brief check the property is streamable or not
- /// \return streamable:true, not streamable:false
- bool isStreamable() const;
-
- /// \~chinese
- /// \brief 判断属性是否有效
- /// \return 是则返回true,否则返回false
- /// \~english
- /// \brief check the property is valid or not
- /// \return valid:true, invalid:false
- bool isValid() const;
-
- protected:
- CNodeBase(const ICameraPtr& ptrCamera, const char* pParamName);
- CNodeBase(const CNodeBase& other);
- CNodeBase& operator= (const CNodeBase& other);
-
- protected:
- class Impl;
- Impl* m_pImpl;
- };
-
- /// \~chinese
- /// \brief Class IIntNode 整型属性操作类
- /// \~english
- /// \brief Class IIntNode integer property operation class
- class GENICAM_API CIntNode : public CNodeBase
- {
- public:
- CIntNode(const ICameraPtr& ptrCamera, const char* pParamName);
- ~CIntNode();
-
- public:
- /// \~chinese
- /// \brief 获取属性值
- /// \param [out] val 获取到的属性值
- /// \return 成功返回true,否则false
- /// \~english
- /// \brief get property's value
- /// \param [out] val the property's value
- /// \return success:true, fail:false
- bool getValue(int64_t& val) const;
-
- /// \~chinese
- /// \brief 设置属性值
- /// \param [in] val 待设置的属性值
- /// \return 成功则返回true,否则返回false
- /// \~english
- /// \brief set the property's value
- /// \param [in] val the value to be set for this property
- /// \return success:true, fail:false
- bool setValue(int64_t val);
-
- /// \~chinese
- /// \brief 获取属性可设最小值
- /// \param [out] val 获取到的属性最小值
- /// \return 成功返回true,否则false
- /// \~english
- /// \brief get the property's minimum value that can be set
- /// \param [out] val the property's minimum value
- /// \return success:true, fail:false
- bool getMinVal(int64_t& val) const;
-
- /// \~chinese
- /// \brief 获取属性可设最大值
- /// \param [out] val 获取到的属性最大值
- /// \return 成功返回true,否则false
- /// \~english
- /// \brief get the property's maximum value that can be set
- /// \param [out] val the property's maximum value
- /// \return success:true, fail:false
- bool getMaxVal(int64_t& val) const;
-
- /// \~chinese
- /// \brief 获取属性步长
- /// \param [out] val 获取到的属性步长
- /// \return 成功返回true,否则false
- /// \~english
- /// \brief get property's increment
- /// \param [out] val the property's increment
- /// \return success:true, fail:false
- bool getIncrement(int64_t& val) const;
- };
-
- /// \~chinese
- /// \brief Class IDoubleNode 浮点数属性操作类
- /// \~english
- /// \brief Class IDoubleNode float property operation class
- class GENICAM_API CDoubleNode : public CNodeBase
- {
- public:
- CDoubleNode(const ICameraPtr& ptrCamera, const char* pParamName);
- ~CDoubleNode();
-
- public:
- /// \~chinese
- /// \brief 获取属性值
- /// \param [out] val 获取到的属性值
- /// \return 成功返回true,否则false
- /// \~english
- /// \brief get property's value
- /// \param [out] val the property's value
- /// \return success:true, fail:false
- bool getValue(double& val) const;
-
- /// \~chinese
- /// \brief 设置属性值
- /// \param [in] val 待设置的属性值
- /// \return 成功则返回true,否则返回false
- /// \~english
- /// \brief set property's value
- /// \param [in] val the value to be set for this property
- /// \return success:true, fail:false
- bool setValue(double val);
-
- /// \~chinese
- /// \brief 获取属性可设最小值
- /// \param [out] val 获取到的属性最小值
- /// \return 成功返回true,否则false
- /// \~english
- /// \brief get the property's minimum value that can be set
- /// \param [out] val the property's minimum value
- /// \return success:true, fail:false
- bool getMinVal(double& val) const;
-
- /// \~chinese
- /// \brief 获取属性可设最大值
- /// \param [out] val 获取到的属性最大值
- /// \return 成功返回true,否则false
- /// \~english
- /// \brief get the property's maximum value that can be set
- /// \param [out] val the property's maximum value
- /// \return success:true, fail:false
- bool getMaxVal(double& val) const;
- };
-
- /// \~chinese
- /// \brief Class IEnumNode 枚举型属性操作类
- /// \~english
- /// \brief Class IEnumNode EnumNode property operation class
- class GENICAM_API CEnumNode : public CNodeBase
- {
- public:
- CEnumNode(const ICameraPtr& ptrCamera, const char* pParamName);
- ~CEnumNode();
-
- public:
- /// \~chinese
- /// \brief 获取枚举属性symbol值
- /// \param [out] val 获取到的属性值
- /// \return 成功返回true,否则false
- /// \~english
- /// \brief get symbol value of enum property
- /// \param [out] val the property's value
- /// \return success:true, fail:false
- bool getValueSymbol(Infra::CString& val) const;
-
- /// \~chinese
- /// \brief 设置枚举属性symbol值
- /// \param [in] strSymbolName 待设置的属性值
- /// \return 成功则返回true,否则返回false
- /// \~english
- /// \brief set symbol value of enum property
- /// \param [in] strSymbolName the value waiting to be set for this property
- /// \return success:true, fail:false
- bool setValueBySymbol(const Infra::CString& strSymbolName);
-
- /// \~chinese
- /// \brief 获取枚举属性可设置的symbol值列表
- /// \return 返回属性当前可设置symbol值列表
- /// \~english
- /// \brief Get the list of Enum property symbol value which can be set
- /// \return Return the list of Enum property symbol value which can be set now
- Infra::TVector<Infra::CString> getEnumSymbolList() const;
- };
-
- /// \~chinese
- /// \brief Class IBoolNode 布尔型属性操作类
- /// \~english
- /// \brief Class IBoolNode BoolNode property operation class
- class GENICAM_API CBoolNode : public CNodeBase
- {
- public:
- CBoolNode(const ICameraPtr& ptrCamera, const char* pParamName);
- ~CBoolNode();
-
- public:
- /// \~chinese
- /// \brief 获取属性值
- /// \param [out] val 获取到的属性值
- /// \return 成功返回true,否则false
- /// \~english
- /// \brief get property's value
- /// \param [out] val the property's value
- /// \return success:true, fail:false
- bool getValue(bool& val) const;
-
- /// \~chinese
- /// \brief 设置属性值
- /// \param [in] val 待设置的属性值
- /// \return 成功则返回true,否则返回false
- /// \~english
- /// \brief set property's value
- /// \param [in] val the value to be set for this property
- /// \return success:true, fail:false
- bool setValue(bool val);
- };
-
- /// \~chinese
- /// \brief Class ICmdNode 命令型属性操作类
- /// \~english
- /// \brief Class ICmdNode CmdNode property operation class
- class GENICAM_API CCmdNode : public CNodeBase
- {
- public:
- CCmdNode(const ICameraPtr& ptrCamera, const char* pParamName);
- ~CCmdNode();
-
- public:
- /// \~chinese
- /// \brief 执行命令类型属性
- /// \return 成功则返回true,否则返回false
- /// \~english
- /// \brief execute command property
- /// \return success:true, fail:false
- bool execute();
- };
-
- /// \~chinese
- /// \brief Class IStringNode 命令型属性操作类
- /// \~english
- /// \brief Class IStringNode StringNode property operation class
- class GENICAM_API CStringNode : public CNodeBase
- {
- public:
- CStringNode(const ICameraPtr& ptrCamera, const char* pParamName);
- ~CStringNode();
-
- public:
- /// \~chinese
- /// \brief 获取属性值
- /// \param [out] outStr 获取到的属性值
- /// \return 成功返回true,否则false
- /// \~english
- /// \brief get property's value
- /// \param [out] outStr the property's value
- /// \return success:true, fail:false
- bool getValue(Infra::CString &outStr);
-
- /// \~chinese
- /// \brief 设置属性值
- /// \param [in] inStr 待输入的属性值
- /// \return 成功则返回true,否则返回false
- /// \~english
- /// \brief set the property's value
- /// \param [in] inStr the value to be set for this property
- /// \return success:true, fail:false
- bool setValue(const Infra::CString &inStr);
- };
-
- /// @}
- GENICAM_NAMESPACE_END
-
- #endif // __DAHUA_GENICAM_GENERAL_PARAMETERS_H__
|