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

This file is used to parse received device status binary logs. More...

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

Go to the source code of this file.

Classes

struct  _SbgLogStatusData
 

Macros

#define SBG_ECOM_AIDING_DVL_RECV   (0x00000001u << 10)
 
#define SBG_ECOM_AIDING_EM_LOG_RECV   (0x00000001u << 12)
 
#define SBG_ECOM_AIDING_GPS1_HDT_RECV   (0x00000001u << 2)
 
#define SBG_ECOM_AIDING_GPS1_POS_RECV   (0x00000001u << 0)
 
#define SBG_ECOM_AIDING_GPS1_UTC_RECV   (0x00000001u << 3)
 
#define SBG_ECOM_AIDING_GPS1_VEL_RECV   (0x00000001u << 1)
 
#define SBG_ECOM_AIDING_GPS2_HDT_RECV   (0x00000001u << 6)
 
#define SBG_ECOM_AIDING_GPS2_POS_RECV   (0x00000001u << 4)
 
#define SBG_ECOM_AIDING_GPS2_UTC_RECV   (0x00000001u << 7)
 
#define SBG_ECOM_AIDING_GPS2_VEL_RECV   (0x00000001u << 5)
 
#define SBG_ECOM_AIDING_MAG_RECV   (0x00000001u << 8)
 
#define SBG_ECOM_AIDING_ODO_RECV   (0x00000001u << 9)
 
#define SBG_ECOM_AIDING_PRESSURE_RECV   (0x00000001u << 13)
 
#define SBG_ECOM_AIDING_USBL_RECV   (0x00000001u << 11)
 
#define SBG_ECOM_AIDING_USER_HEADING_RECV   (0x00000001u << 16)
 
#define SBG_ECOM_AIDING_USER_POS_RECV   (0x00000001u << 14)
 
#define SBG_ECOM_AIDING_USER_VEL_RECV   (0x00000001u << 15)
 
#define SBG_ECOM_CAN_RX_OK   (0x00000001u << 26)
 
#define SBG_ECOM_CAN_STATUS_MASK   (0x00000007u)
 
#define SBG_ECOM_CAN_STATUS_SHIFT   (28u)
 
#define SBG_ECOM_CAN_TX_OK   (0x00000001u << 27)
 
#define SBG_ECOM_CAN_VALID   (0x00000001u << 25)
 
#define SBG_ECOM_ETH0_VALID   (0x00000001u << 15)
 
#define SBG_ECOM_ETH1_VALID   (0x00000001u << 16)
 
#define SBG_ECOM_ETH2_VALID   (0x00000001u << 17)
 
#define SBG_ECOM_ETH3_VALID   (0x00000001u << 18)
 
#define SBG_ECOM_ETH4_VALID   (0x00000001u << 19)
 
#define SBG_ECOM_GENERAL_CPU_OK   (0x0001u << 6)
 
#define SBG_ECOM_GENERAL_DATALOGGER_OK   (0x0001u << 5)
 
#define SBG_ECOM_GENERAL_GPS_POWER_OK   (0x0001u << 2)
 
#define SBG_ECOM_GENERAL_IMU_POWER_OK   (0x0001u << 1)
 
#define SBG_ECOM_GENERAL_MAIN_POWER_OK   (0x0001u << 0)
 
#define SBG_ECOM_GENERAL_SETTINGS_OK   (0x0001u << 3)
 
#define SBG_ECOM_GENERAL_TEMPERATURE_OK   (0x0001u << 4)
 
#define SBG_ECOM_PORTA_RX_OK   (0x00000001u << 5)
 
#define SBG_ECOM_PORTA_TX_OK   (0x00000001u << 6)
 
#define SBG_ECOM_PORTA_VALID   (0x00000001u << 0)
 
#define SBG_ECOM_PORTB_RX_OK   (0x00000001u << 7)
 
#define SBG_ECOM_PORTB_TX_OK   (0x00000001u << 8)
 
#define SBG_ECOM_PORTB_VALID   (0x00000001u << 1)
 
#define SBG_ECOM_PORTC_RX_OK   (0x00000001u << 9)
 
#define SBG_ECOM_PORTC_TX_OK   (0x00000001u << 10)
 
#define SBG_ECOM_PORTC_VALID   (0x00000001u << 2)
 
#define SBG_ECOM_PORTD_RX_OK   (0x00000001u << 11)
 
#define SBG_ECOM_PORTD_TX_OK   (0x00000001u << 12)
 
#define SBG_ECOM_PORTD_VALID   (0x00000001u << 3)
 
#define SBG_ECOM_PORTE_RX_OK   (0x00000001u << 13)
 
#define SBG_ECOM_PORTE_TX_OK   (0x00000001u << 14)
 
#define SBG_ECOM_PORTE_VALID   (0x00000001u << 4)
 

Typedefs

typedef enum _SbgEComCanBusStatus SbgEComCanBusStatus
 
