Common Update: Better Doxygen Style

This commit is contained in:
bit-cyber-fh
2024-03-28 00:00:59 +08:00
parent 9b416114a1
commit bab91e13df
43 changed files with 1800 additions and 1195 deletions
+113 -101
View File
@@ -1,3 +1,8 @@
/**
* @defgroup SystemMonitor
* @{
*/
#ifndef __SYSTEM_MONITOR_H_
#define __SYSTEM_MONITOR_H_
@@ -6,7 +11,11 @@
#include <stdbool.h>
#include "util.h"
/************************** Constant Definitions *****************************/
/************************* Constant Definitions ******************************/
/**
* @name SystemMonitor_Constants
* @{
*/
#define PAYLOAD_LEN_MAX 256
#define PAYLOAD_LEN_FLJ_RX 168
#define PAYLOAD_LEN_FLJ_TX 66
@@ -67,137 +76,138 @@
#define TEMPERATURE_LSB 1.0 // Celsius degree
#define TEMPERATURE_MAX 127.0 // Celsius degree
#define TEMPERATURE_MIN -128.0 // Celsius degree
/** @} SystemMonitor_Constants */
/************************** Data Type Definitions ****************************/
/** @name System Info
/************************* Data Type Definitions ****************************/
/**
* @struct System_Info
*/
typedef struct __attribute__((packed))
{
// -- unit: ms, 0~604799999
uint32_t psBDS;
// -- unit: week, 0~0~8191
uint16_t pBDS;
// -- unit: ms, 0~604799999
uint32_t psGPS;
// -- unit: week, 0~0~8191
uint16_t pGPS;
// Time validation indicator
// -- [0] GPS
// -- [1] reserve.
// -- [2] UTC
// -- [3] BDS
uint8_t tmInd;
// Time of flying
// uint: s
float tmFly;
// Status of flying
// [7:6] departure status 11 - departed/00 - not departed
// [5:4] ready status 11 - ready/00 - not ready
// [3:2] attitude status 11 - attitude ok/00 - attitude not ok
// [1:0] attitude adjust status 11 - adjusted/00 - not adjusted
uint8_t stFly;
// Position in launch coordinate system
float posX;
float posY;
float posZ;
// Speed in launch coordinate system
float vX;
float vY;
float vZ;
// Attitude in launch inertia coordinate system
float pitch;
float yaw;
float roll;
uint32_t psBDS; ///< -- unit: ms, 0~604799999
uint16_t pBDS; ///< -- unit: week, 0~0~8191
uint32_t psGPS; ///< -- unit: ms, 0~604799999
uint16_t pGPS; ///< -- unit: week, 0~0~8191
uint8_t tmInd; ///< Time validation indicator \n
// -- [0] GPS\n
// -- [1] reserve.\n
// -- [2] UTC\n
// -- [3] BDS\n
float tmFly; ///< Time of flying uint: s
uint8_t stFly; ///< Status of flying \n
// [7:6] departure status 11 - departed/00 - not departed \n
// [5:4] ready status 11 - ready/00 - not ready \n
// [3:2] attitude status 11 - attitude ok/00 - attitude not ok \n
// [1:0] attitude adjust status 11 - adjusted/00 - not adjusted
float posX; ///< coord X Position in launch coordinate system
float posY; ///< coord Y Position in launch coordinate system
float posZ; ///< coord Z Position in launch coordinate system
float vX; ///< Speed X in launch coordinate system
float vY; ///< Speed Y in launch coordinate system
float vZ; ///< Speed Z in launch coordinate system
float pitch; ///< Pitch Attitude in launch inertia coordinate system
float yaw; ///< Yaw Attitude in launch inertia coordinate system
float roll; ///< Roll Attitude in launch inertia coordinate system
} SYSINFO;
/** @name System Bus Log
/**
* @struct System_Bus_Log
* @brief System Info holds the system bus log
*/
typedef struct __attribute__((packed))
{
// SystemBus log
// -- last valid config
// byte 0: 0x11 FLJ, 0x00 LJ
// byte 1: 0x66 Full Power, 0x88 Low Power
uint8_t lastConfig[2];
uint32_t pollCnt;
uint32_t svcCnt;
uint32_t remoteCnt;
uint8_t lastConfig[2]; ///< Last valid config \n
// byte 0: 0x11 FLJ, 0x00 LJ \n
// byte 1: 0x66 Full Power, 0x88 Low Power
uint32_t pollCnt; ///< number of poll commands
uint32_t svcCnt; ///< number of service commands
uint32_t remoteCnt; ///< number of remote check commands
} SYSBUSLOG;
/** @name Linklayer Log
/**
* @name Linklayer_Log
* @brief Linklayer Log struct holds the Linklayer log
*/
typedef struct __attribute__((packed))
{
// Network log
uint32_t tuNum;
uint8_t slotNum;
uint8_t nodeType;
uint8_t cxnStatus;
uint8_t linkStage;
uint32_t recxnCnt;
uint8_t beamNo;
uint8_t beamWidth;
uint16_t beamAz;
uint16_t beamEl;
uint16_t advTxCnt;
uint16_t advRecvCnt;
uint16_t advCorrectCnt;
uint32_t cfmTxCnt;
uint32_t cfmRecvCnt;
uint32_t cfmCorrectCnt;
uint32_t svcTxCnt;
uint32_t svcRecvCnt;
uint32_t svcCorrectCnt;
int32_t timeDev;
uint32_t sendId;
uint32_t recvId;
uint8_t reserve[4];
uint32_t tuNum; ///< current time unite number
uint8_t slotNum; ///< current slot number
uint8_t nodeType; ///< current node type
uint8_t cxnStatus; ///< current connection status
uint8_t linkStage; ///< current linklayer working stage
uint32_t recxnCnt; ///< reconnect trial count
uint8_t beamNo; ///< current working beam number
uint8_t beamWidth; ///< current working beam width
uint16_t beamAz; ///< current working beam angle Az
uint16_t beamEl; ///< current working beam angle Ez
uint16_t advTxCnt; ///< adv frame send count
uint16_t advRecvCnt; ///< adv frame received count
uint16_t advCorrectCnt; ///< adv frame received correctly count
uint32_t cfmTxCnt; ///< cfm frame send count
uint32_t cfmRecvCnt; ///< cfm frame received count
uint32_t cfmCorrectCnt; ///< adv frame received correctly count
uint32_t svcTxCnt; ///< svc frame send count
uint32_t svcRecvCnt; ///< svc frame received count
uint32_t svcCorrectCnt; ///< svc frame received correctly count
int32_t timeDev; ///< last time deviation result
uint32_t sendId; ///< last send data id
uint32_t recvId; ///< last received data id
uint8_t reserve[4]; ///< reserved data
} LINKLOG;
/** @name Physical layer Log
/**
* @struct Physical_Layer_Log
* @brief Physical Layer Log struct holds the Linklayer log
*/
typedef struct __attribute__((packed))
{
uint32_t acqCnt;
uint32_t fsyncCnt;
uint32_t decodeCnt;
uint32_t crcCnt;
double doppler;
uint64_t recvStamp;
double acqPAPR;
uint8_t acqPhase;
uint8_t acqFreqCh;
double fsyncPAPR;
uint8_t fsyncFreqCh;
uint16_t deintlvAmpEst;
uint8_t antMode;
uint8_t reserve[3];
uint32_t acqCnt; ///< aquisition count
uint32_t fsyncCnt; ///< frame sync count
uint32_t decodeCnt; ///< decode count
uint32_t crcCnt; ///< crc valid count
double doppler; ///< last doppler estimation result
uint64_t recvStamp; ///< last frame arrival time
double acqPAPR; ///< last acquisition peak-average ration
uint8_t acqPhase; ///< last acquisition phase estimation
uint8_t acqFreqCh; ///< last acquisition frequency deviation estimation
double fsyncPAPR; ///< last frame sync peak-average ration
uint8_t fsyncFreqCh; ///< last frame sync frequency estimation
uint16_t deintlvAmpEst; ///< de-interleave amplitude estimation
uint8_t antMode; ///< current antenna working mode
uint8_t reserve[3]; ///< reserved data
} PHYLOG;
/** @name Hardware Status Log
/**
* @struct Hardware_Status_Log
* @brief Hardware Status Log struct holds all hardware status
*/
typedef struct __attribute__((packed))
{
// Hardware status
bool isSpOk;
bool isAntOk;
bool isSpOk; ///< signal processor state
bool isAntOk; ///< antenna state
// -- Signal processor status
uint8_t spFpgaVolt;
uint8_t spClkState;
uint8_t spAdLockState;
uint8_t spAdTemp_0;
uint8_t spAdTemp_1;
uint8_t spFpgaTemp;
uint8_t spFpgaVolt; ///< Signal processor voltage state indicator
uint8_t spClkState; ///< Signal processor clock state indicator
uint8_t spAdLockState; ///< Signal processor adc lock state indicator
uint8_t spAdTemp_0; ///< Signal processor adc0 temperature
uint8_t spAdTemp_1; ///< Signal processor adc1 temperature
uint8_t spFpgaTemp; ///< Signal processor FPGA temperature
// -- Antenna status
uint8_t antVolt;
uint8_t antTemp;
uint8_t antPll;
uint8_t antMgc0;
uint8_t antMgc1;
uint8_t antVolt; ///< Antenna voltage state indicator
uint8_t antTemp; ///< Antenna rf temperature
uint8_t antPll; ///< Antenna rf lock state indicator
uint8_t antMgc0; ///< Antenna rf mgc0~1 indicator
uint8_t antMgc1; ///< Antenna rf mgc2~3 indicator
uint8_t reserve[2];
} HWSTATE;
/** @name Payload
/**
* @struct Payload
* @brief Payload struct holds the service payload
*/
typedef struct
{
@@ -225,3 +235,5 @@ void SysMonitor_GetPhysicalLayerLog(PHYLOG *log);
void SysMonitor_GetHardwareStatus(HWSTATE *state);
#endif //__SYSTEM_MONITOR_H_
/** @} */