ScanList Class Reference

class ScanList

Container class for delivering scan results.

Constructor & Destructor Documentation

ScanList()

ScanList ( )

Constructor for an empty container with default parameters.

ScanList(u32_t, u32_t)

ScanList ( u32_t max_size,
u32_t granularity =  SCAN_LIST_DEFAULT_GRANULARITY
)

Constructor for an empty container.

Note:

After the initial allocation, memory is always allocated in multiples of the granularity parameter.

Parameters

u32_t max_size The maximum size of the container.
u32_t granularity =  SCAN_LIST_DEFAULT_GRANULARITY The granularity of the container.

ScanList(const ScanList &)

ScanList ( const ScanList & ) [private]

Prohibit copy constructor.

Parameters

const ScanList &

~ScanList()

~ScanList ( )

Destructor.

Member Functions Documentation

AddPadding(u32_t)

u32_t AddPadding ( u32_t data_length ) [static, inline]

The alignment of one beacon/probe response frame data must be four bytes. Returns the amount of needed padding for a particular frame length.

Parameters

u32_t data_length Length of the frame data in bytes.

Append(u32_t, const ScanFrame *)

u32_t Append ( u32_t data_length,
const ScanFrame * data
)

Appends one beacon/probe response frame to container.

Note:

If the current size of the container is not enough for the frame, the container will automatically allocate more memory.

Parameters

u32_t data_length Length of the frame data to be appended.
const ScanFrame * data Pointer to the frame data.

CheckData(const ScanFrame *)

bool_t CheckData ( const ScanFrame * data ) const [private]

Check that the given frame is valid, i.e. it has all mandatory IE fields included.

Note:

The data being checked has to be stored in the container.

Parameters

const ScanFrame * data Pointer to the frame data.

ClearAll()

void ClearAll ( ) [inline]

Clears the container.

Compress()

u32_t Compress ( ) [inline]

Compresses the container so it will be occupy the minimum amount of memory.

Copy(void *, const void *, u32_t)

u8_t * Copy ( void * target,
const void * source,
u32_t data_length
) [private]

Copy data from source buffer to target buffer.

Parameters

void * target
const void * source
u32_t data_length

Count()

u32_t Count ( ) const [inline]

Returns the number of access points the instance contains.

Data()

u8_t * Data ( ) const [inline]

Return a pointer to the currently allocated container.

MaxSize()

u32_t MaxSize ( ) const [inline]

Returns the maximum size of the container.

SetCurrentMaxSize(u32_t)

u32_t SetCurrentMaxSize ( u32_t max_size )

Sets the maximum size of currently allocated container to the given size.

Note:

If the current container is smaller than the given size, more memory is automatically allocated.

The maximum size is still limited by the size parameter given when the class was instantiated.

Making the container smaller than the current size (other than zero) is not supported at the moment.

Parameters

u32_t max_size Maximum size of the container in bytes.

Size()

u32_t Size ( ) const [inline]

Returns the current size of the container.

Update(u32_t, u32_t)

void Update ( u32_t count,
u32_t size
) [inline]

Updates the amount of frames and the current size of the container.

Note:

This method does not do any checking on the parameters and it is supposed to be used only when the container has been directly modified through Data() .

Parameters

u32_t count The amount of beacon/probe response frames stored in the container.
u32_t size The current size of the container (in bytes).

Member Data Documentation

u32_t count_m

u32_t count_m [private]

The amount of beacon/probe response frames stored in the container.

u32_t current_max_size_m

u32_t current_max_size_m [private]

The maximum size of the currently allocated container (in bytes).

u8_t * data_m

u8_t * data_m [private]

The container for storing beacon/probe response frames.

u32_t granularity_m

u32_t granularity_m [private]

The granularity of the container (in bytes).

u32_t max_size_m

u32_t max_size_m [private]

The maximum size of the container (in bytes). The container will never exceed this limit.

u32_t size_m

u32_t size_m [private]

The current size of the container (in bytes).