typedef struct _SbgLogStatusData SbgLogStatusData
 

Enumerations

enum  _SbgEComCanBusStatus { SBG_ECOM_CAN_BUS_OFF = 0, SBG_ECOM_CAN_BUS_TX_RX_ERR = 1, SBG_ECOM_CAN_BUS_OK = 2, SBG_ECOM_CAN_BUS_ERROR = 3 }
 

Functions

SbgErrorCode sbgEComBinaryLogParseStatusData (SbgStreamBuffer *pInputStream, SbgLogStatusData *pOutputData)
 
SbgErrorCode sbgEComBinaryLogWriteStatusData (SbgStreamBuffer *pOutputStream, const SbgLogStatusData *pInputData)
 
SBG_INLINE uint32 sbgEComLogStatusBuildCommunicationStatus (SbgEComCanBusStatus canStatus, uint32 masks)
 
SBG_INLINE SbgEComCanBusStatus sbgEComLogStatusGetCanStatus (uint32 status)
 

Detailed Description

This file is used to parse received device status binary logs.

Author
SBG Systems (Raphael Siryani)
Date
03 April 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 sbgEComBinaryLogStatus.h.

Macro Definition Documentation

#define SBG_ECOM_AIDING_DVL_RECV   (0x00000001u << 10)

Set to 1 when valid DVL data is received.

Definition at line 101 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_AIDING_EM_LOG_RECV   (0x00000001u << 12)

Set to 1 when valid EM Log data is received.

Definition at line 103 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_AIDING_GPS1_HDT_RECV   (0x00000001u << 2)

Set to 1 when valid GPS 1 true heading data is received.

Definition at line 93 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_AIDING_GPS1_POS_RECV   (0x00000001u << 0)

Set to 1 when valid GPS 1 position data is received.

Definition at line 91 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_AIDING_GPS1_UTC_RECV   (0x00000001u << 3)

Set to 1 when valid GPS 1 UTC time data is received.

Definition at line 94 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_AIDING_GPS1_VEL_RECV   (0x00000001u << 1)

Set to 1 when valid GPS 1 velocity data is received.

Definition at line 92 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_AIDING_GPS2_HDT_RECV   (0x00000001u << 6)

Set to 1 when valid GPS 2 true heading data is received.

Definition at line 97 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_AIDING_GPS2_POS_RECV   (0x00000001u << 4)

Set to 1 when valid GPS 2 position data is received.

Definition at line 95 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_AIDING_GPS2_UTC_RECV   (0x00000001u << 7)

Set to 1 when valid GPS 2 UTC time data is received.

Definition at line 98 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_AIDING_GPS2_VEL_RECV   (0x00000001u << 5)

Set to 1 when valid GPS 2 velocity data is received.

Definition at line 96 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_AIDING_MAG_RECV   (0x00000001u << 8)

Set to 1 when valid Magnetometer data is received.

Definition at line 99 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_AIDING_ODO_RECV   (0x00000001u << 9)

Set to 1 when Odometer pulse is received.

Definition at line 100 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_AIDING_PRESSURE_RECV   (0x00000001u << 13)

Set to 1 when valid Pressure sensor data is received.

Definition at line 104 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_AIDING_USBL_RECV   (0x00000001u << 11)

Set to 1 when valid USBL data is received.

Definition at line 102 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_AIDING_USER_HEADING_RECV   (0x00000001u << 16)

Set to 1 when valid user heading data is received.

Definition at line 107 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_AIDING_USER_POS_RECV   (0x00000001u << 14)

Set to 1 when valid user position data is received.

Definition at line 105 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_AIDING_USER_VEL_RECV   (0x00000001u << 15)

Set to 1 when valid user velocity data is received.

Definition at line 106 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_CAN_RX_OK   (0x00000001u << 26)

Set to 0 in case of error on CAN Bus output buffer.

Definition at line 74 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_CAN_STATUS_MASK   (0x00000007u)

Mask used to keep only the CAN status part.

Definition at line 45 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_CAN_STATUS_SHIFT   (28u)

Communication CAN status definitions.Shift used to access the CAN status part.

Definition at line 44 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_CAN_TX_OK   (0x00000001u << 27)

Set to 0 in case of error on CAN Bus input buffer.

Definition at line 75 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_CAN_VALID   (0x00000001u << 25)

Set to 0 in case of low level communication error.

Definition at line 73 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_ETH0_VALID   (0x00000001u << 15)

Set to 0 in case of error on ETH0.

Definition at line 67 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_ETH1_VALID   (0x00000001u << 16)

Set to 0 in case of error on ETH1.

Definition at line 68 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_ETH2_VALID   (0x00000001u << 17)

Set to 0 in case of error on ETH2.

Definition at line 69 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_ETH3_VALID   (0x00000001u << 18)

Set to 0 in case of error on ETH3.

