26 lines
852 B
C++
26 lines
852 B
C++
#ifndef _DEVICE_PRASER_H_
|
|
#define _DEVICE_PRASER_H_
|
|
|
|
#include <string>
|
|
#include <cstdio>
|
|
#include "headfile.h"
|
|
|
|
// 辅助函数:将数值转换为十六进制字符串
|
|
inline std::string to_hex_string(uint16_t value) {
|
|
char buffer[5];
|
|
snprintf(buffer, sizeof(buffer), "%04X", value);
|
|
return std::string(buffer);
|
|
}
|
|
|
|
SensorData parse_ppg(const uint8_t* data);
|
|
SensorData parse_eeg(const uint8_t* data);
|
|
SensorData parse_ecg_emg(const uint8_t* data);
|
|
SensorData parse_12lead_ecg(const uint8_t* data);
|
|
SensorData parse_stethoscope(const uint8_t* data);
|
|
SensorData parse_snore(const uint8_t* data);
|
|
SensorData parse_respiration(const uint8_t* data);
|
|
std::vector<SensorData> parse_device_data(const std::vector<uint8_t>& file_data);
|
|
SensorData parse_mit_bih(const uint8_t* data, size_t size, int num_channels, int samples_per_channel);
|
|
|
|
|
|
#endif |