nl:: Weave:: Profiles:: BDX_Development:: BDXTransfer
#include <src/lib/profiles/bulk-data-transfer/Development/BDXTransferState.h>
この構造には、アクティブな BDX 転送を表すデータメンバーが含まれます。
概要
これらのオブジェクトは、プロトコル状態を維持するために BdxProtocol によって使用されます。接続と ExchangeContext の管理を含む新しい転送の作成と初期化を処理する BdxServer によって管理されます。
パブリック属性 |
|
---|---|
mAmInitiator
|
bool
|
mAmSender
|
bool
|
mAppState
|
void *
|
mBlockCounter
|
uint32_t
送信時に BlockQuery または BlockACK を受け取ることが想定される次のブロック番号(転送が正式に開始された後)。
|
mBytesSent
|
uint64_t
|
mExchangeContext
|
|
mFileDesignator
|
ファイル/ブロック関連のデータメンバー TODO: この文字列を削除するか、この文字列がどのようなもので、どのように使用されるかについての契約を結ぶ必要があるか?具体的には、PacketBuffer を基盤としていますか。その場合、pbuf が占有されるため、xfer 全体で維持されることはないと考えられます。
|
mFirstQuery
|
bool
|
mHandlers
|
|
mIsAccepted
|
bool
|
mIsCompletedSuccessfully
|
bool
|
mIsInitiated
|
bool
|
mIsWideRange
|
bool
|
mLength
|
uint64_t
|
mMaxBlockSize
|
uint16_t
|
mNext)(BDXTransfer &)
|
|
mStartOffset
|
uint64_t
|
mTransferMode
|
uint8_t
|
mVersion
|
uint8_t
|
パブリック関数 |
|
---|---|
DispatchErrorHandler(WEAVE_ERROR anErrorCode)
|
void
エラーハンドラが設定されている場合は、それを呼び出します。
|
DispatchGetBlockHandler(uint64_t *aLength, uint8_t **aDataBlock, bool *aLastBlock)
|
void
get ブロック ハンドラが設定されている場合は、それを呼び出します。
|
DispatchPutBlockHandler(uint64_t aLength, uint8_t *aDataBlock, bool aLastBlock)
|
void
put ブロック ハンドラが設定されている場合は、それを呼び出します。
|
DispatchReceiveAccept(ReceiveAccept *aReceiveAcceptMsg)
|
ディスパッチャは、ハンドラが設定されているかどうかを確認し、設定されている場合に呼び出します。
|
DispatchRejectHandler(StatusReport *aReport)
|
void
拒否ハンドラが設定されている場合は、それを呼び出します。
|
DispatchSendAccept(SendAccept *aSendAcceptMsg)
|
送信承認ハンドラが設定されている場合は、それを呼び出します。
|
DispatchXferDoneHandler(void)
|
void
転送完了ハンドラが設定されている場合は、そのハンドラを呼び出します。
|
DispatchXferErrorHandler(StatusReport *aXferError)
|
void
転送エラーハンドラが設定されている場合は、そのハンドラを呼び出します。
|
GetDefaultFlags(bool aExpectResponse)
|
uint16_t
この関数は、メッセージとともに送信されるデフォルトのフラグを返します。
|
IsAsync(void)
|
bool
Returns true if this transfer is asynchronous, false otherwise. |
IsDriver(void)
|
bool
Returns true if this entity (node) is the driver for this transfer, false otherwise. |
Reset(void)
|
void
Sets all pointers to NULL, resets counters, etc. |
SetHandlers(BDXHandlers aHandlers)
|
void
この関数は、この BDXTransfer オブジェクトのハンドラを設定します。
|
Shutdown(void)
|
void
Shuts down the current transfer, including closing any open ExchangeContext. |
パブリック属性
mAmInitiator
bool nl::Weave::Profiles::BDX_Development::BDXTransfer::mAmInitiator
mAmSender
bool nl::Weave::Profiles::BDX_Development::BDXTransfer::mAmSender
mAppState
void * nl::Weave::Profiles::BDX_Development::BDXTransfer::mAppState
mBlockCounter
uint32_t nl::Weave::Profiles::BDX_Development::BDXTransfer::mBlockCounter
送信時に BlockQuery または BlockACK を受け取ることが想定される次のブロック番号(転送が正式に開始された後)。
受信時には、次に受信すると想定される次の BlockSend か、最後に送信した BlockQuery になります(転送が正式に開始され、最初に送信されたクエリが送信された後)。
mBytesSent
uint64_t nl::Weave::Profiles::BDX_Development::BDXTransfer::mBytesSent
mExchangeContext
ExchangeContext * nl::Weave::Profiles::BDX_Development::BDXTransfer::mExchangeContext
mFileDesignator
ReferencedString nl::Weave::Profiles::BDX_Development::BDXTransfer::mFileDesignator
ファイル/ブロック関連のデータメンバー TODO: この文字列を削除するか、この文字列がどのようなもので、どのように使用されるかについての契約を結ぶ必要があるか?具体的には、PacketBuffer を基盤としていますか。その場合、pbuf が占有されるため、xfer 全体で維持されることはないと考えられます。
mFirstQuery
bool nl::Weave::Profiles::BDX_Development::BDXTransfer::mFirstQuery
mHandlers
BDXHandlers nl::Weave::Profiles::BDX_Development::BDXTransfer::mHandlers
mIsAccepted
bool nl::Weave::Profiles::BDX_Development::BDXTransfer::mIsAccepted
mIsCompletedSuccessfully
bool nl::Weave::Profiles::BDX_Development::BDXTransfer::mIsCompletedSuccessfully
mIsInitiated
bool nl::Weave::Profiles::BDX_Development::BDXTransfer::mIsInitiated
mIsWideRange
bool nl::Weave::Profiles::BDX_Development::BDXTransfer::mIsWideRange
mLength
uint64_t nl::Weave::Profiles::BDX_Development::BDXTransfer::mLength
mMaxBlockSize
uint16_t nl::Weave::Profiles::BDX_Development::BDXTransfer::mMaxBlockSize
mNext
WEAVE_ERROR(* nl::Weave::Profiles::BDX_Development::BDXTransfer::mNext)(BDXTransfer &)
mStartOffset
uint64_t nl::Weave::Profiles::BDX_Development::BDXTransfer::mStartOffset
mTransferMode
uint8_t nl::Weave::Profiles::BDX_Development::BDXTransfer::mTransferMode
mVersion
uint8_t nl::Weave::Profiles::BDX_Development::BDXTransfer::mVersion
パブリック関数
DispatchErrorHandler
void nl::Weave::Profiles::BDX_Development::BDXTransfer::DispatchErrorHandler( WEAVE_ERROR anErrorCode )
エラーハンドラが設定されている場合は、それを呼び出します。
設定されていない場合は、デフォルトの動作として転送もシャットダウンします。
詳細 | |||
---|---|---|---|
パラメータ |
|
DispatchGetBlockHandler
void nl::Weave::Profiles::BDX_Development::BDXTransfer::DispatchGetBlockHandler( uint64_t *aLength, uint8_t **aDataBlock, bool *aLastBlock )
get ブロック ハンドラが設定されている場合は、それを呼び出します。
詳細 | |||||||
---|---|---|---|---|---|---|---|
パラメータ |
|
DispatchPutBlockHandler
void nl::Weave::Profiles::BDX_Development::BDXTransfer::DispatchPutBlockHandler( uint64_t aLength, uint8_t *aDataBlock, bool aLastBlock )
put ブロック ハンドラが設定されている場合は、それを呼び出します。
詳細 | |||||||
---|---|---|---|---|---|---|---|
パラメータ |
|
DispatchReceiveAccept
WEAVE_ERROR nl::Weave::Profiles::BDX_Development::BDXTransfer::DispatchReceiveAccept( ReceiveAccept *aReceiveAcceptMsg )
ディスパッチャは、ハンドラが設定されているかどうかを確認し、設定されている場合に呼び出します。
受信承認ハンドラが設定されている場合は、それを呼び出します。
そのため、これらはコールバックを呼び出すための公開インターフェースとして使用する必要があります。外部アプリが直接このインターフェースにアクセスできないようにする必要があります。BDXTransfer の今後のリビジョンでは、各コールバックへの個別のポインタを保存するのではなく、委譲オブジェクトを使用する可能性があります。
詳細 | |||
---|---|---|---|
パラメータ |
|
||
戻り値 |
エラー値
|
DispatchRejectHandler
void nl::Weave::Profiles::BDX_Development::BDXTransfer::DispatchRejectHandler( StatusReport *aReport )
拒否ハンドラが設定されている場合は、それを呼び出します。
設定されていない場合は、デフォルトの動作として転送もシャットダウンします。
詳細 | |||
---|---|---|---|
パラメータ |
|
DispatchSendAccept
WEAVE_ERROR nl::Weave::Profiles::BDX_Development::BDXTransfer::DispatchSendAccept( SendAccept *aSendAcceptMsg )
DispatchXferDoneHandler
void nl::Weave::Profiles::BDX_Development::BDXTransfer::DispatchXferDoneHandler( void )
転送完了ハンドラが設定されている場合は、そのハンドラを呼び出します。
設定されていない場合は、デフォルトの動作として転送もシャットダウンします。
DispatchXferErrorHandler
void nl::Weave::Profiles::BDX_Development::BDXTransfer::DispatchXferErrorHandler( StatusReport *aXferError )
転送エラーハンドラが設定されている場合は、そのハンドラを呼び出します。
設定されていない場合は、デフォルトの動作として転送もシャットダウンします。
詳細 | |||
---|---|---|---|
パラメータ |
|
GetDefaultFlags
uint16_t nl::Weave::Profiles::BDX_Development::BDXTransfer::GetDefaultFlags( bool aExpectResponse )
この関数は、メッセージとともに送信されるデフォルトのフラグを返します。
詳細 | |||
---|---|---|---|
パラメータ |
|
||
戻り値 |
送信されるフラグ
|
IsAsync
bool nl::Weave::Profiles::BDX_Development::BDXTransfer::IsAsync( void )
Returns true if this transfer is asynchronous, false otherwise.
詳細 | |
---|---|
戻り値 |
転送が非同期の場合は true になります。
|
IsDriver
bool nl::Weave::Profiles::BDX_Development::BDXTransfer::IsDriver( void )
Returns true if this entity (node) is the driver for this transfer, false otherwise.
詳細 | |
---|---|
戻り値 |
このエンティティがこの転送のドライバである場合は true
|
リセット
void nl::Weave::Profiles::BDX_Development::BDXTransfer::Reset( void )
Sets all pointers to NULL, resets counters, etc.
シャットダウン時に呼び出されます。
SetHandlers
void nl::Weave::Profiles::BDX_Development::BDXTransfer::SetHandlers( BDXHandlers aHandlers )
この関数は、この BDXTransfer オブジェクトのハンドラを設定します。
ハンドラ関数ポインタの保存方法の基礎となる実装は公開 API の一部ではないため、手動で設定しようとするのではなく、必ずこのメソッドを使用してください。
詳細 | |||
---|---|---|---|
パラメータ |
|
シャットダウン
void nl::Weave::Profiles::BDX_Development::BDXTransfer::Shutdown( void )
Shuts down the current transfer, including closing any open ExchangeContext.
この機会に、この転送とアプリケーション ロジックに関連付けられているリソースを解放します。