This file is used to parse received UTC binary logs. More...
Go to the source code of this file.
Classes | |
struct | _SbgLogUtcData |
Macros | |
#define | SBG_ECOM_CLOCK_STABLE_INPUT (0x0001u << 0) |
#define | SBG_ECOM_CLOCK_STATUS_MASK (0x000Fu) |
#define | SBG_ECOM_CLOCK_STATUS_SHIFT (1u) |
#define | SBG_ECOM_CLOCK_UTC_STATUS_MASK (0x000Fu) |
#define | SBG_ECOM_CLOCK_UTC_STATUS_SHIFT (6u) |
#define | SBG_ECOM_CLOCK_UTC_SYNC (0x0001u << 5) |
Typedefs | |
typedef enum _SbgEComClockStatus | SbgEComClockStatus |
typedef enum _SbgEComClockUtcStatus | SbgEComClockUtcStatus |
typedef struct _SbgLogUtcData | SbgLogUtcData |
Enumerations | |
enum | _SbgEComClockStatus { SBG_ECOM_CLOCK_ERROR = 0, SBG_ECOM_CLOCK_FREE_RUNNING = 1, SBG_ECOM_CLOCK_STEERING = 2, SBG_ECOM_CLOCK_VALID = 3 } |
enum | _SbgEComClockUtcStatus { SBG_ECOM_UTC_INVALID = 0, SBG_ECOM_UTC_NO_LEAP_SEC = 1, SBG_ECOM_UTC_VALID = 2 } |
Functions | |
SbgErrorCode | sbgEComBinaryLogParseUtcData (SbgStreamBuffer *pInputStream, SbgLogUtcData *pOutputData) |
SbgErrorCode | sbgEComBinaryLogWriteUtcData (SbgStreamBuffer *pOutputStream, const SbgLogUtcData *pInputData) |
SBG_INLINE uint16 | sbgEComLogUtcBuildClockStatus (SbgEComClockStatus clockStatus, SbgEComClockUtcStatus utcStatus, uint16 masks) |
SBG_INLINE SbgEComClockStatus | sbgEComLogUtcGetClockStatus (uint16 status) |
SBG_INLINE SbgEComClockUtcStatus | sbgEComLogUtcGetClockUtcStatus (uint16 status) |
This file is used to parse received UTC binary logs.
Copyright (C) 2007-2013, SBG Systems SAS. All rights reserved.
This source code is intended for use only by SBG Systems SAS and those that have explicit written permission to use it from SBG Systems SAS.
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
Definition in file sbgEComBinaryLogUtc.h.
#define SBG_ECOM_CLOCK_STABLE_INPUT (0x0001u << 0) |
Clock status mask definitions.Set to 1 if a stable input clock could be used to synchronized the internal clock.
Definition at line 41 of file sbgEComBinaryLogUtc.h.
#define SBG_ECOM_CLOCK_STATUS_MASK (0x000Fu) |
Mask used to keep only the clock status part.
Definition at line 34 of file sbgEComBinaryLogUtc.h.
#define SBG_ECOM_CLOCK_STATUS_SHIFT (1u) |
Clock status and UTC time status definitions.Shift used to extract the clock status part.
Definition at line 33 of file sbgEComBinaryLogUtc.h.
#define SBG_ECOM_CLOCK_UTC_STATUS_MASK (0x000Fu) |
Mask used to keep only the clock UTC status part.
Definition at line 36 of file sbgEComBinaryLogUtc.h.
#define SBG_ECOM_CLOCK_UTC_STATUS_SHIFT (6u) |
Shift used to extract the clock UTC status part.
Definition at line 35 of file sbgEComBinaryLogUtc.h.
#define SBG_ECOM_CLOCK_UTC_SYNC (0x0001u << 5) |
The UTC time is synchronized with a PPS.
Definition at line 42 of file sbgEComBinaryLogUtc.h.
typedef enum _SbgEComClockStatus SbgEComClockStatus |
Clock status enum.
typedef enum _SbgEComClockUtcStatus SbgEComClockUtcStatus |
Status for the UTC time data.
typedef struct _SbgLogUtcData SbgLogUtcData |
Structure that stores data for the SBG_ECOM_LOG_UTC_TIME message.
enum _SbgEComClockStatus |
Clock status enum.
Definition at line 47 of file sbgEComBinaryLogUtc.h.
Status for the UTC time data.
Definition at line 58 of file sbgEComBinaryLogUtc.h.
SbgErrorCode sbgEComBinaryLogParseUtcData | ( | SbgStreamBuffer * | pInputStream, |
SbgLogUtcData * | pOutputData | ||
) |
Parse data for the SBG_ECOM_LOG_UTC_DATA message and fill the corresponding structure.
[in] | pInputStream | Input stream buffer to read the payload from. |
[out] | pOutputData | Pointer on the output structure that stores parsed data. |
Definition at line 13 of file sbgEComBinaryLogUtc.c.
SbgErrorCode sbgEComBinaryLogWriteUtcData | ( | SbgStreamBuffer * | pOutputStream, |
const SbgLogUtcData * | pInputData | ||
) |
Write data for the SBG_ECOM_LOG_UTC_DATA message to the output stream buffer from the provided structure.
[out] | pOutputStream | Output stream buffer to write the payload to. |
[in] | pInputData | Pointer on the input structure that stores data to write. |
Definition at line 47 of file sbgEComBinaryLogUtc.c.
SBG_INLINE uint16 sbgEComLogUtcBuildClockStatus | ( | SbgEComClockStatus | clockStatus, |
SbgEComClockUtcStatus | utcStatus, | ||
uint16 | masks | ||
) |
Method used to write the clock status field.
[in] | clockStatus | The clock status to set. |
[in] | utcStatus | The UTC time status to set. |
[in] | masks | Bit mask to set. |
Definition at line 96 of file sbgEComBinaryLogUtc.h.
SBG_INLINE SbgEComClockStatus sbgEComLogUtcGetClockStatus | ( | uint16 | status | ) |
Method used to read the clock status from a status field.
[in] | status | Status field to extract the clock status from it. |
Definition at line 74 of file sbgEComBinaryLogUtc.h.
SBG_INLINE SbgEComClockUtcStatus sbgEComLogUtcGetClockUtcStatus | ( | uint16 | status | ) |
Method used to read the UTC time status from a clock status field.
[in] | status | Status field to extract the UTC time status from it. |
Definition at line 84 of file sbgEComBinaryLogUtc.h.