sbgEComBinaryLogDebug.c
Go to the documentation of this file.
2 
3 //----------------------------------------------------------------------//
4 //- Operations -//
5 //----------------------------------------------------------------------//
6 
14 {
15  uint32 i;
16 
17  //
18  // Check input arguments
19  //
20  SBG_ASSERT(pInputStream);
21  SBG_ASSERT(pOutputData);
22 
23  //
24  // Read the frame payload and return
25  //
26  pOutputData->timeStamp = sbgStreamBufferReadUint32LE(pInputStream);
27 
28  //
29  // Read each value in the array
30  //
31  for (i = 0; i < 64; i++)
32  {
33  pOutputData->data[i] = sbgStreamBufferReadUint32LE(pInputStream);
34  }
35 
36  //
37  // Return if any error has occurred while parsing the frame
38  //
39  return sbgStreamBufferGetLastError(pInputStream);
40 }
41 
49 {
50  uint32 i;
51 
52  //
53  // Check input arguments
54  //
55  SBG_ASSERT(pOutputStream);
56  SBG_ASSERT(pInputData);
57 
58  //
59  // Write the frame payload
60  //
61  sbgStreamBufferWriteUint32LE(pOutputStream, pInputData->timeStamp);
62 
63  //
64  // Write each value in the array
65  //
66  for (i = 0; i < 64; i++)
67  {
68  sbgStreamBufferWriteUint32LE(pOutputStream, pInputData->data[i]);
69  }
70 
71  //
72  // Return if any error has occurred while writing the frame
73  //
74  return sbgStreamBufferGetLastError(pOutputStream);
75 }
This file is used to parse received debug frames.
unsigned int uint32
Definition: sbgTypes.h:58
SbgErrorCode sbgEComBinaryLogParseDebug0Data(SbgStreamBuffer *pInputStream, SbgLogDebug0Data *pOutputData)
SbgErrorCode sbgEComBinaryLogWriteDebug0Data(SbgStreamBuffer *pOutputStream, const SbgLogDebug0Data *pInputData)
SBG_INLINE uint32 sbgStreamBufferReadUint32LE(SbgStreamBuffer *pHandle)
SBG_INLINE SbgErrorCode sbgStreamBufferWriteUint32LE(SbgStreamBuffer *pHandle, uint32 value)
#define SBG_ASSERT(expression)
Definition: sbgDebug.h:52
enum _SbgErrorCode SbgErrorCode
SBG_INLINE SbgErrorCode sbgStreamBufferGetLastError(SbgStreamBuffer *pHandle)


sbg_driver
Author(s):
autogenerated on Sun Jan 27 2019 03:42:20