nl::Weave::Profiles::DataManagement_Current::TraitDataSource

這是抽象類別。

摘要

繼承

沿用自: nl::Weave::Profiles::DataManagement_Current::TraitSchemaEngine::IGetDataDelegate
直接已知子類別: nl::Weave::DeviceLayer::Internal::DeviceIdentityTraitDataSource

建構函式和解構函式

TraitDataSource(const TraitSchemaEngine *aEngine)
~TraitDataSource()

公開類型

EventType 列舉

公開屬性

mRootIsDirty
bool

受保護的屬性

mManagedVersion
bool
mSchemaEngine

公用函式

ClearRootDirty(void)
void
GetSchemaEngine(void) const
GetVersion(void)
uint64_t
IsRootDirty(void) const
bool
Lock(void)
OnCustomCommand(Command *aCommand, const nl::Weave::WeaveMessageInfo *aMsgInfo, nl::Weave::PacketBuffer *aPayload, const uint64_t & aCommandType, const bool aIsExpiryTimeValid, const int64_t & aExpiryTimeMicroSecond, const bool aIsMustBeVersionValid, const uint64_t & aMustBeVersion, nl::Weave::TLV::TLVReader & aArgumentReader)
virtual void
自訂指令的處理常式。
OnCustomCommand(Command *aCommand, const nl::Weave::WeaveMessageInfo *aMsgInfo, nl::Weave::PacketBuffer *aPayload, nl::Weave::TLV::TLVReader & aArgumentReader)
virtual void
自訂指令的處理常式。
OnEvent(uint16_t aType, void *aInEventParam)
virtual WEAVE_ERROR
ReadData(PropertyPathHandle aHandle, uint64_t aTagToWrite, TLV::TLVWriter & aWriter)
SetDirty(PropertyPathHandle aPropertyHandle)
void
SetRootDirty(void)
void
SetVersion(uint64_t version)
void
Unlock(void)

受保護的函式

GetData(PropertyPathHandle aHandle, uint64_t aTagToWrite, nl::Weave::TLV::TLVWriter & aWriter, bool & aIsNull, bool & aIsPresent) __OVERRIDE
virtual WEAVE_ERROR
假設有一個路徑控點指向節點、TLV 寫入器和布林值指出該值是否為空值,請從建立通知的特徵來源取得資料。
GetLeafData(PropertyPathHandle aLeafHandle, uint64_t aTagToWrite, nl::Weave::TLV::TLVWriter & aWriter) __OVERRIDE=0
virtual WEAVE_ERROR
假設有一個分葉節點和 TLV 寫入者的路徑控點,請從受呼叫者取得資料。
IncrementVersion(void)
void

公開類型

EventType

 EventType

公開屬性

mRootIsDirty

bool mRootIsDirty

受保護的屬性

mManagedVersion

bool mManagedVersion

mSchemaEngine

const TraitSchemaEngine * mSchemaEngine

公用函式

ClearRootDirty

void ClearRootDirty(
  void
)

GetSchemaEngine

const TraitSchemaEngine * GetSchemaEngine(
  void
) const 

GetVersion

uint64_t GetVersion(
  void
)

IsRootDirty

bool IsRootDirty(
  void
) const 

鎖定

WEAVE_ERROR Lock(
  void
)

OnCustomCommand

virtual void OnCustomCommand(
  Command *aCommand,
  const nl::Weave::WeaveMessageInfo *aMsgInfo,
  nl::Weave::PacketBuffer *aPayload,
  const uint64_t & aCommandType,
  const bool aIsExpiryTimeValid,
  const int64_t & aExpiryTimeMicroSecond,
  const bool aIsMustBeVersionValid,
  const uint64_t & aMustBeVersion,
  nl::Weave::TLV::TLVReader & aArgumentReader
)

自訂指令的處理常式。

這是虛擬的方法如果未覆寫,預設行為是傳回狀態碼 Common::kStatus_UnsupportedMessage

OnCustomCommand

virtual void OnCustomCommand(
  Command *aCommand,
  const nl::Weave::WeaveMessageInfo *aMsgInfo,
  nl::Weave::PacketBuffer *aPayload,
  nl::Weave::TLV::TLVReader & aArgumentReader
)

自訂指令的處理常式。

這是虛擬的方法如果未覆寫,預設行為是傳回狀態碼 Common::kStatus_UnsupportedMessage

OnEvent

virtual WEAVE_ERROR OnEvent(
  uint16_t aType,
  void *aInEventParam
)

ReadData

WEAVE_ERROR ReadData(
  PropertyPathHandle aHandle,
  uint64_t aTagToWrite,
  TLV::TLVWriter & aWriter
)

SetDirty

void SetDirty(
  PropertyPathHandle aPropertyHandle
)

SetRootDirty

void SetRootDirty(
  void
)

SetVersion

void SetVersion(
  uint64_t version
)

TraitDataSource

 TraitDataSource(
  const TraitSchemaEngine *aEngine
)

解鎖

WEAVE_ERROR Unlock(
  void
)

~TraitDataSource

virtual  ~TraitDataSource()

受保護的函式

GetData

virtual WEAVE_ERROR GetData(
  PropertyPathHandle aHandle,
  uint64_t aTagToWrite,
  nl::Weave::TLV::TLVWriter & aWriter,
  bool & aIsNull,
  bool & aIsPresent
) __OVERRIDE

假設有一個路徑控點指向節點、TLV 寫入器和布林值指出該值是否為空值,請從建立通知的特徵來源取得資料。

如果路徑控點不是分葉節點,TDM 會處理將值寫入寫入器的情況 (例如開啟容器、讓結構體無效等)。如果非分葉節點為空值或不存在,TDM 不會為其子項呼叫 GetData。

系統只會針對可為空值、選用、暫時或分葉的控點呼叫此函式。預期啟用這些選項的特徵,都會導入適當的邏輯來填入 aIsNull 和 aIsPresent 的組合。

詳細說明
參數
[in] aHandle
有問題的 PropertyPathHandle。
[in] aTagToWrite
為 aHandle 寫入的標記。
[in,out] aWriter
要寫入 TLV 元素的寫入者。
[out] aIsNull
帳號代碼是否可為空值?若有,TDM 會寫入空值元素。如果 aHandle 不是分葉,TDM 會略過其子項。
[out] aIsPresent
有帳號代碼嗎?如果否,且 aHandle 不是分葉,TDM 會略過路徑及其子項。
傳回值
WEAVE_NO_ERROR
成功時。
other
無法擷取資料並寫入寫入者。

GetLeafData

virtual WEAVE_ERROR GetLeafData(
  PropertyPathHandle aLeafHandle,
  uint64_t aTagToWrite,
  nl::Weave::TLV::TLVWriter & aWriter
) __OVERRIDE=0

假設有一個分葉節點和 TLV 寫入者的路徑控點,請從受呼叫者取得資料。

詳細說明
傳回值
WEAVE_NO_ERROR
成功時。
other
無法擷取資料並寫入寫入者。

IncrementVersion

void IncrementVersion(
  void
)