sbgEComCmdLicense.c
Go to the documentation of this file.
1 #include "sbgEComCmdLicense.h"
3 
4 //----------------------------------------------------------------------//
5 //- License commands -//
6 //----------------------------------------------------------------------//
7 
16 SbgErrorCode sbgEComCmdLicenseApply(SbgEComHandle *pHandle, const void *pBuffer, size_t size)
17 {
18  SbgErrorCode errorCode;
19  uint32_t currentTimeOut;
20 
21  assert(pHandle);
22  assert(pBuffer);
23  assert(size > 0);
24 
25  //
26  // Define a time out of 10s to let enough time for the GNSS receiver to apply the license
27  //
28  currentTimeOut = pHandle->cmdDefaultTimeOut;
29  pHandle->cmdDefaultTimeOut = 10000;
30 
31  //
32  // Call function that handle data transfer
33  //
34  errorCode = sbgEComTransferSend(pHandle, SBG_ECOM_CLASS_LOG_CMD_0, SBG_ECOM_CMD_LICENSE_APPLY, pBuffer, size);
35 
36  //
37  // Restore the default time out
38  //
39  pHandle->cmdDefaultTimeOut = currentTimeOut;
40 
41  return errorCode;
42 }
SbgErrorCode sbgEComCmdLicenseApply(SbgEComHandle *pHandle, const void *pBuffer, size_t size)
Handle large send/receive transfer for specific ECom Protocol commands.
SbgErrorCode sbgEComTransferSend(SbgEComHandle *pHandle, uint8_t msgClass, uint8_t msg, const void *pBuffer, size_t size)
uint32_t cmdDefaultTimeOut
Definition: sbgECom.h:78
This file implements SbgECom commands related to licenses.
enum _SbgErrorCode SbgErrorCode


sbg_driver
Author(s): SBG Systems
autogenerated on Sat Sep 3 2022 02:53:36