GenICam标准(六)_属性列表



文章目录

  • 系列文章目录
  • 9.可用的接口
  • 9.1.IInteger 接口
  • 9.2.IFloat 接口
  • 9.3.IString 接口
  • 9.4.IEnumeration 接口
  • 9.5.ICommand 接口
  • 9.6.IBoolean 接口
  • 9.7.IRegister 接口
  • 9.8.ICategory 接口
  • 9.9.IPort 接口
  • 9.10.ISelector 接口
  • 10.标准属性列表
  • 参考



9.可用的接口

    本章用伪代码列出在 2.3 章介绍过的最重要的接口。对每个接口,实际的实现可以提供更多的方法,例如,除了 SetValue(value) 方法,还可以用直接映射到 SetValue() 的方式来实现 operator=(value) 方法。而且,实际的变量类型也可以不一样,例如,相对于伪代码中的类型 string ,实际的实现可以是 CString ,std::string 或其它的类型。

    在第 2.8 章可以找到更完整的解释。

9.1.IInteger 接口

  • int64 GetValue() —— 返回值
  • void SetValue( int64 ) —— 设定值
  • int64 GetMin() —— 返回最小值
  • int64 GetMax() —— 返回最大值
  • int64 GetInc() —— 返回 increment
  • ERepresentation GetRepresentation() —— 返回枚举型一样的数据

9.2.IFloat 接口

  • double GetValue() —— 返回值
  • void SetValue( double ) —— 设定值
  • double GetMin() —— 返回最小值
  • double GetMax() —— 返回最大值
  • ERepresentation GetRepresentation() —— 返回枚举型一样的数据
  • string GetUnit() —— 返回单位

9.3.IString 接口

  • string GetValue() —— 返回值
  • void SetValue( string ) —— 设定值
  • int64 GetMaxLenght() —— 返回字符串的最大长度

9.4.IEnumeration 接口

  • string GetStringValue() —— 把枚举型当做字符串返回
  • void SetStringValue( string ) —— 把枚举型当做字符串设置
  • int64 GetIntValue() —— 返回枚举数据相对应的索引值
  • void SetIntValue( int64 ) —— 设置枚举数据相对应的索引值
  • EnumEntryList GetEntries() —— 返回一个指向枚举型的 EnumEntry 节点的指针的列表

9.5.ICommand 接口

  • void Execute() —— 执行这个命令
  • boolean IsDone() —— 如果命令已经执行,返回 true;还在执行,返回 false

9.6.IBoolean 接口

  • boolean GetValue() —— 返回值
  • void SetValue( boolean ) —— 设定值

9.7.IRegister 接口

  • void Get( uint8 *pBuffer, int64 Length ) —— 取得寄存器的内容,放入缓冲区
  • void Set( uint8 *pBuffer, int64 Length ) —— 从缓冲区取出数据,设置寄存器内
  • int64 GetAddress() —— 取得寄存器的地址
  • int64 GetLength() —— 取得寄存器的长度,单位字节

9.8.ICategory 接口

  • NodeList GetFeatures() —— 返回一个指向属性节点的指针的列表

9.9.IPort 接口

  • void Read( uint8 *pBuffer, int64 Address, int64 Length ) —— 从设备上读一组字节,读的位置是 [Address, Address+Length]
  • void Write( uint8 *pBuffer, int64 Address, int64 Length ) —— 写一组字节到设备上,写的位置是 [Address, Address+Length]

9.10.ISelector 接口

  • boolean IsSelector() —— 说明节点是否是一个选择器
  • NodeList GetSelectedFeatures() —— 返回一个指针的列表,指针指向由当前节点选择的属性节点

10.标准属性列表

    GenApi 允许你根据名称、接口类型和含义,来定义抽象属性,并让它们为统一的 API 和 GUI 所接受。但是,GenApi 不为某种特定的设备,例如相机,提供定义好的属性。这些标准属性列表是分开提供的。不过,GenApi 通过 NameSpace 和 StandardNameSpace 属性的方式支持这些列表。(参见 2.8.1)。

    虽然创建标准属性列表的组织的工作并没有受到多少限制,GenApi 本身定义了一些属性,这些属性必须在每个标准属性列表中提供:

接口

名称

含义

ICategory

Root

属性树的root

IPort

Device

设备的默认端口

IBoolean

TLParamsLocked

Implements a flag served by the transport layer indication that it is set up for streaming.