nl::Weave::Profiles::BDX_Development::SendAccept

#include <src/lib/profiles/bulk-data-transfer/Development/BDXMessages.h>

The SendAccept message is used to accept a proposed exchange when the sender is the initiator.

Summary

Inheritance

Direct Known Subclasses: nl::Weave::Profiles::BDX_Development::ReceiveAccept

Constructors and Destructors

SendAccept(void)
The no-arg constructor with defaults for the send accept message.

Public attributes

mMaxBlockSize
uint16_t
Maximum block size we decided on.
mMetaData
Optional TLV Metadata.
mTransferMode
uint8_t
Transfer mode that we decided on.
mVersion
uint8_t
Version of the BDX protocol we decided on.

Public functions

init(uint8_t aVersion, uint8_t aTransferMode, uint16_t aMaxBlockSize, ReferencedTLVData *aMetaData)
Initialize a SendAccept message.
operator==(const SendAccept &) const
bool
Equality comparison between SendAccept messages.
pack(PacketBuffer *aBuffer)
Pack a send accept message into an PacketBuffer.
packedLength(void)
uint16_t
Returns the packed length of this send accept message.

Public static functions

parse(PacketBuffer *aBuffer, SendAccept & aResponse)
Parse data from an PacketBuffer into a SendAccept message format.

Public attributes

mMaxBlockSize

uint16_t mMaxBlockSize

Maximum block size we decided on.

mMetaData

ReferencedTLVData mMetaData

Optional TLV Metadata.

mTransferMode

uint8_t mTransferMode

Transfer mode that we decided on.

mVersion

uint8_t mVersion

Version of the BDX protocol we decided on.

Public functions

SendAccept

 SendAccept(
  void
)

The no-arg constructor with defaults for the send accept message.

init

WEAVE_ERROR init(
  uint8_t aVersion,
  uint8_t aTransferMode,
  uint16_t aMaxBlockSize,
  ReferencedTLVData *aMetaData
)

Initialize a SendAccept message.

Details
Parameters
[in] aVersion
Version of BDX that we are using
[in] aTransferMode
Transfer mode that this transfer should have (Must be one of kMode_SenderDrive, kMode_ReceiverDrive, kMode_Asynchronous)
[in] aMaxBlockSize
Maximum block size for this exchange
[in] aMetaData
(optional) Optional TLV metadata
Return Values
WEAVE_NO_ERROR
If successful
WEAVE_ERROR_BUFFER_TOO_SMALL
If buffer is too small

operator==

bool operator==(
  const SendAccept &
) const 

Equality comparison between SendAccept messages.

Details
Parameters
[in] another
Another SendAccept message to compare this one to
Returns
true iff they have all the same fields.

pack

WEAVE_ERROR pack(
  PacketBuffer *aBuffer
)

Pack a send accept message into an PacketBuffer.

Details
Parameters
[out] aBuffer
An PacketBuffer to pack the SendAccept message in
Return Values
WEAVE_NO_ERROR
If successful
WEAVE_ERROR_BUFFER_TOO_SMALL
If buffer is too small

packedLength

uint16_t packedLength(
  void
)

Returns the packed length of this send accept message.

Details
Returns
length of the message when packed

Public static functions

parse

WEAVE_ERROR parse(
  PacketBuffer *aBuffer,
  SendAccept & aResponse
)

Parse data from an PacketBuffer into a SendAccept message format.

Details
Parameters
[in] aBuffer
Pointer to an PacketBuffer which has the data we want to parse out
[out] aResponse
Pointer to a SendAccept object where we should store the results
Return Values
WEAVE_NO_ERROR
If successful
WEAVE_ERROR_BUFFER_TOO_SMALL
If buffer is too small