Classes | Macros | Typedefs | Enumerations | Functions
sbgEComBinaryLogUtc.h File Reference

This file is used to parse received UTC binary logs. More...

#include <sbgCommon.h>
#include <streamBuffer/sbgStreamBuffer.h>
Include dependency graph for sbgEComBinaryLogUtc.h:
This graph shows which files directly or indirectly include this file:

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)
 

Detailed Description

This file is used to parse received UTC binary logs.

Author
SBG Systems (Raphael Siryani)
Date
20 February 2013

Copyright Notice

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.

Macro Definition Documentation

#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 Documentation

Clock status enum.

Status for the UTC time data.

typedef struct _SbgLogUtcData SbgLogUtcData

Structure that stores data for the SBG_ECOM_LOG_UTC_TIME message.

Enumeration Type Documentation

Clock status enum.

Enumerator
SBG_ECOM_CLOCK_ERROR 

An error has occurred on the clock estimation.

SBG_ECOM_CLOCK_FREE_RUNNING 

The clock is only based on the internal crystal.

SBG_ECOM_CLOCK_STEERING 

A PPS has been detected and the clock is converging to it.

SBG_ECOM_CLOCK_VALID 

The clock has converged to the PPS and is within 500ns.

Definition at line 47 of file sbgEComBinaryLogUtc.h.

Status for the UTC time data.

Enumerator
SBG_ECOM_UTC_INVALID 

The UTC time is not known, we are just propagating the UTC time internally.

SBG_ECOM_UTC_NO_LEAP_SEC 

We have received valid UTC time information but we don't have the leap seconds information.

SBG_ECOM_UTC_VALID 

We have received valid UTC time data with valid leap seconds.

Definition at line 58 of file sbgEComBinaryLogUtc.h.

Function Documentation

SbgErrorCode sbgEComBinaryLogParseUtcData ( SbgStreamBuffer pInputStream,
SbgLogUtcData pOutputData 
)

Parse data for the SBG_ECOM_LOG_UTC_DATA message and fill the corresponding structure.

Parameters
[in]pInputStreamInput stream buffer to read the payload from.
[out]pOutputDataPointer on the output structure that stores parsed data.
Returns
SBG_NO_ERROR if the payload has been parsed.

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.

Parameters
[out]pOutputStreamOutput stream buffer to write the payload to.
[in]pInputDataPointer on the input structure that stores data to write.
Returns
SBG_NO_ERROR if the message has been generated in the provided buffer.

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.

Parameters
[in]clockStatusThe clock status to set.
[in]utcStatusThe UTC time status to set.
[in]masksBit mask to set.
Returns
The build clock status field.

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.

Parameters
[in]statusStatus field to extract the clock status from it.
Returns
The extracted clock status.

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.

Parameters
[in]statusStatus field to extract the UTC time status from it.
Returns
The extracted UTC time status.

Definition at line 84 of file sbgEComBinaryLogUtc.h.



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