forked from sfeakes/AqualinkD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
packetLogger.h
22 lines (17 loc) · 841 Bytes
/
packetLogger.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef PACKETLOGGER_H_
#define PACKETLOGGER_H_
#include <stdbool.h>
#include <stdint.h>
#define RS485LOGFILE "/tmp/RS485.log"
#define RS485BYTELOGFILE "/tmp/RS485raw.log"
void startPacketLogger(bool debug_RSProtocol_packets, bool read_pentair_packets);
void stopPacketLogger();
//void logPacket(unsigned char *packet_buffer, int packet_length, bool checksumerror);
void logPacket(unsigned char *packet_buffer, int packet_length);
void logPacketError(unsigned char *packet_buffer, int packet_length);
void logPacketByte(unsigned char *byte);
// Only use for manual debugging
//void debuglogPacket(unsigned char *packet_buffer, int packet_length);
void debuglogPacket(int16_t from, unsigned char *packet_buffer, int packet_length);
int beautifyPacket(char *buff, unsigned char *packet_buffer, int packet_length);
#endif //PACKETLOGGER_H_