ネットワーク コプロセッサ
このモジュールには、スレッド スタックの実行を制御する関数が含まれています。
概要
Typedef |
|
---|---|
otNcpDelegateAllowPeekPoke)(uint32_t aAddress, uint16_t aCount)
|
typedefbool(*
ピーク/ポーク操作の動作を制御するデリゲート(関数ポインタ)型を定義します。 |
otNcpHdlcSendCallback)(const uint8_t *aBuf, uint16_t aBufLength)
|
typedefint(*
HDLC エンコードされた NCP データを送信するためにポインタが呼び出されます。 |
関数 |
|
---|---|
otNcpHdlcInit(otInstance *aInstance, otNcpHdlcSendCallback aSendCallback)
|
void
HDLC フレーミングに基づいて NCP を初期化します。
|
otNcpHdlcInitMulti(otInstance **aInstance, uint8_t aCount, otNcpHdlcSendCallback aSendCallback)
|
void
HDLC フレーミングに基づいて NCP を初期化します。
|
otNcpHdlcReceive(const uint8_t *aBuf, uint16_t aBufLength)
|
void
HDLC エンコードされた NCP データの受信後に呼び出されます。
|
otNcpHdlcSendDone(void)
|
void
NCP の送信が完了した後に呼び出されます。
|
otNcpPlatLogv(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, va_list aArgs)
|
void
otNcpStreamWrite を使用して OpenThread ログを書き込みます。 |
otNcpRegisterPeekPokeDelegates(otNcpDelegateAllowPeekPoke aAllowPeekDelegate, otNcpDelegateAllowPeekPoke aAllowPokeDelegate)
|
void
peek/poke デリゲート関数を NCP モジュールに登録します。
|
otNcpSpiInit(otInstance *aInstance)
|
void
SPI フレーミングに基づいて NCP を初期化します。
|
otNcpStreamWrite(int aStreamId, const uint8_t *aDataPtr, int aDataLen)
|
特定のストリームを介してホストにデータを送信します。
|
Typedef
otNcpDelegateAllowPeekPoke
bool(* otNcpDelegateAllowPeekPoke)(uint32_t aAddress, uint16_t aCount)
ピーク/ポーク操作の動作を制御するデリゲート(関数ポインタ)型を定義します。
このデリゲート関数は、特定のメモリ領域のピークまたはポークを許可するかどうかを決定するために呼び出されます。peek/poke コマンドの NCP サポートが有効な場合に使用されます。
詳細 | |||||
---|---|---|---|---|---|
パラメータ |
|
||||
戻り値 |
指定されたメモリ領域のピーク/ポークを許可する場合は TRUE を、そうでない場合は FALSE です。
|
otNcpHdlcSendCallback
int(* otNcpHdlcSendCallback)(const uint8_t *aBuf, uint16_t aBufLength)
HDLC エンコードされた NCP データを送信するためにポインタが呼び出されます。
詳細 | |||||
---|---|---|---|---|---|
パラメータ |
|
||||
戻り値 |
コールバックによって処理されたバイト数。
|
関数
otNcpHdlcInit
void otNcpHdlcInit(
otInstance *aInstance,
otNcpHdlcSendCallback aSendCallback
)
HDLC フレーミングに基づいて NCP を初期化します。
詳細 | |||||
---|---|---|---|---|---|
パラメータ |
|
otNcpHdlcInitMulti
void otNcpHdlcInitMulti(
otInstance **aInstance,
uint8_t aCount,
otNcpHdlcSendCallback aSendCallback
)
HDLC フレーミングに基づいて NCP を初期化します。
詳細 | |||||||
---|---|---|---|---|---|---|---|
パラメータ |
|
otNcpHdlcReceive
void otNcpHdlcReceive(
const uint8_t *aBuf,
uint16_t aBufLength
)
HDLC エンコードされた NCP データの受信後に呼び出されます。
詳細 | |||||
---|---|---|---|---|---|
パラメータ |
|
otNcpHdlcSendDone
void otNcpHdlcSendDone(
void
)
NCP の送信が完了した後に呼び出されます。
otNcpPlatLogv
void otNcpPlatLogv(
otLogLevel aLogLevel,
otLogRegion aLogRegion,
const char *aFormat,
va_list aArgs
)
otNcpStreamWrite
を使用して OpenThread ログを書き込みます。
詳細 | |||||||||
---|---|---|---|---|---|---|---|---|---|
パラメータ |
|
otNcpRegisterPeekPokeDelegates
void otNcpRegisterPeekPokeDelegates(
otNcpDelegateAllowPeekPoke aAllowPeekDelegate,
otNcpDelegateAllowPeekPoke aAllowPokeDelegate
)
peek/poke デリゲート関数を NCP モジュールに登録します。
委譲関数は NCP モジュールによって呼び出され、特定のメモリ領域のピークまたはポークを許可するかどうかを決定します。デリゲート ポインタが NULL に設定されている場合、任意のアドレスに対してピーク/ポーク操作が可能になります。
詳細 | |||||
---|---|---|---|---|---|
パラメータ |
|
otNcpSpiInit
void otNcpSpiInit(
otInstance *aInstance
)
SPI フレーミングに基づいて NCP を初期化します。
詳細 | |||
---|---|---|---|
パラメータ |
|
otNcpStreamWrite
otError otNcpStreamWrite(
int aStreamId,
const uint8_t *aDataPtr,
int aDataLen
)
特定のストリームを介してホストにデータを送信します。
指定された aStreamId を使用して、指定されたデータをホストに送信しようとします。これは、エラー メッセージの報告、デバッグ/診断コンソールの実装、場合によっては他のタイプのデータ ストリームの実装に役立ちます。
書き込みが全体が受け入れられるか、または拒否される。部分的な書き込みは試行されません。
詳細 | |||||||
---|---|---|---|---|---|---|---|
パラメータ |
|
||||||
戻り値 |
|
関連情報
OpenThread API リファレンスのトピックは、GitHub で入手できるソースコードに由来しています。 詳細について、またはドキュメントへの投稿については、リソースをご覧ください。