sbgEComBinaryLogStatus.h
Go to the documentation of this file.
1 
20 #ifndef __SBG_ECOM_BINARY_LOG_STATUS_H__
21 #define __SBG_ECOM_BINARY_LOG_STATUS_H__
22 
23 #include <sbgCommon.h>
25 
26 //----------------------------------------------------------------------//
27 //- General status definitions -//
28 //----------------------------------------------------------------------//
29 #define SBG_ECOM_GENERAL_MAIN_POWER_OK (0x0001u << 0)
30 #define SBG_ECOM_GENERAL_IMU_POWER_OK (0x0001u << 1)
31 #define SBG_ECOM_GENERAL_GPS_POWER_OK (0x0001u << 2)
32 #define SBG_ECOM_GENERAL_SETTINGS_OK (0x0001u << 3)
33 #define SBG_ECOM_GENERAL_TEMPERATURE_OK (0x0001u << 4)
34 #define SBG_ECOM_GENERAL_DATALOGGER_OK (0x0001u << 5)
35 #define SBG_ECOM_GENERAL_CPU_OK (0x0001u << 6)
37 //----------------------------------------------------------------------//
38 //- Communication status definitions -//
39 //----------------------------------------------------------------------//
40 
44 #define SBG_ECOM_CAN_STATUS_SHIFT (28u)
45 #define SBG_ECOM_CAN_STATUS_MASK (0x00000007u)
50 #define SBG_ECOM_PORTA_VALID (0x00000001u << 0)
51 #define SBG_ECOM_PORTB_VALID (0x00000001u << 1)
52 #define SBG_ECOM_PORTC_VALID (0x00000001u << 2)
53 #define SBG_ECOM_PORTD_VALID (0x00000001u << 3)
54 #define SBG_ECOM_PORTE_VALID (0x00000001u << 4)
56 #define SBG_ECOM_PORTA_RX_OK (0x00000001u << 5)
57 #define SBG_ECOM_PORTA_TX_OK (0x00000001u << 6)
58 #define SBG_ECOM_PORTB_RX_OK (0x00000001u << 7)
59 #define SBG_ECOM_PORTB_TX_OK (0x00000001u << 8)
60 #define SBG_ECOM_PORTC_RX_OK (0x00000001u << 9)
61 #define SBG_ECOM_PORTC_TX_OK (0x00000001u << 10)
62 #define SBG_ECOM_PORTD_RX_OK (0x00000001u << 11)
63 #define SBG_ECOM_PORTD_TX_OK (0x00000001u << 12)
64 #define SBG_ECOM_PORTE_RX_OK (0x00000001u << 13)
65 #define SBG_ECOM_PORTE_TX_OK (0x00000001u << 14)
67 #define SBG_ECOM_ETH0_VALID (0x00000001u << 15)
68 #define SBG_ECOM_ETH1_VALID (0x00000001u << 16)
69 #define SBG_ECOM_ETH2_VALID (0x00000001u << 17)
70 #define SBG_ECOM_ETH3_VALID (0x00000001u << 18)
71 #define SBG_ECOM_ETH4_VALID (0x00000001u << 19)
73 #define SBG_ECOM_CAN_VALID (0x00000001u << 25)
74 #define SBG_ECOM_CAN_RX_OK (0x00000001u << 26)
75 #define SBG_ECOM_CAN_TX_OK (0x00000001u << 27)
80 typedef enum _SbgEComCanBusStatus
81 {
87 
88 //----------------------------------------------------------------------//
89 //- Aiding status definitions -//
90 //----------------------------------------------------------------------//
91 #define SBG_ECOM_AIDING_GPS1_POS_RECV (0x00000001u << 0)
92 #define SBG_ECOM_AIDING_GPS1_VEL_RECV (0x00000001u << 1)
93 #define SBG_ECOM_AIDING_GPS1_HDT_RECV (0x00000001u << 2)
94 #define SBG_ECOM_AIDING_GPS1_UTC_RECV (0x00000001u << 3)
95 #define SBG_ECOM_AIDING_GPS2_POS_RECV (0x00000001u << 4)
96 #define SBG_ECOM_AIDING_GPS2_VEL_RECV (0x00000001u << 5)
97 #define SBG_ECOM_AIDING_GPS2_HDT_RECV (0x00000001u << 6)
98 #define SBG_ECOM_AIDING_GPS2_UTC_RECV (0x00000001u << 7)
99 #define SBG_ECOM_AIDING_MAG_RECV (0x00000001u << 8)
100 #define SBG_ECOM_AIDING_ODO_RECV (0x00000001u << 9)
101 #define SBG_ECOM_AIDING_DVL_RECV (0x00000001u << 10)
102 #define SBG_ECOM_AIDING_USBL_RECV (0x00000001u << 11)
103 #define SBG_ECOM_AIDING_DEPTH_RECV (0x00000001u << 12)
104 #define SBG_ECOM_AIDING_AIR_DATA_RECV (0x00000001u << 13)
105 #define SBG_ECOM_AIDING_USER_POS_RECV (0x00000001u << 14)
106 #define SBG_ECOM_AIDING_USER_VEL_RECV (0x00000001u << 15)
107 #define SBG_ECOM_AIDING_USER_HEADING_RECV (0x00000001u << 16)
109 //----------------------------------------------------------------------//
110 //- Status definitions -//
111 //----------------------------------------------------------------------//
112 
116 typedef struct _SbgLogStatusData
117 {
118  uint32_t timeStamp;
119  uint16_t generalStatus;
120  uint16_t reserved1;
121  uint32_t comStatus;
122  uint32_t aidingStatus;
123  uint32_t reserved2;
124  uint16_t reserved3;
125  uint32_t uptime;
127 
128 //----------------------------------------------------------------------//
129 //- Communication status helpers methods -//
130 //----------------------------------------------------------------------//
131 
138 {
140 }
141 
149 {
150  //
151  // Create the combined status field
152  //
153  return ((((uint32_t)canStatus)&SBG_ECOM_CAN_STATUS_MASK) << SBG_ECOM_CAN_STATUS_SHIFT) | masks;
154 }
155 
156 //----------------------------------------------------------------------//
157 //- Operations -//
158 //----------------------------------------------------------------------//
159 
167 
175 
176 #endif
enum _SbgEComCanBusStatus SbgEComCanBusStatus
Used to read/write data from/to a memory buffer stream.
#define SBG_ECOM_CAN_STATUS_SHIFT
SBG_INLINE uint32_t sbgEComLogStatusBuildCommunicationStatus(SbgEComCanBusStatus canStatus, uint32_t masks)
#define SBG_INLINE
Definition: sbgDefines.h:186
Main header file for SBG Systems common C library.
SBG_INLINE SbgEComCanBusStatus sbgEComLogStatusGetCanStatus(uint32_t status)
struct _SbgLogStatusData SbgLogStatusData
SbgErrorCode sbgEComBinaryLogParseStatusData(SbgStreamBuffer *pInputStream, SbgLogStatusData *pOutputData)
SbgErrorCode sbgEComBinaryLogWriteStatusData(SbgStreamBuffer *pOutputStream, const SbgLogStatusData *pInputData)
enum _SbgErrorCode SbgErrorCode
#define SBG_ECOM_CAN_STATUS_MASK


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