sbgECom Library
5.3.2276-stable
Interface SBG Systems IMU/AHRS/INS
|
Page management. More...
#include <sbgCommon.h>
Go to the source code of this file.
Data Structures | |
struct | _SbgEComPager |
Typedefs | |
typedef struct _SbgEComPager | SbgEComPager |
Functions | |
SbgErrorCode | sbgEComPagerInitForJoin (SbgEComPager *pPager, void *pBuffer, size_t bufferSize) |
SbgErrorCode | sbgEComPagerJoin (SbgEComPager *pPager, uint16_t pageIndex, uint16_t nrPages, const void *pPage, size_t pageSize) |
bool | sbgEComPagerJoinIsComplete (const SbgEComPager *pPager) |
size_t | sbgEComPagerGetBufferSize (const SbgEComPager *pPager) |
Page management.
The MIT license
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
typedef struct _SbgEComPager SbgEComPager |
Pager.
Operations on a pager are not thread-safe.
SbgErrorCode sbgEComPagerInitForJoin | ( | SbgEComPager * | pPager, |
void * | pBuffer, | ||
size_t | bufferSize ) |
Initialize a pager for join operations, and link it to a buffer.
The pager will receive page one by one, and join them into a buffer.
[in] | pPager | Pager. |
[in] | pBuffer | Pointer on an allocated buffer to link with this pager. |
[in] | bufferSize | Buffer size, in bytes. |
SbgErrorCode sbgEComPagerJoin | ( | SbgEComPager * | pPager, |
uint16_t | pageIndex, | ||
uint16_t | nrPages, | ||
const void * | pPage, | ||
size_t | pageSize ) |
Join a page to the pager.
The pager's buffer is complete when all pages have been joined together.
[in] | pPager | Pager. |
[in] | pageIndex | Page index. |
[in] | nrPages | Total number of pages. |
[in] | pPage | Page buffer. |
[in] | pageSize | Page size, in bytes. |
bool sbgEComPagerJoinIsComplete | ( | const SbgEComPager * | pPager | ) |
Checks whether a multi-page message has been completely received.
[in] | pPager | Pager. |
size_t sbgEComPagerGetBufferSize | ( | const SbgEComPager * | pPager | ) |
Get the pager's buffer size, in bytes.
[in] | pPager | Pager. |