nl::Weave::โปรไฟล์::DataManagement_Current::TraitDataSource

นี่เป็นชั้นเรียนนามธรรม

สรุป

การสืบทอด

รับค่าจาก: nl::Weave::Profiles::DataManagement_Current::TraitSchemaEngine::IGetDataDelegate
SubSub เป็นที่รู้จักโดยตรง: nl::Weave::DeviceLayer::Internal::DeviceIdentityTraitDataSource

เครื่องมือสร้างและตัวสร้าง

TraitDataSource(const TraitSchemaEngine *aEngine)
~TraitDataSource()

ประเภทสาธารณะ

EventType enum

แอตทริบิวต์สาธารณะ

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 และบูลีนที่ระบุว่าค่าเป็น Null หรือไม่แสดงอยู่ ให้ใช้ข้อมูลจากแหล่งที่มาของลักษณะเฉพาะที่จะสร้างการแจ้งเตือน
GetLeafData(PropertyPathHandle aLeafHandle, uint64_t aTagToWrite, nl::Weave::TLV::TLVWriter & aWriter) __OVERRIDE=0
virtual WEAVE_ERROR
หากได้รับแฮนเดิลเส้นทางไปยังโหนดรายละเอียดและผู้เขียน TLV จึงนําข้อมูลจากผู้โทรมา
IncrementVersion(void)
void

ประเภทสาธารณะ

ประเภทเหตุการณ์

 EventType

แอตทริบิวต์สาธารณะ

รากรากที่สอง

bool mRootIsDirty

แอตทริบิวต์ที่ได้รับการปกป้อง

เวอร์ชันที่มีการจัดการ

bool mManagedVersion

mSchemaEngine

const TraitSchemaEngine * mSchemaEngine

ฟังก์ชันสาธารณะ

ใสสะอาด

void ClearRootDirty(
  void
)

GetSchemaEngine

const TraitSchemaEngine * GetSchemaEngine(
  void
) const 

เวอร์ชันของ Get

uint64_t GetVersion(
  void
)

รากน้ําแข็ง

bool IsRootDirty(
  void
) const 

ล็อก

WEAVE_ERROR Lock(
  void
)

คําสั่งที่กําหนดเอง

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_SupportedMessage

คําสั่งที่กําหนดเอง

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

เครื่องจัดการสําหรับคําสั่งที่กําหนดเอง

ซึ่งเป็นวิธีเสมือนจริง หากไม่ได้ลบล้าง การทํางานเริ่มต้นคือการแสดงรายงานสถานะที่มีรหัสสถานะ Common::kStatus_SupportedMessage

เหตุการณ์

virtual WEAVE_ERROR OnEvent(
  uint16_t aType,
  void *aInEventParam
)

อ่านข้อมูล

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

จบการตั้งค่า

void SetDirty(
  PropertyPathHandle aPropertyHandle
)

รากฟัน

void SetRootDirty(
  void
)

ตั้งค่าเวอร์ชัน

void SetVersion(
  uint64_t version
)

แหล่งที่มาของข้อมูล

 TraitDataSource(
  const TraitSchemaEngine *aEngine
)

ปลดล็อก

WEAVE_ERROR Unlock(
  void
)

~TraitDataSource

virtual  ~TraitDataSource()

ฟังก์ชันที่ได้รับการคุ้มครอง

รับข้อมูล

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

เนื่องจากมีแฮนเดิลเส้นทางไปยังโหนด ผู้เขียน TLV และบูลีนที่ระบุว่าค่าเป็น Null หรือไม่แสดงอยู่ ให้ใช้ข้อมูลจากแหล่งที่มาของลักษณะเฉพาะที่จะสร้างการแจ้งเตือน

หากแฮนเดิลเส้นทางไม่ใช่โหนดรายละเอียด TDM จะจัดการค่าการเขียนให้แก่ผู้เขียน (เช่น การเปิดคอนเทนเนอร์ การปรับโครงสร้างเป็นโมฆะ เป็นต้น) หากโหนดที่ไม่ใช่ Leaf เป็นค่าว่างหรือไม่มี TDM จะไม่เรียก GetData สําหรับโหนดย่อย

โดยฟังก์ชันนี้จะใช้ได้เฉพาะกับแฮนเดิลที่ Null, ไม่บังคับ, ชั่วคราว หรือ Leaf ได้ ความคาดหวังก็คือลักษณะเฉพาะใดๆ ที่มีแฮนเดิลซึ่งเปิดใช้ตัวเลือกเหล่านั้นจะใช้ตรรกะที่เหมาะสมในการเติมข้อมูล aIsNull และ aIsOffer

รายละเอียด
พารามิเตอร์
[in] aHandle
PropertyPathHandle ที่เป็นปัญหา
[in] aTagToWrite
แท็กสําหรับเขียนสําหรับแฮนเดิล
[in,out] aWriter
ผู้เขียนที่จะเขียนองค์ประกอบ TLV
[out] aIsNull
AHandle เป็น Null หรือไม่ หากใช่ TDM จะเขียนองค์ประกอบ Null หาก AHandle ไม่ใช่ Leaf TDM จะข้ามบุตรหลาน
[out] aIsPresent
มี AHandle หรือไม่ หากไม่มี และ AHandle ไม่ใช่ใบไม้ TDM จะข้ามเส้นทางและย่อย
แสดงผลค่า
WEAVE_NO_ERROR
สําเร็จแล้ว
other
ดึงข้อมูลและเขียนลงในผู้เขียนไม่ได้

ข้อมูล GetLeaf

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

หากได้รับแฮนเดิลเส้นทางไปยังโหนดรายละเอียดและผู้เขียน TLV จึงนําข้อมูลจากผู้โทรมา

รายละเอียด
แสดงผลค่า
WEAVE_NO_ERROR
สําเร็จแล้ว
other
ดึงข้อมูลและเขียนลงในผู้เขียนไม่ได้

การเพิ่มเวอร์ชัน

void IncrementVersion(
  void
)