sbgECom Library  5.3.2276-stable
Interface SBG Systems IMU/AHRS/INS
Loading...
Searching...
No Matches
sbgEComVibMonFftCtx.h File Reference

Vibration monitoring FFT context management. More...

Go to the source code of this file.

Data Structures

struct  _SbgEComVibMonFftCtx
 

Macros

#define SBG_ECOM_VIB_MON_FFT_CTX_BUFFER_SIZE   (8192)
 

Typedefs

typedef struct _SbgEComVibMonFftCtx SbgEComVibMonFftCtx
 

Functions

void sbgEComVibMonFftCtxConstruct (SbgEComVibMonFftCtx *pCtx)
 
SbgErrorCode sbgEComVibMonFftCtxProcess (SbgEComVibMonFftCtx *pCtx, uint16_t pageIndex, uint16_t nrPages, const void *pBuffer, size_t size)
 
SbgErrorCode sbgEComVibMonFftCtxGetStreamBuffer (const SbgEComVibMonFftCtx *pCtx, SbgStreamBuffer *pStreamBuffer)
 

Detailed Description

Vibration monitoring FFT context management.

Author
SBG Systems
Date
March 20, 2025
License

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.

Macro Definition Documentation

◆ SBG_ECOM_VIB_MON_FFT_CTX_BUFFER_SIZE

#define SBG_ECOM_VIB_MON_FFT_CTX_BUFFER_SIZE   (8192)

Vibration monitoring FFT buffer size, in bytes.

The buffer contains the FFT magnitudes for each bin, as 16-bits unsigned, and some additional data.

Typedef Documentation

◆ SbgEComVibMonFftCtx

Vibration monitoring FFT context.

This object is used to reconstruct the FFT data from received chunks as the FFT is not transmitted in a single frame.

Function Documentation

◆ sbgEComVibMonFftCtxConstruct()

void sbgEComVibMonFftCtxConstruct ( SbgEComVibMonFftCtx * pCtx)

Vibration monitoring FFT constructor.

Parameters
[in]pCtxVibration monitoring FFT context.

◆ sbgEComVibMonFftCtxProcess()

SbgErrorCode sbgEComVibMonFftCtxProcess ( SbgEComVibMonFftCtx * pCtx,
uint16_t pageIndex,
uint16_t nrPages,
const void * pBuffer,
size_t size )

Process the content of a vibration monitoring FFT log.

Parameters
[in]pCtxVibration monitoring FFT context.
[in]pageIndexPage index.
[in]nrPagesTotal number of pages.
[in]pBufferBuffer.
[in]sizeBuffer size, in bytes.
Returns
SBG_NO_ERROR if successful, i.e. the buffer has been reassembled, SBG_NOT_READY if the buffer is not complete.

◆ sbgEComVibMonFftCtxGetStreamBuffer()

SbgErrorCode sbgEComVibMonFftCtxGetStreamBuffer ( const SbgEComVibMonFftCtx * pCtx,
SbgStreamBuffer * pStreamBuffer )

Get the stream buffer from a vibration monitoring FFT context.

If available, the stream buffer remains valid until the next call to the processing function.

Parameters
[in]pCtxVibration monitoring FFT context.
[out]pStreamBufferStream buffer.
Returns
SBG_NO_ERROR if the data is parsed and valid. SBG_NOT_READY if the whole reassembled message is not yet fully received.