nl

Weave 固有の nlassert.h オーバーライド。

概要

列挙型

@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
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
このルーチンは、指定されたプロファイルに関連付けられている指定されたステータス コードを説明する、人が読める形式の NULL 終了 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 *
このルーチンは、提供されたエラーを説明する、人が読める形式の NULL 終了 C 文字列を返します。
ExtractManufacturingDateFromSerialNumber(const char *serialNum, uint16_t & year, uint8_t & month, uint8_t & day)
FindNullifiedFieldsArray(void *aStructureData, const SchemaFieldDescriptor *aSchemaDescriptor, uint8_t *& aNullifiedFields)
C 構造体の最後にある null 化されたフィールドの配列の場所を見つけるヘルパー関数です。
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
指定されたエラーを説明する、人が読める形式の NULL 終了 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 から読み取る前にデータが null 値許容または null 化されていることを確認するリーダー関数。
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)
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 構造体に変換するリーダー関数。
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 に書き込む前に、データが null 値許容/null 化されているかどうかをチェックするライター関数。
secondsToMilliseconds(uint32_t seconds)
uint32_t

構造体

nl::ArrayLengthAndBuffer

配列を特定の長さで折り返すためのヘルパー。

nl::ErrorFormatter
nl::FieldDescriptor

TLV フィールドをスキーマ構造で記述し、それを c-struct のデータに接続する構造。

nl::メモリ管理

メモリ割り当て/解放関数の c 構造体。

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 構造を記述します。

Namespace

nl::ArgParser
nl::Ble

この名前空間には、Weave for Bluetooth Low Energy(BLE)用(Bluetooth Smart とも呼ばれます)のすべてのインターフェースが含まれます。

nl::Inet
nl::NestCerts

この名前空間には、Nest Weave 公開鍵基盤(PKI)証明書のグローバル シンボルが含まれます。

nl::PairingCode
nl::ウォーム
nl::Weave

列挙型

@357

 @357

@358

 @358

@359

 @359

360

 @360

@361

 @361

SerializedFieldType

 SerializedFieldType

TLV フィールドを使用して記述する TLV タイプのリスト。

プロパティ
SerializedFieldTypeArray

配列型。

SerializedFieldTypeBoolean

ブール値型。

SerializedFieldTypeByteString

バイト文字列型。

SerializedFieldTypeFloatingPoint32

32 ビット浮動小数点型

SerializedFieldTypeFloatingPoint64

64 ビット浮動小数点型

SerializedFieldTypeInt16

16 ビット符号付き型。

SerializedFieldTypeInt32

符号付き 32 ビット型。

SerializedFieldTypeInt64

64 ビット符号付き型。

SerializedFieldTypeInt8

符号付き 8 ビット型。

SerializedFieldTypeStructure

ユーザー定義の構造型。

SerializedFieldTypeUInt16

符号なし 16 ビット型。

SerializedFieldTypeUInt32

符号なし 32 ビット型。

SerializedFieldTypeUInt64

符号なし 64 ビット型。

SerializedFieldTypeUInt8

符号なし 8 ビット型。

SerializedFieldTypeUTF8String

UTF-8 文字列型。

SerializedFieldTypeBits

 SerializedFieldTypeBits

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]

このルーチンは、指定されたプロファイルに関連付けられている指定されたステータス コードを説明する、人が読める形式の NULL 終了 C 文字列を返します。

詳細
パラメータ
[in] profileId
に関連付けられた Weave プロファイル ID。
[in] statusCode
profileId のステータス コード。わかりやすい文字列で指定します。
戻り値
指定されたプロファイル内の指定されたステータス コードを記述する NULL で終わる C 文字列へのポインタ。
関連情報:
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
)

このルーチンは、提供されたエラーを説明する、人が読める形式の NULL 終了 C 文字列を返します。

詳細
パラメータ
[in] err
形式と説明のエラー。
戻り値
提供されたエラーを記述する NULL 終了 C 文字列へのポインタ。

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 構造体の最後にある null 化されたフィールドの配列の場所を見つけるヘルパー関数です。

C 構造体の nullified_fields メンバーは、FieldDescriptors の配列で記述される最後のメンバーの直後に配置する必要があります。これは、null 値許容イベントの作成者とコンシューマーにとって隠れたユーティリティーとして意図されているため、フィールド記述子のリストにはありません。null を許容するフィールドがないイベントの場合、この構造体メンバーは存在しませんが、セッターとゲッターの構築により、境界外のアクセスは発生しません。

詳細
パラメータ
[in] aStructureData
c-struct へのポインタ。
[in] aSchemaDescriptor
c 構造体を記述する SchemaFieldDescriptors。
[out] aNullifiedFields
c 構造体の nullified_fields メンバーへのポインタ。
戻り値
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
)

指定されたエラーを説明する、人が読める形式の NULL 終了 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
配列を読み取る場合は true(匿名タグを使用)
[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 から読み取る前にデータが null 値許容または null 化されていることを確認するリーダー関数。

詳細
パラメータ
[in] aReader
構造内で読むために使用するリーダー
[in] aStructureData
読み取る c 構造データへのポインタ。
[in,out] aFieldPtr
FieldDescriptor。フィールドと TLV タグを記述します。この関数はポインタをインクリメントします。FieldDescriptor 配列内の次の要素を指します。
[in] aType
フィールドの SerializedFieldType
[out] aIsNullified
フィールドが null 値になっていることを示すために設定します。
[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
SchemaFieldDescriptor に基づいて書き込む c 構造データへのポインタ。
[in] aFieldDescriptors
c struct + TLV を記述する SchemaFieldDescriptors
戻り値
WEAVE_NO_ERROR
成功時。
other
aWriter から返されるその他のエラー。

SerializedDataToTLVWriterHelper

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

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 構造体に変換するリーダー関数。

SchemaFieldDescriptor を使用して、データ構造を解釈します。

不明なフィールドをエンコーディングする場合と、予期されるフィールドに遭遇しない場合の両方に対して堅牢でなければなりません。

詳細
パラメータ
[in] aReader
データの読み取りに使用するリーダー
[in] aStructureData
SchemaFieldDescriptor に基づいて読み取る先の c 構造データへのポインタ。
[in] aFieldDescriptors
c struct + TLV を記述する SchemaFieldDescriptors
[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
FieldDescriptor に基づいて書き込む c 構造データへのポインタ
[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
配列を書き込む場合は true(匿名タグを使用)
戻り値
WEAVE_NO_ERROR
成功時。
other
aWriter から返されるその他のエラー。

WriteNullableDataForType

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

TLV に書き込む前に、データが null 値許容/null 化されているかどうかをチェックするライター関数。

詳細
パラメータ
[in] aWriter
構造の記述に使用するライター
[in] aStructureData
読み取る c 構造データへのポインタ。
[in,out] aFieldPtr
FieldDescriptor。フィールドと TLV タグを記述します。この関数はポインタをインクリメントします。FieldDescriptor 配列内の次の要素を指します。
[in] aType
フィールドの SerializedFieldType
[in] aIsNullified
true の場合、TLV タグは無効になります。
戻り値
WEAVE_NO_ERROR
成功時。
other
書き込み中に TLV エラーが発生しました。

secondsToMilliseconds

uint32_t secondsToMilliseconds(
  uint32_t seconds
)