nl::Weave::Profiles::DataManagement_Current::GenericTraitCatalogImpl

#include <src/lib/profiles/data-management/Current/GenericTraitCatalogImpl.h>

Weave đã triển khai giao diện TraitCatalogBase cho một tập hợp các thực thể dữ liệu trait mà tất cả đều tham chiếu đến cùng một tài nguyên.

Tóm tắt

Thư viện này cung cấp một bộ nhớ được ánh xạ C++ cho những thực thể này.

Tính kế thừa

Kế thừa từ: nl::Weave::Profiles::DataManagement_Current::TraitCatalogBase< T >

Hàm khởi tạo và hàm phá

GenericTraitCatalogImpl(void)
~GenericTraitCatalogImpl(void)

Hàm công khai

Add(const ResourceIdentifier & aResourceId, const uint64_t & aInstanceId, PropertyPathHandle basePathHandle, T *traitInstance, TraitDataHandle & aHandle)
AddressToHandle(TLV::TLVReader & aReader, TraitDataHandle & aHandle, SchemaVersionRange & aSchemaVersionRange) const
virtual WEAVE_ERROR
Với một trình đọc đã được định vị tại cấu trúc Path::kCsTag_RootSection trên một đường dẫn WDM, hãy phân tích cú pháp cấu trúc đó rồi trả về tên người dùng phù hợp cho trait.
Clear(void)
DispatchEvent(uint16_t aEvent, void *aContext) const
virtual WEAVE_ERROR
Gửi một sự kiện đến tất cả thực thể dữ liệu trait có trong danh mục này.
GetInstanceId(TraitDataHandle aHandle, uint64_t & aInstanceId) const
virtual WEAVE_ERROR
GetResourceId(TraitDataHandle aHandle, ResourceIdentifier & aResourceId) const
virtual WEAVE_ERROR
HandleToAddress(TraitDataHandle aHandle, TLV::TLVWriter & aWriter, SchemaVersionRange & aSchemaVersionRange) const
virtual WEAVE_ERROR
Khi có một tên người dùng trait, hãy viết TLV cho cấu trúc Path::kCsTag_RootSection.
Iterate(IteratorCallback aCallback, void *aContext)
virtual void
Locate(TraitDataHandle aHandle, T **aTraitInstance) const
virtual WEAVE_ERROR
Khi có một tên người dùng, hãy trả về một tham chiếu đến thực thể dữ liệu trait trùng khớp.
Locate(T *aTraitInstance, TraitDataHandle & aHandle) const
virtual WEAVE_ERROR
Đảo ngược.
Locate(uint32_t aProfileId, uint64_t aInstanceId, ResourceIdentifier aResourceId, TraitDataHandle & aHandle) const
Locate(uint32_t aProfileId, uint64_t aInstanceId, ResourceIdentifier aResourceId, T **aTraitInstance) const
PrepareSubscriptionPathList(TraitPath *pathList, uint16_t pathListSize, uint16_t & pathListLen)
PrepareSubscriptionSpecificPathList(TraitPath *pathList, uint16_t pathListSize, TraitDataHandle aHandle)
Remove(T *traitInstance)
Remove(TraitDataHandle aHandle)
SetNodeId(uint64_t aNodeId)
void
Size(void) const
uint32_t
Trả về số lượng thực thể của trait trong danh mục.

Hàm công khai

Thêm

WEAVE_ERROR Add(
  const ResourceIdentifier & aResourceId,
  const uint64_t & aInstanceId,
  PropertyPathHandle basePathHandle,
  T *traitInstance,
  TraitDataHandle & aHandle
)

AddressToHandle

virtual WEAVE_ERROR AddressToHandle(
  TLV::TLVReader & aReader,
  TraitDataHandle & aHandle,
  SchemaVersionRange & aSchemaVersionRange
) const 

Với một trình đọc đã được định vị tại cấu trúc Path::kCsTag_RootSection trên một đường dẫn WDM, hãy phân tích cú pháp cấu trúc đó rồi trả về tên người dùng phù hợp cho trait.

Xoá

WEAVE_ERROR Clear(
  void
)

DispatchEvent

virtual WEAVE_ERROR DispatchEvent(
  uint16_t aEvent,
  void *aContext
) const 

Gửi một sự kiện đến tất cả thực thể dữ liệu trait có trong danh mục này.

GenericTraitCatalogImpl

 GenericTraitCatalogImpl(
  void
)

GetInstanceId

virtual WEAVE_ERROR GetInstanceId(
  TraitDataHandle aHandle,
  uint64_t & aInstanceId
) const 

GetResourceId

virtual WEAVE_ERROR GetResourceId(
  TraitDataHandle aHandle,
  ResourceIdentifier & aResourceId
) const 

HandleToAddress

virtual WEAVE_ERROR HandleToAddress(
  TraitDataHandle aHandle,
  TLV::TLVWriter & aWriter,
  SchemaVersionRange & aSchemaVersionRange
) const 

Khi có một tên người dùng trait, hãy viết TLV cho cấu trúc Path::kCsTag_RootSection.

Làm lại

virtual void Iterate(
  IteratorCallback aCallback,
  void *aContext
)

Định vị

virtual WEAVE_ERROR Locate(
  TraitDataHandle aHandle,
  T **aTraitInstance
) const 

Khi có một tên người dùng, hãy trả về một tham chiếu đến thực thể dữ liệu trait trùng khớp.

Định vị

virtual WEAVE_ERROR Locate(
  T *aTraitInstance,
  TraitDataHandle & aHandle
) const 

Đảo ngược.

Định vị

WEAVE_ERROR Locate(
  uint32_t aProfileId,
  uint64_t aInstanceId,
  ResourceIdentifier aResourceId,
  TraitDataHandle & aHandle
) const 

Định vị

WEAVE_ERROR Locate(
  uint32_t aProfileId,
  uint64_t aInstanceId,
  ResourceIdentifier aResourceId,
  T **aTraitInstance
) const 

PrepareSubscriptionPathList

WEAVE_ERROR PrepareSubscriptionPathList(
  TraitPath *pathList,
  uint16_t pathListSize,
  uint16_t & pathListLen
)

PrepareSubscriptionSpecificPathList

WEAVE_ERROR PrepareSubscriptionSpecificPathList(
  TraitPath *pathList,
  uint16_t pathListSize,
  TraitDataHandle aHandle
)

Xóa

WEAVE_ERROR Remove(
  T *traitInstance
)

Xóa

WEAVE_ERROR Remove(
  TraitDataHandle aHandle
)

SetNodeId

void SetNodeId(
  uint64_t aNodeId
)

Kích thước

uint32_t Size(
  void
) const 

Trả về số lượng thực thể của trait trong danh mục.

~ChungTraitCatalogImpl

virtual  ~GenericTraitCatalogImpl(
  void
)