Definition at line 70 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_ETH4_VALID   (0x00000001u << 19)

Set to 0 in case of error on ETH4.

Definition at line 71 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_GENERAL_CPU_OK   (0x0001u << 6)

Set to 1 if the CPU headroom is correct.

Definition at line 35 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_GENERAL_DATALOGGER_OK   (0x0001u << 5)

Set to 1 when the datalogger is working correctly.

Definition at line 34 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_GENERAL_GPS_POWER_OK   (0x0001u << 2)

Set to 1 when GPS power supply is OK.

Definition at line 31 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_GENERAL_IMU_POWER_OK   (0x0001u << 1)

Set to 1 when IMU power supply is OK.

Definition at line 30 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_GENERAL_MAIN_POWER_OK   (0x0001u << 0)

Set to 1 when main power supply is OK.

Definition at line 29 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_GENERAL_SETTINGS_OK   (0x0001u << 3)

Set to 1 if settings where correctly loaded.

Definition at line 32 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_GENERAL_TEMPERATURE_OK   (0x0001u << 4)

Set to 1 when temperature is within specified limits.

Definition at line 33 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_PORTA_RX_OK   (0x00000001u << 5)

Set to 0 in case of error on PORT A input.

Definition at line 56 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_PORTA_TX_OK   (0x00000001u << 6)

Set to 0 in case of error on PORT A output.

Definition at line 57 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_PORTA_VALID   (0x00000001u << 0)

Communication status bit mask definitions.Set to 0 in case of low level communication error.

Definition at line 50 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_PORTB_RX_OK   (0x00000001u << 7)

Set to 0 in case of error on PORT B input.

Definition at line 58 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_PORTB_TX_OK   (0x00000001u << 8)

Set to 0 in case of error on PORT B output.

Definition at line 59 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_PORTB_VALID   (0x00000001u << 1)

Set to 0 in case of low level communication error.

Definition at line 51 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_PORTC_RX_OK   (0x00000001u << 9)

Set to 0 in case of error on PORT C input.

Definition at line 60 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_PORTC_TX_OK   (0x00000001u << 10)

Set to 0 in case of error on PORT C output.

Definition at line 61 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_PORTC_VALID   (0x00000001u << 2)

Set to 0 in case of low level communication error.

Definition at line 52 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_PORTD_RX_OK   (0x00000001u << 11)

Set to 0 in case of error on PORT D input.

Definition at line 62 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_PORTD_TX_OK   (0x00000001u << 12)

Set to 0 in case of error on PORT D input.

Definition at line 63 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_PORTD_VALID   (0x00000001u << 3)

Set to 0 in case of low level communication error.

Definition at line 53 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_PORTE_RX_OK   (0x00000001u << 13)

Set to 0 in case of error on PORT E input.

Definition at line 64 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_PORTE_TX_OK   (0x00000001u << 14)

Set to 0 in case of error on PORT D input.

Definition at line 65 of file sbgEComBinaryLogStatus.h.

#define SBG_ECOM_PORTE_VALID   (0x00000001u << 4)

Set to 0 in case of low level communication error.

Definition at line 54 of file sbgEComBinaryLogStatus.h.

Typedef Documentation

Communication status for the CAN Bus.

Stores global status data.

Enumeration Type Documentation

Communication status for the CAN Bus.

Enumerator
SBG_ECOM_CAN_BUS_OFF 

Bus OFF operation due to too much errors.

SBG_ECOM_CAN_BUS_TX_RX_ERR 

Errors on Tx or Rx.

SBG_ECOM_CAN_BUS_OK 

Bus OK.

SBG_ECOM_CAN_BUS_ERROR 

Bus error.

Definition at line 80 of file sbgEComBinaryLogStatus.h.

Function Documentation

SbgErrorCode sbgEComBinaryLogParseStatusData ( SbgStreamBuffer pInputStream,
SbgLogStatusData pOutputData 
)

Parse data for the SBG_ECOM_LOG_STATUS 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 sbgEComBinaryLogStatus.c.

SbgErrorCode sbgEComBinaryLogWriteStatusData ( SbgStreamBuffer pOutputStream,
const SbgLogStatusData pInputData 
)

Write data for the SBG_ECOM_LOG_STATUS 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 62 of file sbgEComBinaryLogStatus.c.

SBG_INLINE uint32 sbgEComLogStatusBuildCommunicationStatus ( SbgEComCanBusStatus  canStatus,
uint32  masks 
)

Method used to write the CAN bus status field.

Parameters
[in]canStatusThe CAN bus status to set.
[in]masksBit mask to set.
Returns
The build communication status field.

Definition at line 148 of file sbgEComBinaryLogStatus.h.

SBG_INLINE SbgEComCanBusStatus sbgEComLogStatusGetCanStatus ( uint32  status)

Method used to read the CAN bus status from a communication status field.

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

Definition at line 137 of file sbgEComBinaryLogStatus.h.



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