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

Session information management. More...

#include <sbgCommon.h>

Go to the source code of this file.

Data Structures

struct  _SbgEComSessionInfoCtx
 

Macros

#define SBG_ECOM_SESSION_INFO_BUFFER_SIZE   (32768)
 

Typedefs

typedef struct _SbgEComSessionInfoCtx SbgEComSessionInfoCtx
 

Functions

void sbgEComSessionInfoCtxConstruct (SbgEComSessionInfoCtx *pCtx)
 
SbgErrorCode sbgEComSessionInfoCtxProcess (SbgEComSessionInfoCtx *pCtx, uint16_t pageIndex, uint16_t nrPages, const void *pBuffer, size_t size)
 
const char * sbgEComSessionInfoCtxGetString (const SbgEComSessionInfoCtx *pCtx)
 

Detailed Description

Session information management.

Author
SBG Systems
Date
December 20, 2023

Session information, including device information and current settings, may be sent regularly by a device. This module handles the reassembly of that information for the convenience of the user.

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_SESSION_INFO_BUFFER_SIZE

#define SBG_ECOM_SESSION_INFO_BUFFER_SIZE   (32768)

Session information buffer size, in bytes.

Typedef Documentation

◆ SbgEComSessionInfoCtx

Session information context.

String lengths do not include the null-terminating byte.

Function Documentation

◆ sbgEComSessionInfoCtxConstruct()

void sbgEComSessionInfoCtxConstruct ( SbgEComSessionInfoCtx * pCtx)

Session information context constructor.

On return, the session information string of the context is empty.

Parameters
[in]pCtxSession information context.

◆ sbgEComSessionInfoCtxProcess()

SbgErrorCode sbgEComSessionInfoCtxProcess ( SbgEComSessionInfoCtx * pCtx,
uint16_t pageIndex,
uint16_t nrPages,
const void * pBuffer,
size_t size )

Process the content of a session information log.

If successful, the session information string remains valid until the next process operation.

Parameters
[in]pCtxSession information 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 session information string has been reassembled, SBG_NOT_READY if the session information string is not complete.

◆ sbgEComSessionInfoCtxGetString()

const char * sbgEComSessionInfoCtxGetString ( const SbgEComSessionInfoCtx * pCtx)

Get the string of a session information context.

If valid, the session information string remains so until the next process operation.

Parameters
[in]pCtxSession information context.
Returns
Session information string, NULL if not complete.