nl
Ghi đè nlassert.h cụ thể của Weave.
Tóm tắt
Bảng liệt kê |
|
---|---|
@357
|
enum |
@358
|
enum |
@359
|
enum |
@360
|
enum |
@361
|
enum |
SerializedFieldType{
|
enum Danh sách các loại TLV để viết bằng trường TLV. |
SerializedFieldTypeBits
|
enum Bitfield of SerializeFieldType. |
SerializedFieldTypeMasks
|
enum Mặt nạ để truy cập các bit của SerialFieldFieldType. |
Typedef |
|
---|---|
Base64CharToValFunct)(uint8_t c)
|
typedefuint8_t(*
|
Base64ValToCharFunct)(uint8_t val)
|
typedefchar(*
|
MemoryAllocate)(size_t size)
|
typedefvoid *(*
Con trỏ hàm phân bổ/miễn phí bộ nhớ. |
MemoryFree)(void *ptr)
|
typedefvoid(*
|
MemoryReallocate)(void *ptr, size_t size)
|
typedefvoid *(*
|
Biến |
|
---|---|
sASN1ErrorFormatter =
{
nl::Weave::ASN1::FormatASN1Error,
NULL
}
|
const ErrorFormatter
|
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 *
Danh sách liên kết các hàm định dạng lỗi.
|
sErrorStr[WEAVE_CONFIG_ERROR_STR_SIZE]
|
char
Vùng đệm tĩnh để lưu trữ chuỗi lỗi được định dạng.
|
sErrorStr[1024]
|
char
Quy trình này sẽ trả về một chuỗi C có điểm cuối NULL có thể đọc được, mô tả mã trạng thái đã cung cấp liên kết với hồ sơ đã chỉ định.
|
sWeaveErrorFormatter =
{
nl::Weave::FormatWeaveError,
&sASN1ErrorFormatter
}
|
const ErrorFormatter
|
Hàm |
|
---|---|
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 *
Quy trình này sẽ trả về chuỗi C có điểm cuối NULL có thể đọc được mô tả lỗi đã cung cấp.
|
ExtractManufacturingDateFromSerialNumber(const char *serialNum, uint16_t & year, uint8_t & month, uint8_t & day)
|
|
FindNullifiedFieldsArray(void *aStructureData, const SchemaFieldDescriptor *aSchemaDescriptor, uint8_t *& aNullifiedFields)
|
Hàm trợ giúp để tìm vị trí của mảng trường rỗng ở cuối cấu trúc 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
Tạo chuỗi C có thể đọc bằng NULL. Các URL này mô tả lỗi đã cung cấp.
|
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)
|
Chức năng đọc để đọc một mục nhập cụ thể từ TLV dựa trên dữ liệu có cấu trúc.
|
ReadNullableDataForType(TLVReader & aReader, void *aStructureData, const FieldDescriptor *& aFieldPtr, SerializedFieldType aType, bool & aIsNullified, SerializationContext *aContext)
|
Một chức năng đọc để kiểm tra xem dữ liệu có thể có giá trị null hay không trước khi đọc từ TLV.
|
RegisterErrorFormatter(ErrorFormatter *errFormatter)
|
NL_DLL_EXPORT void
Thêm một hàm trình định dạng lỗi mới vào danh sách định dạng lỗi toàn cầu.
|
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)
|
Chức năng của tác giả để chuyển đổi cấu trúc dữ liệu thành cấu trúc TLV.
|
SerializedDataToTLVWriterHelper(TLVWriter & aWriter, uint8_t aDataTag, void *aAppData)
|
Một hàm viết trình bao bọc xung quanh SerializeDataToTLVWriter với một vùng chứa.
|
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)
|
Chức năng đọc để chuyển đổi TLV thành cấu trúc C.
|
TLVReaderToDeserializedDataHelper(nl::Weave::TLV::TLVReader & aReader, uint8_t aDataTag, void *aAppData, SerializationContext *aContext)
|
Chức năng trình trợ giúp tái đại lý một phần tử dữ liệu TLV.
|
WriteArrayData(TLVWriter & aWriter, void *aStructureData, const FieldDescriptor *aFieldPtr)
|
Một hàm của tác giả viết cấu trúc mảng.
|
WriteDataForType(TLVWriter & aWriter, void *aStructureData, const FieldDescriptor *& aFieldPtr, SerializedFieldType aType, bool aInArray)
|
Chức năng của người viết ghi một mục nhập cụ thể vào TLV dựa trên dữ liệu có cấu trúc.
|
WriteNullableDataForType(TLVWriter & aWriter, void *aStructureData, const FieldDescriptor *& aFieldPtr, SerializedFieldType aType, bool aIsNullified)
|
Một chức năng viết giúp kiểm tra xem dữ liệu có thể có giá trị null hay không trước khi ghi vào TLV.
|
secondsToMilliseconds(uint32_t seconds)
|
uint32_t
|
Cấu trúc |
|
---|---|
nl:: |
Trình trợ giúp để gói một mảng có độ dài. |
nl:: |
|
nl:: |
Cấu trúc mô tả trường TLV trong cấu trúc giản đồ và kết nối trường đó với dữ liệu theo cấu trúc c. |
nl:: |
Một cấu trúc phân bổ bộ nhớ/chức năng miễn phí của bộ nhớ. |
nl:: |
Trình bao bọc quanh một mảng FieldDescriptor để mô tả một cấu trúc/cấu trúc giản đồ. |
nl:: |
Một cấu trúc c chứa bất kỳ ngữ cảnh hoặc trạng thái nào mà chúng ta cần để sắp xếp tuần tự hoặc tái thiết. |
nl:: |
|
nl:: |
|
nl:: |
|
nl:: |
|
nl:: |
|
nl:: |
|
nl:: |
|
nl:: |
|
nl:: |
|
nl:: |
|
nl:: |
|
nl:: |
|
nl:: |
|
nl:: |
|
nl:: |
Ghép nối dữ liệu với cấu trúc dữ liệu c và SchemaSchemaDescriptor viết cấu trúc TLV dựa trên dữ liệu đó. |
Không gian tên |
|
---|---|
nl:: |
|
nl:: |
Vùng chứa tên này bao gồm tất cả giao diện trong Weave dành cho Bluetooth năng lượng thấp (BLE), còn được gọi là Bluetooth Smart. |
nl:: |
|
nl:: |
Vùng chứa tên này bao gồm các biểu tượng toàn cầu cho các chứng chỉ cơ sở hạ tầng khóa công khai (PKI) của Nest Weave. |
nl:: |
|
nl:: |
|
nl:: |
Bảng liệt kê
@357
@357
@358
@358
@359
@359
@360
@360
@361
@361
Loại trường nối tiếp
SerializedFieldType
Danh sách các loại TLV để viết bằng trường TLV.
Thuộc tính | |
---|---|
SerializedFieldTypeArray
|
Loại mảng. |
SerializedFieldTypeBoolean
|
Loại boolean. |
SerializedFieldTypeByteString
|
Loại chuỗi byte. |
SerializedFieldTypeFloatingPoint32
|
Loại nổi 32 bit |
SerializedFieldTypeFloatingPoint64
|
Loại nổi 64 bit |
SerializedFieldTypeInt16
|
Loại 16 bit có chữ ký. |
SerializedFieldTypeInt32
|
Loại 32 bit đã ký. |
SerializedFieldTypeInt64
|
Loại 64-bit đã ký. |
SerializedFieldTypeInt8
|
Loại 8 bit đã ký. |
SerializedFieldTypeStructure
|
Loại cấu trúc do người dùng xác định. |
SerializedFieldTypeUInt16
|
Loại 16 bit không dấu. |
SerializedFieldTypeUInt32
|
Loại 32-bit chưa ký. |
SerializedFieldTypeUInt64
|
Loại 64-bit chưa ký. |
SerializedFieldTypeUInt8
|
Loại 8 bit chưa ký. |
SerializedFieldTypeUTF8String
|
Loại chuỗi UTF-8. |
Loại trường nối tiếp theo chuỗi
SerializedFieldTypeBits
Bitfield of SerializeFieldType.
Trường mặt hàng được nối tiếp
SerializedFieldTypeMasks
Mặt nạ để truy cập các bit của SerialFieldFieldType.
Typedef
Base64CharToValFunct
uint8_t(* Base64CharToValFunct)(uint8_t c)
Base64ValToCharFunct
char(* Base64ValToCharFunct)(uint8_t val)
Phân bổ bộ nhớ
void *(* MemoryAllocate)(size_t size)
Con trỏ hàm phân bổ/miễn phí bộ nhớ.
Bộ nhớ trống
void(* MemoryFree)(void *ptr)
Phân bổ lại bộ nhớ
void *(* MemoryReallocate)(void *ptr, size_t size)
Biến
Lỗi định dạng sASN1
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 *) }
Danh sách lỗi
const ErrorFormatter * sErrorFormatterList = &sWeaveErrorFormatter
Danh sách liên kết các hàm định dạng lỗi.
Lỗi!
char sErrorStr[WEAVE_CONFIG_ERROR_STR_SIZE]
Vùng đệm tĩnh để lưu trữ chuỗi lỗi được định dạng.
Lỗi!
char sErrorStr[1024]
Quy trình này sẽ trả về một chuỗi C có điểm cuối NULL có thể đọc được, mô tả mã trạng thái đã cung cấp liên kết với hồ sơ đã chỉ định.
Thông tin chi tiết | |||||
---|---|---|---|---|---|
Các thông số |
|
||||
Trả về |
Con trỏ đến chuỗi C kết thúc bằng NULL mô tả mã trạng thái được cung cấp trong hồ sơ đã chỉ định.
|
WEAVE_CONFIG_SHORT_ERROR_STR
sWeaveerrorFormatter
const ErrorFormatter sWeaveErrorFormatter = { nl::Weave::FormatWeaveError, &sASN1ErrorFormatter }
Hàm
AdjustCalendarDate
void AdjustCalendarDate( uint16_t & year, uint8_t & month, uint8_t & dayOfMonth, int32_t relativeDays )
Base64CharToVal
uint8_t Base64CharToVal( uint8_t c )
Giải mã Base64
uint16_t Base64Decode( const char *in, uint16_t inLen, uint8_t *out, Base64CharToValFunct charToValFunct )
Giải mã Base64
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 )
Mã hóa Base64En
uint16_t Base64Encode( const uint8_t *in, uint16_t inLen, char *out, Base64ValToCharFunct valToCharFunct )
Mã hóa Base64En
uint16_t Base64Encode( const uint8_t *in, uint16_t inLen, char *out )
Base64Encode32
uint32_t Base64Encode32( const uint8_t *in, uint32_t inLen, char *out, Base64ValToCharFunct valToCharFunct )
Base64Encode32
uint32_t Base64Encode32( const uint8_t *in, uint32_t inLen, char *out )
Base64URLCharToVal
uint8_t Base64URLCharToVal( uint8_t c )
Mã hóa URL 64
uint16_t Base64URLDecode( const char *in, uint16_t inLen, uint8_t *out )
Mã hóa Base64URLEn
uint16_t Base64URLEncode( const uint8_t *in, uint16_t inLen, char *out )
Base64URLValToChar
char Base64URLValToChar( uint8_t val )
Base64ValToChar
char Base64ValToChar( uint8_t val )
CalendarDateToDaysFromEpoch
bool CalendarDateToDaysSinceEpoch( uint16_t year, uint8_t month, uint8_t dayOfMonth, uint32_t & daysSinceEpoch )
LịchNgàyToOrdinalDate
void CalendarDateToOrdinalDate( uint16_t year, uint8_t month, uint8_t dayOfMonth, uint16_t & dayOfYear )
CalendarTimeToGiâysTừEpoch
bool CalendarTimeToSecondsSinceEpoch( uint16_t year, uint8_t month, uint8_t dayOfMonth, uint8_t hour, uint8_t minute, uint8_t second, uint32_t & secondsSinceEpoch )
Xóa cờ
void ClearFlag( FlagsT & inFlags, const FlagT inFlag )
DateToManufacturingTuần
void DateToManufacturingWeek( uint16_t year, uint8_t month, uint8_t day, uint16_t & mfgYear, uint8_t & mfgWeek )
Ngày trong tháng
uint8_t DaysInMonth( uint16_t year, uint8_t month )
Ngày kể từEpochToCalendarDate
void DaysSinceEpochToCalendarDate( uint32_t daysSinceEpoch, uint16_t & year, uint8_t & month, uint8_t & dayOfMonth )
Ngày sang tháng 3
uint8_t DaysToMarch1( uint16_t year )
Cấu trúc định vị thỏa thuận
WEAVE_ERROR DeallocateDeserializedStructure( void *aStructureData, const SchemaFieldDescriptor *aFieldDescriptors, SerializationContext *aContext )
LỗiStrStr
NL_DLL_EXPORT const char * ErrorStr( int32_t err )
Quy trình này sẽ trả về chuỗi C có điểm cuối NULL có thể đọc được mô tả lỗi đã cung cấp.
Thông tin chi tiết | |||
---|---|---|---|
Các thông số |
|
||
Trả về |
Con trỏ tới chuỗi C kết thúc bằng NULL mô tả lỗi đã cung cấp.
|
Ngày trích xuất sản xuất
WEAVE_ERROR ExtractManufacturingDateFromSerialNumber( const char *serialNum, uint16_t & year, uint8_t & month, uint8_t & day )
FindNullifyFieldsArray
WEAVE_ERROR FindNullifiedFieldsArray( void *aStructureData, const SchemaFieldDescriptor *aSchemaDescriptor, uint8_t *& aNullifiedFields )
Hàm trợ giúp để tìm vị trí của mảng trường rỗng ở cuối cấu trúc C.
Thành viên nullify_fields của cấu trúc C dự kiến sẽ được đặt trực tiếp sau thành viên cuối cùng được mô tả trong mảng FieldDescriptors. Mã này không nằm trong danh sách nhãn mô tả trường, vì mã này là tiện ích ẩn cho người sáng tạo và người tiêu dùng của các sự kiện có thể có giá trị null. Thành viên cấu trúc này không tồn tại cho các sự kiện không có trường có thể có giá trị null, tuy nhiên, bằng cách xây dựng các phương thức setter và getter, sẽ không có quyền truy cập nào nằm ngoài giới hạn.
Thông tin chi tiết | |||||||
---|---|---|---|---|---|---|---|
Các thông số |
|
||||||
Giá trị trả về |
|
FindStatusReportStr
const char * FindStatusReportStr( uint32_t inProfileId, uint16_t inStatusCode )
Ngày trong tuần đầu tiên
uint8_t FirstWeekdayOfYear( uint16_t year )
Lỗi định dạng
void FormatError( char *buf, uint16_t bufSize, const char *subsys, int32_t err, const char *desc )
Tạo chuỗi C có thể đọc bằng NULL. Các URL này mô tả lỗi đã cung cấp.
Thông tin chi tiết | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Các thông số |
|
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 )
Năm nhuận
bool IsLeapYear( uint16_t year )
Loại hợp lệ hợp lệ
bool IsValidFieldType( SerializedFieldType aType )
Số hợp lệ của giây
bool IsValidSerialNumber( const char *serialNum )
Nhật ký sự kiện
nl::Weave::Profiles::DataManagement::event_id_t LogEvent( TEvent *aEvent )
Nhật ký sự kiện
nl::Weave::Profiles::DataManagement::event_id_t LogEvent( TEvent *aEvent, const nl::Weave::Profiles::DataManagement::EventOptions & aOptions )
tríWeekToDate
void ManufacturingWeekToDate( uint16_t mfgYear, uint8_t mfgWeek, uint16_t & year, uint8_t & month, uint8_t & day )
Ngày trong tháng khởi hành
uint8_t MarchBasedDayOfYearToMonth( uint16_t dayOfYear )
Dựa trên tháng hoạt động trong ngày
uint16_t MarchBasedMonthToDayOfYear( uint8_t month )
Vé NullifyAllEventFields
void NullifyAllEventFields( TEvent *aEvent )
Ngày thông thường
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 )
Chức năng đọc để đọc một mục nhập cụ thể từ TLV dựa trên dữ liệu có cấu trúc.
Thông tin chi tiết | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Các thông số |
|
||||||||||||
Giá trị trả về |
|
ReadNullableDataForType
WEAVE_ERROR ReadNullableDataForType( TLVReader & aReader, void *aStructureData, const FieldDescriptor *& aFieldPtr, SerializedFieldType aType, bool & aIsNullified, SerializationContext *aContext )
Một chức năng đọc để kiểm tra xem dữ liệu có thể có giá trị null hay không trước khi đọc từ TLV.
Thông tin chi tiết | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Các thông số |
|
||||||||||||
Giá trị trả về |
|
Lỗi định dạng đăng ký
NL_DLL_EXPORT void RegisterErrorFormatter( ErrorFormatter *errFormatter )
Thêm một hàm trình định dạng lỗi mới vào danh sách định dạng lỗi toàn cầu.
Thông tin chi tiết | |||
---|---|---|---|
Các thông số |
|
giây giâyEEchchToCalendarTime
void SecondsSinceEpochToCalendarTime( uint32_t secondsSinceEpoch, uint16_t & year, uint8_t & month, uint8_t & dayOfMonth, uint8_t & hour, uint8_t & minute, uint8_t & second )
Trình tự dữ liệu nối tiếp
WEAVE_ERROR SerializedDataToTLVWriter( TLVWriter & aWriter, void *aStructureData, const SchemaFieldDescriptor *aFieldDescriptors )
Chức năng của tác giả để chuyển đổi cấu trúc dữ liệu thành cấu trúc TLV.
Sử dụng SchemaFieldDescriptor để diễn giải cấu trúc dữ liệu và ghi vào TLV.
Thông tin chi tiết | |||||||
---|---|---|---|---|---|---|---|
Các thông số |
|
||||||
Giá trị trả về |
|
SerializeDataToTLVWriterHelper
WEAVE_ERROR SerializedDataToTLVWriterHelper( TLVWriter & aWriter, uint8_t aDataTag, void *aAppData )
Một hàm viết trình bao bọc xung quanh SerializeDataToTLVWriter với một vùng chứa.
Ngoài ra, hãy chia CONFIGSchemaPointerPair thành các dữ liệu cấu trúc và trình mô tả để chuyển qua.
Thông tin chi tiết | |||||||
---|---|---|---|---|---|---|---|
Các thông số |
|
||||||
Giá trị trả về |
|
Đặt cờ
void SetFlag( FlagsT & inFlags, const FlagT inFlag )
Đặt cờ
void SetFlag( FlagsT & inFlags, const FlagT inFlag, const bool inValue )
Trạng thái thể hiện trạng thái
const char * StatusReportStr( uint32_t profileId, uint16_t statusCode )
Dữ liệu TLV ReaderToDeserialatedData
WEAVE_ERROR TLVReaderToDeserializedData( nl::Weave::TLV::TLVReader & aReader, void *aStructureData, const SchemaFieldDescriptor *aFieldDescriptors, SerializationContext *aContext )
Chức năng đọc để chuyển đổi TLV thành cấu trúc C.
Sử dụng SchemaFieldDescriptor để diễn giải cấu trúc dữ liệu.
Tiêu đề này phải mạnh mẽ khi nhắm mục tiêu các trường không xác định và không được gặp trường dự kiến.
Thông tin chi tiết | |||||||||
---|---|---|---|---|---|---|---|---|---|
Các thông số |
|
||||||||
Giá trị trả về |
|
Trình xử lý dữ liệu TLV ReaderToDeserialatedDataHelper
WEAVE_ERROR TLVReaderToDeserializedDataHelper( nl::Weave::TLV::TLVReader & aReader, uint8_t aDataTag, void *aAppData, SerializationContext *aContext )
Chức năng trình trợ giúp tái đại lý một phần tử dữ liệu TLV.
Hàm phân tách CONFIGSchemaPointerPair thành dữ liệu cấu trúc và trình mô tả để chuyển qua ReadDataForType.
Thông tin chi tiết | |||||||||
---|---|---|---|---|---|---|---|---|---|
Các thông số |
|
||||||||
Giá trị trả về |
|
Ghi mảng dữ liệu
WEAVE_ERROR WriteArrayData( TLVWriter & aWriter, void *aStructureData, const FieldDescriptor *aFieldPtr )
Một hàm của tác giả viết cấu trúc mảng.
Thông tin chi tiết | |||||||
---|---|---|---|---|---|---|---|
Các thông số |
|
||||||
Giá trị trả về |
|
Ghi dữ liệu cho loại
WEAVE_ERROR WriteDataForType( TLVWriter & aWriter, void *aStructureData, const FieldDescriptor *& aFieldPtr, SerializedFieldType aType, bool aInArray )
Chức năng của người viết ghi một mục nhập cụ thể vào TLV dựa trên dữ liệu có cấu trúc.
Thông tin chi tiết | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Các thông số |
|
||||||||||
Giá trị trả về |
|
GhiNullableDataForType
WEAVE_ERROR WriteNullableDataForType( TLVWriter & aWriter, void *aStructureData, const FieldDescriptor *& aFieldPtr, SerializedFieldType aType, bool aIsNullified )
Một chức năng viết giúp kiểm tra xem dữ liệu có thể có giá trị null hay không trước khi ghi vào TLV.
Thông tin chi tiết | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Các thông số |
|
||||||||||
Giá trị trả về |
|
secondsToMilliseconds
uint32_t secondsToMilliseconds( uint32_t seconds )