第一次提交,修改保存刷写上位机IP

This commit is contained in:
2025-09-07 19:16:08 +08:00
commit 8242f618d1
58 changed files with 10917 additions and 0 deletions

41
app/app_frm_monitor.h Normal file
View File

@@ -0,0 +1,41 @@
#ifndef APP_FRM_MONITOR_H
#define APP_FRM_MONITOR_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#define LOG_BUFFER_SIZE 1024 // 日志缓冲区的大小
#define LOG_SIGNAL_PRIORITY 1 // 日志信号的优先级
typedef struct
{
char buffer[LOG_BUFFER_SIZE];
uint32_t head; // 读指针
uint32_t tail; // 写指针
uint32_t count; // 缓冲区中的数据量
} LogBuffer;
// 全局日志缓冲区实例
extern LogBuffer log_buffer;
// 函数声明
void printSignalQueueStatus(void);
void printSubscriberInfo(void);
void printTimerStatus(void);
void monitorSignalSystem(void);
// 新增函数接口
int32_t logBufferWrite(LogBuffer *lb, const char *format, ...);
int32_t logBufferRead(LogBuffer *lb, char *data, uint32_t max_length);
void initLogBuffer(LogBuffer *lb);
void logSignalHandler(void *signal_id);
void appMonitorInit(void);
#ifdef __cplusplus
}
#endif
#endif // APP_FRM_MONITOR_H