NL::编织::简介:: DataManagement_Legacy::档案资料库

这是一个抽象类。

#include <src/lib/profiles/data-management/Legacy/ProfileDatabase.h>

抽象ProfileDatabase辅助类。

概括

WDM 将协议实现与数据管理实现分开,至少在原则上,将后者的大部分留给应用程序开发人员。 WDM 中所有有趣的调用以及配置文件开发人员需要实现的所有抽象方法都采用 TLV 编码的路径列表或数据列表。这使得在个人开发者的负担,并在实践中,会造成大量的重复的代码作为开发后,开发商包装和拆装写相同的代码TLV等。为了稍微简化一些事情,我们提供了一种“数据管理工具包”。

此辅助类提供了一种用于存储和检索条件是必要的具体数据支持ProfileData亚类已被供给并加入到LookupProfileData()以下方法。

公共职能

LookupDataFromProfileDescriptor (nl::Weave::TLV::TLVReader & aDescReader, ProfileData **aProfileData)
查找ProfileData数据库中的对象。
LookupProfileData (nl::Weave::TLV::TLVReader & aPathReader, ProfileData **aProfileData)
查找ProfileData数据库中的对象。
LookupProfileData (uint32_t aProfileId,nl::Weave::TLV::TLVReader *aInstanceIdRdr, ProfileData **aResult)=0
virtual WEAVE_ERROR
查找一个ProfileData对象。
Retrieve ( ReferencedTLVData & aPathList, ReferencedTLVData & aDataList)
检索给定路径列表的数据列表。
Retrieve ( ReferencedTLVData & aPathList,nl::Weave::TLV::TLVWriter & aWriter)
写出给定路径列表的数据列表。
Store ( ReferencedTLVData & aDataList)
存储数据列表。

受保护的功能

StoreInternal (nl::Weave::TLV::TLVReader & aPathReader, uint64_t aVersion,nl::Weave::TLV::TLVReader & aDataReader)

班级

NL ::编织::概况:: DataManagement_Legacy :: ProfileDatabase :: ProfileData

抽象ProfileData辅助内部类。

公共职能

LookupDataFromProfileDescriptor

WEAVE_ERROR LookupDataFromProfileDescriptor(
  nl::Weave::TLV::TLVReader & aDescReader,
  ProfileData **aProfileData
)

查找ProfileData数据库中的对象。

该实用程序的方法来找到ProfileData特定对象ProfileDatabase 。它在很大程度上依赖于具体的实施者提供的查询方法ProfileDatabase子类。

细节
参数
[in] aDescReader
到的参考TLV读取器定位在WDM路径-即一个TLV路径,其具有作为其第一元件,一个简档描述。
[out] aProfileData
一个指针,打算返回一个指针到ProfileData感兴趣的对象。
退货
WEAVE_NO_ERROR成功,否则返回WEAVE_ERROR表明故障查找匹配的ProfileData对象。

查找配置文件数据

WEAVE_ERROR LookupProfileData(
  nl::Weave::TLV::TLVReader & aPathReader,
  ProfileData **aProfileData
)

查找ProfileData数据库中的对象。

该实用程序的方法来找到ProfileData特定对象ProfileDatabase 。它在很大程度上依赖于具体的实施者提供的查询方法ProfileDatabase子类。

细节
参数
[in] aPathReader
到的参考TLV读取器定位在WDM路径-即一个TLV路径,其具有作为其第一元件,一个简档描述。
[out] aProfileData
一个指针,打算返回一个指针到ProfileData感兴趣的对象。
退货
WEAVE_NO_ERROR成功,否则返回WEAVE_ERROR表明故障查找匹配的ProfileData对象。

查找配置文件数据

virtual WEAVE_ERROR LookupProfileData(
  uint32_t aProfileId,
  nl::Weave::TLV::TLVReader *aInstanceIdRdr,
  ProfileData **aResult
)=0

查找一个ProfileData对象。

查找一个特定ProfileData对象给出一个配置文件ID和(可选的)实例ID <作为提供TLV阅读器。

细节
参数
[in] aProfileId
感兴趣的配置文件的 32 位配置文件编号。
[in] aInstanceIdRdr
指向一个TLV读者定位在所述实例标识符的数据。如果未提供实例标识符,则该标识符应为 NULL。
[out] aResult
一个指针,打算返回一个指针到ProfileData感兴趣的对象。
退货
WEAVE_NO_ERROR上的成功。否则返回WEAVE_ERROR反映了无法找到一个ProfileData对象。

取回

WEAVE_ERROR Retrieve(
  ReferencedTLVData & aPathList,
  ReferencedTLVData & aDataList
)

检索给定路径列表的数据列表。

给定路径列表,检索包含路径列表中每个路径的数据列表元素的数据列表,即该路径的终端数据。

细节
参数
[in] aPathList
甲参照ReferencedTLVData含有表示数据来检索路径的TLV编码的列表对象。该参数在该函数的整个执行过程中保持不变。
[out] aDataList
到的参考ReferencedTLVData对象要在其中写入检索到的结果。只有在成功执行此功能后才能调整数据长度。
退货
WEAVE_NO_ERROR上的成功。否则返回WEAVE_ERROR指示未检索感兴趣的数据列表。

取回

WEAVE_ERROR Retrieve(
  ReferencedTLVData & aPathList,
  nl::Weave::TLV::TLVWriter & aWriter
)

写出给定路径列表的数据列表。

给定的路径和一个列表TLV作家,写出包含在路径列表中的每个路径,这是该路径的终端的数据的数据列表中的元素的数据列表。

细节
参数
[in] aPathList
甲参照ReferencedTLVData含有的一个列表对象TLV表示数据来检索路径。该参数在该函数的整个执行过程中保持不变。
[in] aWriter
在参考TLV作家写出的检索路径列表中使用。如果发生错误,写入器的内部状态可能无法恢复。
退货
WEAVE_NO_ERROR上的成功。否则返回WEAVE_ERROR其表示未能检索数据或写出感兴趣的数据列表。

店铺

WEAVE_ERROR Store(
  ReferencedTLVData & aDataList
)

存储数据列表。

给定一个TLV编码的数据列表,这种方法经过分析该名单,并要求提供的具体方法的过程ProfileDatabase子实施者把它所属的参考数据。

细节
参数
[in] aDataList
甲参照ReferencedTLVData包含在TLV编码形式感兴趣的数据对象。
退货
WEAVE_NO_ERROR上的成功。否则返回WEAVE_ERROR指示未存储感兴趣的数据。

受保护的功能

商店内部

WEAVE_ERROR StoreInternal(
  nl::Weave::TLV::TLVReader & aPathReader,
  uint64_t aVersion,
  nl::Weave::TLV::TLVReader & aDataReader
)