class ScanList |
Container class for delivering scan results.
Public Member Functions | |
---|---|
ScanList () | |
ScanList ( u32_t , u32_t ) | |
~ScanList () | |
u32_t | AddPadding ( u32_t ) |
u32_t | Append ( u32_t , const ScanFrame *) |
void | ClearAll () |
u32_t | Compress () |
u32_t | Count () |
u8_t * | Data () |
u32_t | MaxSize () |
u32_t | SetCurrentMaxSize ( u32_t ) |
u32_t | Size () |
void | Update ( u32_t , u32_t ) |
Private Member Functions | |
---|---|
ScanList (const ScanList &) | |
bool_t | CheckData (const ScanFrame *) |
u8_t * | Copy (void *, const void *, u32_t ) |
Private Attributes | |
---|---|
u32_t | count_m |
u32_t | current_max_size_m |
u8_t * | data_m |
u32_t | granularity_m |
u32_t | max_size_m |
u32_t | size_m |
ScanList | ( | u32_t | max_size, |
u32_t | granularity = SCAN_LIST_DEFAULT_GRANULARITY | ||
) |
Constructor for an empty container.
After the initial allocation, memory is always allocated in multiples of the granularity parameter.
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 & | ) | [private] |
Prohibit copy constructor.
const ScanList & |
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.
u32_t data_length | Length of the frame data in bytes. |
u32_t | Append | ( | u32_t | data_length, |
const ScanFrame * | data | |||
) |
Appends one beacon/probe response frame to container.
If the current size of the container is not enough for the frame, the container will automatically allocate more memory.
bool_t | CheckData | ( | const ScanFrame * | data | ) | const [private] |
Check that the given frame is valid, i.e. it has all mandatory IE fields included.
The data being checked has to be stored in the container.
const ScanFrame * data | Pointer to the frame data. |
u32_t | Compress | ( | ) | [inline] |
Compresses the container so it will be occupy the minimum amount of memory.
u8_t * | Copy | ( | void * | target, |
const void * | source, | |||
u32_t | data_length | |||
) | [private] |
Copy data from source buffer to target buffer.
void * target | |
const void * source | |
u32_t data_length |
u32_t | SetCurrentMaxSize | ( | u32_t | max_size | ) |
Sets the maximum size of currently allocated container to the given size.
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.
u32_t max_size | Maximum size of the container in bytes. |
void | Update | ( | u32_t | count, |
u32_t | size | |||
) | [inline] |
Updates the amount of frames and the current size of the container.
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() .
u32_t | count_m | [private] |
The amount of beacon/probe response frames stored in the container.
u32_t | current_max_size_m | [private] |
The maximum size of the currently allocated container (in bytes).
u32_t | max_size_m | [private] |
The maximum size of the container (in bytes). The container will never exceed this limit.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.