nl:: Weave:: Profiles:: BDX_Development:: SendInit
#include <src/lib/profiles/bulk-data-transfer/Development/BDXMessages.h>
The SendInit message is used to start an exchange when the sender is the initiator.
Summary
Inheritance
Direct Known Subclasses: nl::Weave::Profiles::BDX_Development::ReceiveInit
Constructors and Destructors |
|
---|---|
SendInit(void)
|
Public types |
|
---|---|
MetaDataTLVWriteCallback)(uint8_t *aBuffer, uint16_t aBufferLength, uint16_t &aNumBytesWritten, void *aAppState)
|
typedef MetaDataTLVWriteCallback provides a means by which a client can supply a SendInit with any metadata they want. |
Public attributes |
|
---|---|
mAsynchronousModeSupported
|
bool
True if we can support async mode.
|
mDefiniteLength
|
bool
True if the length field is present.
|
mFileDesignator
|
String containing pre-negotiated information.
|
mLength
|
uint64_t
Proposed length of data in transfer, 0 for indefinite.
|
mMaxBlockSize
|
uint16_t
Proposed max block size to use in transfer.
|
mMetaData
|
Optional TLV Metadata.
|
mMetaDataAppState
|
void *
Optional app state for TLV Metadata.
|
mMetaDataWriteCallback
|
Optional function to write out TLV Metadata.
|
mReceiverDriveSupported
|
bool
True if we can support receiver drive.
|
mSenderDriveSupported
|
bool
True if we can support sender drive.
|
mStartOffset
|
uint64_t
Proposed start offset of data.
|
mStartOffsetPresent
|
bool
True if the start offset field is present.
|
mVersion
|
uint8_t
Version of the BDX protocol we decided on.
|
mWideRange
|
bool
True if offset and length are 64 bits.
|
Public functions |
|
---|---|
init(uint8_t aVersion, bool aSenderDrive, bool aReceiverDrive, bool aAsynchMode, uint16_t aMaxBlockSize, uint64_t aStartOffset, uint64_t aLength, ReferencedString & aFileDesignator, ReferencedTLVData *aMetaData)
|
Initialize a "wide" SendInit.
|
init(uint8_t aVersion, bool aSenderDrive, bool aReceiverDrive, bool aAsynchMode, uint16_t aMaxBlockSize, uint32_t aStartOffset, uint32_t aLength, ReferencedString & aFileDesignator, ReferencedTLVData *aMetaData)
|
Initialize a "non-wide" SendInit (32 bit start offset, 32 bit length)
|
init(uint8_t aVersion, bool aSenderDrive, bool aReceiverDrive, bool aAsynchMode, uint16_t aMaxBlockSize, uint64_t aStartOffset, uint64_t aLength, ReferencedString & aFileDesignator, MetaDataTLVWriteCallback aMetaDataWriteCallback, void *aMetaDataAppState)
|
Initialize a "wide" SendInit.
|
init(uint8_t aVersion, bool aSenderDrive, bool aReceiverDrive, bool aAsynchMode, uint16_t aMaxBlockSize, uint32_t aStartOffset, uint32_t aLength, ReferencedString & aFileDesignator, MetaDataTLVWriteCallback aMetaDataWriteCallback, void *aMetaDataAppState)
|
Initialize a "non-wide" SendInit (32 bit start offset, 32 bit length)
|
operator==(const SendInit &) const
|
bool
Equality comparison between SendInit messages.
|
pack(PacketBuffer *aBuffer)
|
Pack a send init message into an PacketBuffer.
|
packedLength(void)
|
uint16_t
Returns the packed length of this send init message.
|
Public static functions |
|
---|---|
parse(PacketBuffer *aBuffer, SendInit & aRequest)
|
Parse data from an PacketBuffer into a SendInit message format.
|
Public types
MetaDataTLVWriteCallback
WEAVE_ERROR(* MetaDataTLVWriteCallback)(uint8_t *aBuffer, uint16_t aBufferLength, uint16_t &aNumBytesWritten, void *aAppState)
MetaDataTLVWriteCallback provides a means by which a client can supply a SendInit with any metadata they want.
The client is free to supply pre-encoded TLV (faster), encode on-the-fly (uses less memory), lazy-encode (a littl faster on startup), etc. as they see fit.
In all cases, it is assumed that the data produced by the callback is constant for a given SendInit, i.e. does not change no matter when it is called. This is because the callback is also used to compute the length of any such written-out TLV, which could be requested at any time.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
Public attributes
mAsynchronousModeSupported
bool mAsynchronousModeSupported
True if we can support async mode.
mDefiniteLength
bool mDefiniteLength
True if the length field is present.
mLength
uint64_t mLength
Proposed length of data in transfer, 0 for indefinite.
mMaxBlockSize
uint16_t mMaxBlockSize
Proposed max block size to use in transfer.
mMetaDataWriteCallback
MetaDataTLVWriteCallback mMetaDataWriteCallback
Optional function to write out TLV Metadata.
mReceiverDriveSupported
bool mReceiverDriveSupported
True if we can support receiver drive.
mSenderDriveSupported
bool mSenderDriveSupported
True if we can support sender drive.
mStartOffset
uint64_t mStartOffset
Proposed start offset of data.
mStartOffsetPresent
bool mStartOffsetPresent
True if the start offset field is present.
mVersion
uint8_t mVersion
Version of the BDX protocol we decided on.
mWideRange
bool mWideRange
True if offset and length are 64 bits.
Public functions
SendInit
SendInit( void )
init
WEAVE_ERROR init( uint8_t aVersion, bool aSenderDrive, bool aReceiverDrive, bool aAsynchMode, uint16_t aMaxBlockSize, uint64_t aStartOffset, uint64_t aLength, ReferencedString & aFileDesignator, ReferencedTLVData *aMetaData )
Initialize a "wide" SendInit.
Details | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||||||||||
Returns |
WEAVE_NO_ERROR if successful
|
init
WEAVE_ERROR init( uint8_t aVersion, bool aSenderDrive, bool aReceiverDrive, bool aAsynchMode, uint16_t aMaxBlockSize, uint32_t aStartOffset, uint32_t aLength, ReferencedString & aFileDesignator, ReferencedTLVData *aMetaData )
Initialize a "non-wide" SendInit (32 bit start offset, 32 bit length)
Details | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||||||||||
Returns |
WEAVE_NO_ERROR if successful
|
init
WEAVE_ERROR init( uint8_t aVersion, bool aSenderDrive, bool aReceiverDrive, bool aAsynchMode, uint16_t aMaxBlockSize, uint64_t aStartOffset, uint64_t aLength, ReferencedString & aFileDesignator, MetaDataTLVWriteCallback aMetaDataWriteCallback, void *aMetaDataAppState )
Initialize a "wide" SendInit.
Details | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||||||||||||
Returns |
WEAVE_NO_ERROR if successful
|
init
WEAVE_ERROR init( uint8_t aVersion, bool aSenderDrive, bool aReceiverDrive, bool aAsynchMode, uint16_t aMaxBlockSize, uint32_t aStartOffset, uint32_t aLength, ReferencedString & aFileDesignator, MetaDataTLVWriteCallback aMetaDataWriteCallback, void *aMetaDataAppState )
Initialize a "non-wide" SendInit (32 bit start offset, 32 bit length)
Details | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||||||||||||
Returns |
WEAVE_NO_ERROR if successful
|
operator==
bool operator==( const SendInit & ) const
pack
WEAVE_ERROR pack( PacketBuffer *aBuffer )
Pack a send init message into an PacketBuffer.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
packedLength
uint16_t packedLength( void )
Returns the packed length of this send init message.
Details | |
---|---|
Returns |
length of the message when packed
|
Public static functions
parse
WEAVE_ERROR parse( PacketBuffer *aBuffer, SendInit & aRequest )
Parse data from an PacketBuffer into a SendInit message format.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|