nl::Weave::Profiles::BDX_Development::BlockQueryV1

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

The BlockQueryV1 message is used to request that a block of data be transferred from sender to receiver.

Summary

It includes a 4 byte block counter.

Inheritance

Direct Known Subclasses:
  nl::Weave::Profiles::BDX_Development::BlockAckV1
  nl::Weave::Profiles::BDX_Development::BlockEOFAckV1

Constructors and Destructors

BlockQueryV1(void)
The no-arg constructor with defaults for the block query message.

Public types

@85 enum

Public attributes

mBlockCounter
uint32_t
Counter of the block that we are asking for.

Public functions

init(uint32_t aCounter)
Initialize a BlockQueryV1 message.
operator==(const BlockQueryV1 &) const
bool
Equality comparison between BlockQueryV1 messages.
pack(PacketBuffer *aBuffer)
Pack a block query message into an PacketBuffer.
packedLength(void)
uint16_t
Returns the packed length of this block query message.

Public static functions

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

Public types

@85

 @85

Public attributes

mBlockCounter

uint32_t mBlockCounter

Counter of the block that we are asking for.

Public functions

BlockQueryV1

 BlockQueryV1(
  void
)

The no-arg constructor with defaults for the block query message.

init

WEAVE_ERROR init(
  uint32_t aCounter
)

Initialize a BlockQueryV1 message.

Details
Parameters
[in] aCounter
Block counter value to query for
Returns
WEAVE_NO_ERROR if successful

operator==

bool operator==(
  const BlockQueryV1 &
) const 

Equality comparison between BlockQueryV1 messages.

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

pack

WEAVE_ERROR pack(
  PacketBuffer *aBuffer
)

Pack a block query message into an PacketBuffer.

Details
Parameters
[out] aBuffer
An PacketBuffer to pack the BlockQueryV1 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 block query message.

Details
Returns
length of the message when packed

Public static functions

parse

WEAVE_ERROR parse(
  PacketBuffer *aBuffer,
  BlockQueryV1 & aQuery
)

Parse data from an PacketBuffer into a BlockQueryV1 message format.

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