sbgECom Library  4.0.1987-stable
C library to interface SBG Systems IMU/AHRS/INS
sbgEComCmdSettings.h File Reference

Import/export/save settings commands. More...

#include <sbgCommon.h>
#include <sbgECom.h>

Go to the source code of this file.

Typedefs

typedef enum _SbgEComSettingsAction SbgEComSettingsAction
 

Enumerations

enum  _SbgEComSettingsAction {
  SBG_ECOM_REBOOT_ONLY = 0 ,
  SBG_ECOM_SAVE_SETTINGS = 1 ,
  SBG_ECOM_RESTORE_DEFAULT_SETTINGS = 2
}
 

Functions

SbgErrorCode sbgEComCmdSettingsAction (SbgEComHandle *pHandle, SbgEComSettingsAction action)
 
SbgErrorCode sbgEComCmdImportSettings (SbgEComHandle *pHandle, const void *pBuffer, size_t size)
 
SbgErrorCode sbgEComCmdExportSettings (SbgEComHandle *pHandle, void *pBuffer, size_t *pSize, size_t maxSize)
 

Detailed Description

Import/export/save settings commands.

Author
SBG Systems
Date
11 June 2014
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.

Typedef Documentation

◆ SbgEComSettingsAction

Definition of all the settings actions available.

Enumeration Type Documentation

◆ _SbgEComSettingsAction

Definition of all the settings actions available.

Enumerator
SBG_ECOM_REBOOT_ONLY 

Only reboot the device.

SBG_ECOM_SAVE_SETTINGS 

Save the settings to non-volatile memory and then reboot the device.

SBG_ECOM_RESTORE_DEFAULT_SETTINGS 

Restore default settings, save them to non-volatile memory and reboot the device.

Function Documentation

◆ sbgEComCmdSettingsAction()

SbgErrorCode sbgEComCmdSettingsAction ( SbgEComHandle pHandle,
SbgEComSettingsAction  action 
)

Send a command to execute a specific system action to reboot/save/restore default settings.

Execute one of the available settings action:

  • SBG_ECOM_REBOOT_ONLY : Only reboot the device.
  • SBG_ECOM_SAVE_SETTINGS : Save the settings to non-volatile memory and then reboot the device.
  • SBG_ECOM_RESTORE_DEFAULT_SETTINGS : Restore default settings, save them to non-volatile memory and reboot the device.
Parameters
[in]pHandleA valid sbgECom handle.
[in]actionOne of the available SbgEComSettingsAction.
Returns
SBG_NO_ERROR if the command has been executed successfully.

◆ sbgEComCmdImportSettings()

SbgErrorCode sbgEComCmdImportSettings ( SbgEComHandle pHandle,
const void *  pBuffer,
size_t  size 
)

Send a complete set of settings to the device and store them into the FLASH memory.

The device will reboot automatically to use the new settings.

Parameters
[in]pHandleA valid sbgECom handle.
[in]pBufferRead only buffer containing the settings.
[in]sizeSize of the buffer.
Returns
SBG_NO_ERROR if the command has been executed successfully.

◆ sbgEComCmdExportSettings()

SbgErrorCode sbgEComCmdExportSettings ( SbgEComHandle pHandle,
void *  pBuffer,
size_t *  pSize,
size_t  maxSize 
)

Retrieve a complete set of settings from the device as a buffer.

Parameters
[in]pHandleA valid sbgECom handle.
[in]pBufferAllocated buffer that can hold the received settings.
[out]pSizeThe number of bytes that have been stored into pBuffer.
[in]maxSizeThe maximum buffer size in bytes that can be stored into pBuffer.
Returns
SBG_NO_ERROR if the command has been executed successfully.