nl

การลบล้าง nlassert.h ที่เฉพาะเจาะจงแบบ Weave

สรุป

การแจกแจง

@357 enum
@358 enum
@359 enum
@360 enum
@361 enum
SerializedFieldType{
  SerializedFieldTypeBoolean = 0x00,
  SerializedFieldTypeUInt8,
  SerializedFieldTypeUInt16,
  SerializedFieldTypeUInt32,
  SerializedFieldTypeUInt64,
  SerializedFieldTypeInt8,
  SerializedFieldTypeInt16,
  SerializedFieldTypeInt32,
  SerializedFieldTypeInt64,
  SerializedFieldTypeFloatingPoint32,
  SerializedFieldTypeFloatingPoint64,
  SerializedFieldTypeUTF8String,
  SerializedFieldTypeByteString,
  SerializedFieldTypeStructure,
  SerializedFieldTypeArray
}
enum
รายการประเภท TLV ที่จะเขียนด้วยฟิลด์ TLV
SerializedFieldTypeBits enum
Bitfield ของ SerializedFieldType
SerializedFieldTypeMasks enum
มาสก์สำหรับการเข้าถึงบิตของ SerializedFieldType

Typedef

Base64CharToValFunct)(uint8_t c) typedef
uint8_t(*
Base64ValToCharFunct)(uint8_t val) typedef
char(*
MemoryAllocate)(size_t size) typedef
void *(*
การจัดสรรหน่วยความจํา/ตัวชี้ฟังก์ชันว่าง
MemoryFree)(void *ptr) typedef
void(*
MemoryReallocate)(void *ptr, size_t size) typedef
void *(*

ตัวแปร

sASN1ErrorFormatter = { nl::Weave::ASN1::FormatASN1Error, NULL }
sElementSize = { sizeof(bool), sizeof(uint8_t), sizeof(uint16_t), sizeof(uint32_t), sizeof(uint64_t), sizeof(int8_t), sizeof(int16_t), sizeof(int32_t), sizeof(int64_t), sizeof(float), sizeof(double), sizeof(char *), sizeof(SerializedByteString), sizeof(void *), sizeof(void *) }[]
const uint8_t
sErrorFormatterList = &sWeaveErrorFormatter
const ErrorFormatter *
รายการฟังก์ชันการจัดรูปแบบข้อผิดพลาดที่ลิงก์
sErrorStr[WEAVE_CONFIG_ERROR_STR_SIZE]
char
บัฟเฟอร์แบบคงที่สำหรับจัดเก็บสตริงข้อผิดพลาดที่จัดรูปแบบ
sErrorStr[1024]
char
กิจวัตรนี้แสดงผลสตริง C ที่สิ้นสุดด้วยค่าว่างที่มนุษย์อ่านได้ ซึ่งอธิบายถึงรหัสสถานะที่ให้ไว้ซึ่งเชื่อมโยงกับโปรไฟล์ที่ระบุ
sWeaveErrorFormatter = { nl::Weave::FormatWeaveError, &sASN1ErrorFormatter }

ฟังก์ชัน

AdjustCalendarDate(uint16_t & year, uint8_t & month, uint8_t & dayOfMonth, int32_t relativeDays)
void
Base64CharToVal(uint8_t c)
uint8_t
Base64Decode(const char *in, uint16_t inLen, uint8_t *out, Base64CharToValFunct charToValFunct)
uint16_t
Base64Decode(const char *in, uint16_t inLen, uint8_t *out)
uint16_t
Base64Decode32(const char *in, uint32_t inLen, uint8_t *out, Base64CharToValFunct charToValFunct)
uint32_t
Base64Decode32(const char *in, uint32_t inLen, uint8_t *out)
uint32_t
Base64Encode(const uint8_t *in, uint16_t inLen, char *out, Base64ValToCharFunct valToCharFunct)
uint16_t
Base64Encode(const uint8_t *in, uint16_t inLen, char *out)
uint16_t
Base64Encode32(const uint8_t *in, uint32_t inLen, char *out, Base64ValToCharFunct valToCharFunct)
uint32_t
Base64Encode32(const uint8_t *in, uint32_t inLen, char *out)
uint32_t
Base64URLCharToVal(uint8_t c)
uint8_t
Base64URLDecode(const char *in, uint16_t inLen, uint8_t *out)
uint16_t
Base64URLEncode(const uint8_t *in, uint16_t inLen, char *out)
uint16_t
Base64URLValToChar(uint8_t val)
char
Base64ValToChar(uint8_t val)
char
CalendarDateToDaysSinceEpoch(uint16_t year, uint8_t month, uint8_t dayOfMonth, uint32_t & daysSinceEpoch)
bool
CalendarDateToOrdinalDate(uint16_t year, uint8_t month, uint8_t dayOfMonth, uint16_t & dayOfYear)
void
CalendarTimeToSecondsSinceEpoch(uint16_t year, uint8_t month, uint8_t dayOfMonth, uint8_t hour, uint8_t minute, uint8_t second, uint32_t & secondsSinceEpoch)
bool
ClearFlag(FlagsT & inFlags, const FlagT inFlag)
void
DateToManufacturingWeek(uint16_t year, uint8_t month, uint8_t day, uint16_t & mfgYear, uint8_t & mfgWeek)
void
DaysInMonth(uint16_t year, uint8_t month)
uint8_t
DaysSinceEpochToCalendarDate(uint32_t daysSinceEpoch, uint16_t & year, uint8_t & month, uint8_t & dayOfMonth)
void
DaysToMarch1(uint16_t year)
uint8_t
DeallocateDeserializedStructure(void *aStructureData, const SchemaFieldDescriptor *aFieldDescriptors, SerializationContext *aContext)
ErrorStr(int32_t err)
NL_DLL_EXPORT const char *
กิจวัตรนี้แสดงผลสตริง C ที่สิ้นสุดด้วยค่าว่างซึ่งมนุษย์อ่านได้ซึ่งอธิบายข้อผิดพลาดที่ระบุ
ExtractManufacturingDateFromSerialNumber(const char *serialNum, uint16_t & year, uint8_t & month, uint8_t & day)
FindNullifiedFieldsArray(void *aStructureData, const SchemaFieldDescriptor *aSchemaDescriptor, uint8_t *& aNullifiedFields)
ฟังก์ชันตัวช่วยเพื่อหาตำแหน่งของอาร์เรย์ฟิลด์ที่เป็นค่าว่างซึ่งอยู่ที่ส่วนท้ายของโครงสร้าง C
FindStatusReportStr(uint32_t inProfileId, uint16_t inStatusCode)
const char *
FirstWeekdayOfYear(uint16_t year)
uint8_t
FormatError(char *buf, uint16_t bufSize, const char *subsys, int32_t err, const char *desc)
void
สร้างสตริง C ที่สิ้นสุดด้วยค่าว่างซึ่งมนุษย์อ่านได้ ซึ่งอธิบายข้อผิดพลาดที่ระบุ
GetArrayElementSize(uint32_t & aOutSize, const FieldDescriptor *aFieldPtr, SerializedFieldType aType)
GetFlag(const FlagsT & inFlags, const FlagT inFlag)
bool
IsBase34NoIOChar(char ch)
bool
IsLeapYear(uint16_t year)
bool
IsValidFieldType(SerializedFieldType aType)
bool
IsValidSerialNumber(const char *serialNum)
bool
LogEvent(TEvent *aEvent)
nl::Weave::Profiles::DataManagement::event_id_t
LogEvent(TEvent *aEvent, const nl::Weave::Profiles::DataManagement::EventOptions & aOptions)
nl::Weave::Profiles::DataManagement::event_id_t
ManufacturingWeekToDate(uint16_t mfgYear, uint8_t mfgWeek, uint16_t & year, uint8_t & month, uint8_t & day)
void
MarchBasedDayOfYearToMonth(uint16_t dayOfYear)
uint8_t
MarchBasedMonthToDayOfYear(uint8_t month)
uint16_t
NullifyAllEventFields(TEvent *aEvent)
void
OrdinalDateToCalendarDate(uint16_t year, uint16_t dayOfYear, uint8_t & month, uint8_t & dayOfMonth)
void
ReadDataForType(TLVReader & aReader, void *aStructureData, const FieldDescriptor *& aFieldPtr, SerializedFieldType aType, bool aInArray, SerializationContext *aContext)
ฟังก์ชันเครื่องอ่านที่จะอ่านรายการที่เฉพาะเจาะจงจาก TLV โดยอิงตามข้อมูลโครงสร้าง
ReadNullableDataForType(TLVReader & aReader, void *aStructureData, const FieldDescriptor *& aFieldPtr, SerializedFieldType aType, bool & aIsNullified, SerializationContext *aContext)
ฟังก์ชันเครื่องอ่านที่จะตรวจสอบว่าข้อมูลเป็นค่าว่าง/เป็นค่าว่างหรือไม่ก่อนจะอ่านจาก TLV
RegisterErrorFormatter(ErrorFormatter *errFormatter)
NL_DLL_EXPORT void
เพิ่มฟังก์ชันตัวจัดรูปแบบข้อผิดพลาดใหม่ลงในรายการตัวจัดรูปแบบข้อผิดพลาดส่วนกลาง
SecondsSinceEpochToCalendarTime(uint32_t secondsSinceEpoch, uint16_t & year, uint8_t & month, uint8_t & dayOfMonth, uint8_t & hour, uint8_t & minute, uint8_t & second)
void
SerializedDataToTLVWriter(TLVWriter & aWriter, void *aStructureData, const SchemaFieldDescriptor *aFieldDescriptors)
ฟังก์ชันผู้เขียนเพื่อแปลงโครงสร้างข้อมูลเป็นโครงสร้าง TLV
SerializedDataToTLVWriterHelper(TLVWriter & aWriter, uint8_t aDataTag, void *aAppData)
ฟังก์ชันการเขียน Wrapper ที่ล้อมรอบ SerializedDataToTLVWriter พร้อมคอนเทนเนอร์
SetFlag(FlagsT & inFlags, const FlagT inFlag)
void
SetFlag(FlagsT & inFlags, const FlagT inFlag, const bool inValue)
void
StatusReportStr(uint32_t profileId, uint16_t statusCode)
const char *
TLVReaderToDeserializedData(nl::Weave::TLV::TLVReader & aReader, void *aStructureData, const SchemaFieldDescriptor *aFieldDescriptors, SerializationContext *aContext)
ฟังก์ชันเครื่องอ่านที่แปลง TLV เป็น C-struct
TLVReaderToDeserializedDataHelper(nl::Weave::TLV::TLVReader & aReader, uint8_t aDataTag, void *aAppData, SerializationContext *aContext)
ฟังก์ชันตัวช่วยที่ดีซีเรียลไลซ์องค์ประกอบข้อมูล TLV เดี่ยว
WriteArrayData(TLVWriter & aWriter, void *aStructureData, const FieldDescriptor *aFieldPtr)
ฟังก์ชันผู้เขียนที่เขียนโครงสร้างอาร์เรย์
WriteDataForType(TLVWriter & aWriter, void *aStructureData, const FieldDescriptor *& aFieldPtr, SerializedFieldType aType, bool aInArray)
ฟังก์ชันผู้เขียนจะเขียนรายการที่เฉพาะเจาะจงลงใน TLV โดยอิงตามข้อมูลโครงสร้าง
WriteNullableDataForType(TLVWriter & aWriter, void *aStructureData, const FieldDescriptor *& aFieldPtr, SerializedFieldType aType, bool aIsNullified)
ฟังก์ชันผู้เขียนเพื่อตรวจสอบว่าข้อมูลเป็นค่าว่าง/เป็นค่าว่างหรือไม่ก่อนที่จะเขียนไปยัง TLV
secondsToMilliseconds(uint32_t seconds)
uint32_t

โครงสร้าง

nl::ArrayLengthAndBuffer

ตัวช่วยสำหรับการรวมอาร์เรย์ด้วยความยาว

nl::ErrorFormatter
nl::FieldDescriptor

โครงสร้างที่อธิบายช่อง TLV ในโครงสร้างสคีมาและเชื่อมต่อกับข้อมูลใน c-struct

nl::MemoryManagement

C-struct ของฟังก์ชันที่จัดสรร/ฟรีหน่วยความจำ

nl::SchemaFieldDescriptor

ล้อมรอบอาร์เรย์ของ FieldDescriptors เพื่ออธิบายโครงสร้าง/โครงสร้างของสคีมา

nl::SerializationContext

C-struct ที่มีบริบทหรือสถานะที่เราต้องการสำหรับการทำซีเรียลไลซ์หรือดีซีเรียลไลซ์

nl::SerializedByteString
nl::SerializedFieldTypeBoolean_array
nl::SerializedFieldTypeByteString_array
nl::SerializedFieldTypeFloatingPoint32_array
nl::SerializedFieldTypeFloatingPoint64_array
nl::SerializedFieldTypeInt16_array
nl::SerializedFieldTypeInt32_array
nl::SerializedFieldTypeInt64_array
nl::SerializedFieldTypeInt8_array
nl::SerializedFieldTypeUInt16_array
nl::SerializedFieldTypeUInt32_array
nl::SerializedFieldTypeUInt64_array
nl::SerializedFieldTypeUInt8_array
nl::SerializedFieldTypeUTF8String_array
nl::StructureSchemaPointerPair

การจับคู่ข้อมูลกับโครงสร้าง c ของข้อมูล และ StructureSchemaDescriptor เพื่อเขียนโครงสร้าง TLV โดยอิงตามข้อมูลนั้น

เนมสเปซ

nl::ArgParser
nl::Ble

เนมสเปซนี้รวมอินเทอร์เฟซทั้งหมดภายใน Weave for Bluetooth Low Energy (BLE) หรือที่เรียกว่า Bluetooth Smart

nl::Inet
nl::NestCerts

เนมสเปซนี้มีสัญลักษณ์สากลสำหรับใบรับรองโครงสร้างพื้นฐานคีย์สาธารณะ (PKI) ของ Nest Weave

nl::PairingCode
nl::อบอุ่น
nl::Weave

การแจกแจง

@357

 @357

@358

 @358

@359

 @359

@360

 @360

@361

 @361

SerializedFieldType

 SerializedFieldType

รายการประเภท TLV ที่จะเขียนด้วยฟิลด์ TLV

พร็อพเพอร์ตี้
SerializedFieldTypeArray

ประเภทอาร์เรย์

SerializedFieldTypeBoolean

ประเภทบูลีน

SerializedFieldTypeByteString

ประเภทสตริงไบต์

SerializedFieldTypeFloatingPoint32

ประเภท Float 32 บิต

SerializedFieldTypeFloatingPoint64

ประเภท Float 64 บิต

SerializedFieldTypeInt16

ประเภท 16 บิตที่ลงชื่อ

SerializedFieldTypeInt32

ประเภท 32 บิตที่ลงชื่อ

SerializedFieldTypeInt64

ประเภท 64 บิตที่ลงชื่อ

SerializedFieldTypeInt8

ประเภท 8 บิตที่มีลายเซ็น

SerializedFieldTypeStructure

ประเภทโครงสร้างที่ผู้ใช้กำหนด

SerializedFieldTypeUInt16

ประเภท 16 บิตที่ไม่มีการรับรอง

SerializedFieldTypeUInt32

ประเภท 32 บิตที่ไม่มีการรับรอง

SerializedFieldTypeUInt64

ประเภท 64 บิตที่ไม่มีการรับรอง

SerializedFieldTypeUInt8

ประเภท 8 บิตที่ไม่มีการรับรอง

SerializedFieldTypeUTF8String

ประเภทสตริง UTF-8

SerializedFieldTypeBits

 SerializedFieldTypeBits

Bitfield ของ SerializedFieldType

SerializedFieldTypeMasks

 SerializedFieldTypeMasks

มาสก์สำหรับการเข้าถึงบิตของ SerializedFieldType

Typedef

Base64CharToValFunct

uint8_t(* Base64CharToValFunct)(uint8_t c)

Base64ValToCharFunct

char(* Base64ValToCharFunct)(uint8_t val)

MemoryAllocate

void *(* MemoryAllocate)(size_t size)

การจัดสรรหน่วยความจํา/ตัวชี้ฟังก์ชันว่าง

MemoryFree

void(* MemoryFree)(void *ptr)

MemoryReallocate

void *(* MemoryReallocate)(void *ptr, size_t size)

ตัวแปร

sASN1ErrorFormatter

const ErrorFormatter sASN1ErrorFormatter =
{
    nl::Weave::ASN1::FormatASN1Error,
    NULL
}

sElementSize

const uint8_t sElementSize[] =
{
    sizeof(bool),                   
    sizeof(uint8_t),                
    sizeof(uint16_t),               
    sizeof(uint32_t),               
    sizeof(uint64_t),               
    sizeof(int8_t),                 
    sizeof(int16_t),                
    sizeof(int32_t),                
    sizeof(int64_t),                
    sizeof(float),                  
    sizeof(double),                 
    sizeof(char *),                 
    sizeof(SerializedByteString),   
    sizeof(void *),                 
    sizeof(void *)                  
}

sErrorFormatterList

const ErrorFormatter * sErrorFormatterList = &sWeaveErrorFormatter

รายการฟังก์ชันการจัดรูปแบบข้อผิดพลาดที่ลิงก์

sErrorStr

char sErrorStr[WEAVE_CONFIG_ERROR_STR_SIZE]

บัฟเฟอร์แบบคงที่สำหรับจัดเก็บสตริงข้อผิดพลาดที่จัดรูปแบบ

sErrorStr

char sErrorStr[1024]

กิจวัตรนี้แสดงผลสตริง C ที่สิ้นสุดด้วยค่าว่างที่มนุษย์อ่านได้ ซึ่งอธิบายถึงรหัสสถานะที่ให้ไว้ซึ่งเชื่อมโยงกับโปรไฟล์ที่ระบุ

รายละเอียด
พารามิเตอร์
[in] profileId
ตัวระบุโปรไฟล์ Weave ที่เชื่อมโยงกับ
[in] statusCode
รหัสสถานะใน profileId เพื่อระบุสตริงที่สื่อความหมาย
การส่งคืน
ตัวชี้ไปยังสตริง C ที่มีการยุติค่า NULL ซึ่งอธิบายรหัสสถานะที่ให้ไว้ภายในโปรไฟล์ที่ระบุ
ดูเพิ่มเติม:
WEAVE_CONFIG_SHORT_ERROR_STR

sWeaveErrorFormatter

const ErrorFormatter sWeaveErrorFormatter =
{
    nl::Weave::FormatWeaveError,
    &sASN1ErrorFormatter
}

ฟังก์ชัน

AdjustCalendarDate

void AdjustCalendarDate(
  uint16_t & year,
  uint8_t & month,
  uint8_t & dayOfMonth,
  int32_t relativeDays
)

Base64CharToVal

uint8_t Base64CharToVal(
  uint8_t c
)

Base64Decode

uint16_t Base64Decode(
  const char *in,
  uint16_t inLen,
  uint8_t *out,
  Base64CharToValFunct charToValFunct
)

Base64Decode

uint16_t Base64Decode(
  const char *in,
  uint16_t inLen,
  uint8_t *out
)

Base64Decode32

uint32_t Base64Decode32(
  const char *in,
  uint32_t inLen,
  uint8_t *out,
  Base64CharToValFunct charToValFunct
)

Base64Decode32

uint32_t Base64Decode32(
  const char *in,
  uint32_t inLen,
  uint8_t *out
)

Base64Encode

uint16_t Base64Encode(
  const uint8_t *in,
  uint16_t inLen,
  char *out,
  Base64ValToCharFunct valToCharFunct
)

Base64Encode

uint16_t Base64Encode(
  const uint8_t *in,
  uint16_t inLen,
  char *out
)

Base64โปรแกรมเปลี่ยนไฟล์32

uint32_t Base64Encode32(
  const uint8_t *in,
  uint32_t inLen,
  char *out,
  Base64ValToCharFunct valToCharFunct
)

Base64โปรแกรมเปลี่ยนไฟล์32

uint32_t Base64Encode32(
  const uint8_t *in,
  uint32_t inLen,
  char *out
)

Base64URLCharToVal

uint8_t Base64URLCharToVal(
  uint8_t c
)

ถอดรหัส Base64URL

uint16_t Base64URLDecode(
  const char *in,
  uint16_t inLen,
  uint8_t *out
)

การเข้ารหัส Base64URL

uint16_t Base64URLEncode(
  const uint8_t *in,
  uint16_t inLen,
  char *out
)

Base64URLValToChar

char Base64URLValToChar(
  uint8_t val
)

Base64ValToChar

char Base64ValToChar(
  uint8_t val
)

CalendarDateToDaysSinceEpoch

bool CalendarDateToDaysSinceEpoch(
  uint16_t year,
  uint8_t month,
  uint8_t dayOfMonth,
  uint32_t & daysSinceEpoch
)

CalendarDateToOrdinalDate

void CalendarDateToOrdinalDate(
  uint16_t year,
  uint8_t month,
  uint8_t dayOfMonth,
  uint16_t & dayOfYear
)

CalendarTimeToSecondsSinceEpoch

bool CalendarTimeToSecondsSinceEpoch(
  uint16_t year,
  uint8_t month,
  uint8_t dayOfMonth,
  uint8_t hour,
  uint8_t minute,
  uint8_t second,
  uint32_t & secondsSinceEpoch
)

ClearFlag

void ClearFlag(
  FlagsT & inFlags,
  const FlagT inFlag
)

DateToManufacturingWeek

void DateToManufacturingWeek(
  uint16_t year,
  uint8_t month,
  uint8_t day,
  uint16_t & mfgYear,
  uint8_t & mfgWeek
)

DaysInMonth

uint8_t DaysInMonth(
  uint16_t year,
  uint8_t month
)

DaysSinceEpochToCalendarDate

void DaysSinceEpochToCalendarDate(
  uint32_t daysSinceEpoch,
  uint16_t & year,
  uint8_t & month,
  uint8_t & dayOfMonth
)

DaysToMarch1

uint8_t DaysToMarch1(
  uint16_t year
)

DeallocateDeserializedStructure

WEAVE_ERROR DeallocateDeserializedStructure(
  void *aStructureData,
  const SchemaFieldDescriptor *aFieldDescriptors,
  SerializationContext *aContext
)

ErrorStr

NL_DLL_EXPORT const char * ErrorStr(
  int32_t err
)

กิจวัตรนี้แสดงผลสตริง C ที่สิ้นสุดด้วยค่าว่างซึ่งมนุษย์อ่านได้ซึ่งอธิบายข้อผิดพลาดที่ระบุ

รายละเอียด
พารามิเตอร์
[in] err
ข้อผิดพลาดสำหรับรูปแบบและการอธิบาย
การส่งคืน
ตัวชี้ไปยังสตริง C ที่สิ้นสุดค่า NULL ซึ่งอธิบายข้อผิดพลาดที่ระบุ

ExtractManufacturingDateFromSerialNumber

WEAVE_ERROR ExtractManufacturingDateFromSerialNumber(
  const char *serialNum,
  uint16_t & year,
  uint8_t & month,
  uint8_t & day
)

FindNullifiedFieldsArray

WEAVE_ERROR FindNullifiedFieldsArray(
  void *aStructureData,
  const SchemaFieldDescriptor *aSchemaDescriptor,
  uint8_t *& aNullifiedFields
)

ฟังก์ชันตัวช่วยเพื่อหาตำแหน่งของอาร์เรย์ฟิลด์ที่เป็นค่าว่างซึ่งอยู่ที่ส่วนท้ายของโครงสร้าง C

สมาชิก nullified_fields ของโครงสร้าง C ควรอยู่ต่อจากสมาชิกคนสุดท้ายที่อธิบายโดยอาร์เรย์ของ FieldDescriptors คำอธิบายนี้ไม่ได้อยู่ในรายการตัวบอกช่อง เนื่องจากมีไว้เพื่อประโยชน์ที่ซ่อนเร้นไว้สำหรับครีเอเตอร์และผู้บริโภคของกิจกรรมที่ไม่มีค่าได้ ไม่มีสมาชิก Struct นี้สำหรับเหตุการณ์ที่ไม่มีช่องที่เว้นว่างได้ แต่เมื่อสร้างตัวตั้งค่าและ Getter แล้วไม่ควรเข้าถึงเกินขอบเขต

รายละเอียด
พารามิเตอร์
[in] aStructureData
ตัวชี้ไปยัง c-struct
[in] aSchemaDescriptor
SchemaFieldDescriptors เพื่ออธิบายโครงสร้าง c
[out] aNullifiedFields
ตัวชี้ไปยังสมาชิก nullified_fields ของโครงสร้าง c
แสดงผลค่า
WEAVE_NO_ERROR
ความสำเร็จ
WEAVE_ERROR_INVALID_ARGUMENT
หากตัวชี้ช่องข้อมูลเป็น NULL
WEAVE_ERROR_INCORRECT_STATE
หากรูปแบบของตัวบ่งชี้ช่องไม่ตรงกับความคาดหวัง

FindStatusReportStr

const char * FindStatusReportStr(
  uint32_t inProfileId,
  uint16_t inStatusCode
)

FirstWeekdayOfYear

uint8_t FirstWeekdayOfYear(
  uint16_t year
)

FormatError

void FormatError(
  char *buf,
  uint16_t bufSize,
  const char *subsys,
  int32_t err,
  const char *desc
)

สร้างสตริง C ที่สิ้นสุดด้วยค่าว่างซึ่งมนุษย์อ่านได้ ซึ่งอธิบายข้อผิดพลาดที่ระบุ

รายละเอียด
พารามิเตอร์
[in] buf
บัฟเฟอร์ที่สตริงข้อผิดพลาดจะถูกวาง
[in] bufSize
ขนาดของบัฟเฟอร์ที่ให้ไว้ในหน่วยไบต์
[in] subsys
สตริงสั้นๆ ที่อธิบายระบบย่อยที่ทำให้เกิดข้อผิดพลาด หรือ NULL หากไม่ทราบที่มาของข้อผิดพลาด/ไม่พร้อมใช้งาน สตริงนี้ควรมีอักขระไม่เกิน 10 ตัว
[in] err
ข้อผิดพลาดที่ต้องจัดรูปแบบ
[in] desc
สตริงที่อธิบายสาเหตุหรือความหมายของข้อผิดพลาด หรือ NULL ถ้าไม่มีข้อมูลดังกล่าว

GetArrayElementSize

WEAVE_ERROR GetArrayElementSize(
  uint32_t & aOutSize,
  const FieldDescriptor *aFieldPtr,
  SerializedFieldType aType
)

GetFlag

bool GetFlag(
  const FlagsT & inFlags,
  const FlagT inFlag
)

IsBase34NoIOChar

bool IsBase34NoIOChar(
  char ch
)

IsLeapYear

bool IsLeapYear(
  uint16_t year
)

IsValidFieldType

bool IsValidFieldType(
  SerializedFieldType aType
)

IsValidSerialNumber

bool IsValidSerialNumber(
  const char *serialNum
)

LogEvent

nl::Weave::Profiles::DataManagement::event_id_t LogEvent(
  TEvent *aEvent
)

LogEvent

nl::Weave::Profiles::DataManagement::event_id_t LogEvent(
  TEvent *aEvent,
  const nl::Weave::Profiles::DataManagement::EventOptions & aOptions
)

ManufacturingWeekToDate

void ManufacturingWeekToDate(
  uint16_t mfgYear,
  uint8_t mfgWeek,
  uint16_t & year,
  uint8_t & month,
  uint8_t & day
)

MarchBasedDayOfYearToMonth

uint8_t MarchBasedDayOfYearToMonth(
  uint16_t dayOfYear
)

MarchBasedMonthToDayOfYear

uint16_t MarchBasedMonthToDayOfYear(
  uint8_t month
)

NullifyAllEventFields

void NullifyAllEventFields(
  TEvent *aEvent
)

OrdinalDateToCalendarDate

void OrdinalDateToCalendarDate(
  uint16_t year,
  uint16_t dayOfYear,
  uint8_t & month,
  uint8_t & dayOfMonth
)

ReadDataForType

WEAVE_ERROR ReadDataForType(
  TLVReader & aReader,
  void *aStructureData,
  const FieldDescriptor *& aFieldPtr,
  SerializedFieldType aType,
  bool aInArray,
  SerializationContext *aContext
)

ฟังก์ชันเครื่องอ่านที่จะอ่านรายการที่เฉพาะเจาะจงจาก TLV โดยอิงตามข้อมูลโครงสร้าง

รายละเอียด
พารามิเตอร์
[in] aReader
เครื่องอ่านสำหรับใช้ในการอ่านในโครงสร้าง
[in] aStructureData
ตัวชี้ไปยังข้อมูลโครงสร้าง C ที่จะอ่าน
[in,out] aFieldPtr
FieldDescriptor เพื่ออธิบายช่องและแท็ก TLV ฟังก์ชันนี้จะเพิ่มตัวชี้ โดยชี้ไปที่องค์ประกอบถัดไปในอาร์เรย์ FieldDescritor
[in] aType
SerializedFieldType ของช่อง
[in] aInArray
เป็นจริงหากเรากำลังอ่านอาร์เรย์ (ใช้แท็กที่ไม่ระบุตัวตน)
[in] aContext
บริบทการทำให้เป็นอนุกรมซึ่งมีสถานะที่จำเป็นสำหรับการดำเนินการ
แสดงผลค่า
WEAVE_NO_ERROR
ความสำเร็จ
other
ข้อผิดพลาดอื่นๆ ที่ aReader ส่งกลับ

ReadNullableDataForType

WEAVE_ERROR ReadNullableDataForType(
  TLVReader & aReader,
  void *aStructureData,
  const FieldDescriptor *& aFieldPtr,
  SerializedFieldType aType,
  bool & aIsNullified,
  SerializationContext *aContext
)

ฟังก์ชันเครื่องอ่านที่จะตรวจสอบว่าข้อมูลเป็นค่าว่าง/เป็นค่าว่างหรือไม่ก่อนจะอ่านจาก TLV

รายละเอียด
พารามิเตอร์
[in] aReader
เครื่องอ่านสำหรับใช้ในการอ่านในโครงสร้าง
[in] aStructureData
ตัวชี้ไปยังข้อมูลโครงสร้าง C ที่จะอ่าน
[in,out] aFieldPtr
FieldDescriptor เพื่ออธิบายช่องและแท็ก TLV ฟังก์ชันนี้จะเพิ่มตัวชี้ที่จะชี้ไปยังองค์ประกอบถัดไปในอาร์เรย์ FieldDescriptor
[in] aType
SerializedFieldType ของช่อง
[out] aIsNullified
ตั้งค่าเพื่อระบุว่าช่องไม่มีข้อมูล
[in] aContext
บริบทการทำให้เป็นอนุกรมซึ่งมีสถานะที่จำเป็นสำหรับการดำเนินการ
แสดงผลค่า
WEAVE_NO_ERROR
ความสำเร็จ
other
ข้อผิดพลาด TLV ขณะเขียน

RegisterErrorFormatter

NL_DLL_EXPORT void RegisterErrorFormatter(
  ErrorFormatter *errFormatter
)

เพิ่มฟังก์ชันตัวจัดรูปแบบข้อผิดพลาดใหม่ลงในรายการตัวจัดรูปแบบข้อผิดพลาดส่วนกลาง

รายละเอียด
พารามิเตอร์
[in] errFormatter
โครงสร้าง ErrorFormatter ที่มีตัวชี้ไปยังฟังก์ชันข้อผิดพลาดใหม่ โปรดทราบว่าฟังก์ชันนี้จะยังคงรักษาตัวชี้ไปยังโครงสร้าง ErrorFormatter ที่ให้ไว้ ดังนั้น หน่วยความจำสำหรับโครงสร้างจะต้องถูกสำรองไว้

SecondsSinceEpochToCalendarTime

void SecondsSinceEpochToCalendarTime(
  uint32_t secondsSinceEpoch,
  uint16_t & year,
  uint8_t & month,
  uint8_t & dayOfMonth,
  uint8_t & hour,
  uint8_t & minute,
  uint8_t & second
)

SerializedDataToTLVWriter

WEAVE_ERROR SerializedDataToTLVWriter(
  TLVWriter & aWriter,
  void *aStructureData,
  const SchemaFieldDescriptor *aFieldDescriptors
)

ฟังก์ชันผู้เขียนเพื่อแปลงโครงสร้างข้อมูลเป็นโครงสร้าง TLV

ใช้ SchemaFieldDescriptor เพื่อตีความโครงสร้างข้อมูลและเขียนใน TLV

รายละเอียด
พารามิเตอร์
[in] aWriter
นักเขียนที่จะใช้ในการเขียนโครงสร้าง
[in] aStructureData
ตัวชี้ไปยังข้อมูลโครงสร้าง C ที่จะเขียนตาม SchemaFieldDescriptor
[in] aFieldDescriptors
SchemaFieldDescriptors เพื่ออธิบายโครงสร้าง c + TLV
แสดงผลค่า
WEAVE_NO_ERROR
ความสำเร็จ
other
ข้อผิดพลาดอื่นๆ ที่จะแสดงผลจาก aWriter

SerializedDataToTLVWriterHelper

WEAVE_ERROR SerializedDataToTLVWriterHelper(
  TLVWriter & aWriter,
  uint8_t aDataTag,
  void *aAppData
)

ฟังก์ชันการเขียน Wrapper ที่ล้อมรอบ SerializedDataToTLVWriter พร้อมคอนเทนเนอร์

นอกจากนี้ยังแยก StructureSchemaPointerPair เป็นข้อมูลโครงสร้างและข้อบ่งชี้เพื่อส่งผ่าน

รายละเอียด
พารามิเตอร์
[in] aWriter
นักเขียนที่จะใช้ในการเขียนโครงสร้าง
[in] aDataTag
แท็กที่จะเขียน
[in] aAppData
StructureSchemaPointerPair ที่มีตัวชี้ไปยังข้อมูลที่มีโครงสร้างและตัวอธิบายช่องข้อมูล void* เนื่องจากต้นแบบ
แสดงผลค่า
WEAVE_NO_ERROR
ความสำเร็จ
other
ข้อผิดพลาดอื่นๆ ที่จะแสดงผลจาก aWriter

SetFlag

void SetFlag(
  FlagsT & inFlags,
  const FlagT inFlag
)

SetFlag

void SetFlag(
  FlagsT & inFlags,
  const FlagT inFlag,
  const bool inValue
)

StatusReportStr

const char * StatusReportStr(
  uint32_t profileId,
  uint16_t statusCode
)

TLVReaderToDeserializedData

WEAVE_ERROR TLVReaderToDeserializedData(
  nl::Weave::TLV::TLVReader & aReader,
  void *aStructureData,
  const SchemaFieldDescriptor *aFieldDescriptors,
  SerializationContext *aContext
)

ฟังก์ชันเครื่องอ่านที่แปลง TLV เป็น C-struct

ใช้ SchemaFieldDescriptor เพื่อตีความโครงสร้างข้อมูล

ต้องมีความเสถียรทั้งเพื่อเข้ารหัสช่องที่ไม่รู้จักและไม่ให้เจอช่องที่คาดไว้

รายละเอียด
พารามิเตอร์
[in] aReader
เครื่องอ่านที่ใช้สำหรับการอ่านข้อมูล
[in] aStructureData
ตัวชี้ไปยังข้อมูลโครงสร้าง C-C ปลายทางที่เราจะอ่านตาม SchemaFieldDescriptor
[in] aFieldDescriptors
SchemaFieldDescriptors เพื่ออธิบายโครงสร้าง c + TLV
[in] aContext
บริบทการทำให้เป็นอนุกรมซึ่งมีสถานะที่จำเป็นสำหรับการดำเนินการ
แสดงผลค่า
WEAVE_NO_ERROR
ความสำเร็จ
other
ข้อผิดพลาดอื่นๆ ที่อาจส่งคืนจาก aReader

TLVReaderToDeserializedDataHelper

WEAVE_ERROR TLVReaderToDeserializedDataHelper(
  nl::Weave::TLV::TLVReader & aReader,
  uint8_t aDataTag,
  void *aAppData,
  SerializationContext *aContext
)

ฟังก์ชันตัวช่วยที่ดีซีเรียลไลซ์องค์ประกอบข้อมูล TLV เดี่ยว

ฟังก์ชันจะแยก StructureSchemaPointerPair เป็นข้อมูลโครงสร้างและตัวอธิบายเพื่อส่งผ่านไปยัง ReadDataForType

รายละเอียด
พารามิเตอร์
[in] aReader
เครื่องอ่านที่มีข้อมูลที่จะดีซีเรียลไลซ์
[in] aDataTag
ไม่ได้ใช้งานในขณะนี้
[in] aAppData
StructureSchemaPointerPair ที่มีตัวชี้ไปยังข้อมูลที่มีโครงสร้างและตัวอธิบายช่องข้อมูล void* เนื่องจากต้นแบบ
[in] aContext
บริบทการทำให้เป็นอนุกรมซึ่งมีสถานะที่จำเป็นสำหรับการดำเนินการ
แสดงผลค่า
WEAVE_NO_ERROR
ความสำเร็จ
other
ข้อผิดพลาดอื่นๆ ที่ aReader ส่งกลับ

WriteArrayData

WEAVE_ERROR WriteArrayData(
  TLVWriter & aWriter,
  void *aStructureData,
  const FieldDescriptor *aFieldPtr
)

ฟังก์ชันผู้เขียนที่เขียนโครงสร้างอาร์เรย์

รายละเอียด
พารามิเตอร์
[in] aWriter
นักเขียนที่จะใช้ในการเขียนโครงสร้าง
[in] aStructureData
ตัวชี้ไปยังข้อมูลโครงสร้าง C ที่จะเขียนตาม FieldDescriptor
[in] aFieldPtr
FieldDescriptor เพื่ออธิบายอาร์เรย์ c struct + TLV
แสดงผลค่า
WEAVE_NO_ERROR
ความสำเร็จ
other
ข้อผิดพลาดอื่นๆ ที่จะแสดงผลจาก aWriter

WriteDataForType

WEAVE_ERROR WriteDataForType(
  TLVWriter & aWriter,
  void *aStructureData,
  const FieldDescriptor *& aFieldPtr,
  SerializedFieldType aType,
  bool aInArray
)

ฟังก์ชันผู้เขียนจะเขียนรายการที่เฉพาะเจาะจงลงใน TLV โดยอิงตามข้อมูลโครงสร้าง

รายละเอียด
พารามิเตอร์
[in] aWriter
นักเขียนที่จะใช้ในการเขียนโครงสร้าง
[in] aStructureData
ตัวชี้ไปยังข้อมูลโครงสร้าง C ที่จะเขียน
[in,out] aFieldPtr
FieldDescriptor เพื่ออธิบายช่องและแท็ก TLV ฟังก์ชันนี้จะเพิ่มตัวชี้ โดยชี้ไปที่องค์ประกอบถัดไปในอาร์เรย์ FieldDescritor
[in] aType
SerializedFieldType ของช่อง
[in] aInArray
เป็นจริงถ้าเรากำลังเขียนอาร์เรย์ (ใช้แท็กที่ไม่ระบุตัวตน)
แสดงผลค่า
WEAVE_NO_ERROR
ความสำเร็จ
other
ข้อผิดพลาดอื่นๆ ที่จะแสดงผลจาก aWriter

WriteNullableDataForType

WEAVE_ERROR WriteNullableDataForType(
  TLVWriter & aWriter,
  void *aStructureData,
  const FieldDescriptor *& aFieldPtr,
  SerializedFieldType aType,
  bool aIsNullified
)

ฟังก์ชันผู้เขียนเพื่อตรวจสอบว่าข้อมูลเป็นค่าว่าง/เป็นค่าว่างหรือไม่ก่อนที่จะเขียนไปยัง TLV

รายละเอียด
พารามิเตอร์
[in] aWriter
นักเขียนที่จะใช้ในการเขียนโครงสร้าง
[in] aStructureData
ตัวชี้ไปยังข้อมูลโครงสร้าง C ที่จะอ่าน
[in,out] aFieldPtr
FieldDescriptor เพื่ออธิบายช่องและแท็ก TLV ฟังก์ชันนี้จะเพิ่มตัวชี้ที่จะชี้ไปยังองค์ประกอบถัดไปในอาร์เรย์ FieldDescriptor
[in] aType
SerializedFieldType ของช่อง
[in] aIsNullified
แท็ก TLV จะเป็นค่าว่างหากเป็นจริง
แสดงผลค่า
WEAVE_NO_ERROR
ความสำเร็จ
other
ข้อผิดพลาด TLV ขณะเขียน

secondsToMilliseconds

uint32_t secondsToMilliseconds(
  uint32_t seconds
)