39 lines
868 B
C
39 lines
868 B
C
/****************************************************************************
|
|
* This file is part of the project AqHome.
|
|
* AqHome (c) by 2025 Martin Preuss, all rights reserved.
|
|
*
|
|
* The license for this file can be found in the file COPYING which you
|
|
* should have received along with this file.
|
|
****************************************************************************/
|
|
|
|
#ifndef AQH_MSGREADER_P_H
|
|
#define AQH_MSGREADER_P_H
|
|
|
|
|
|
#include "./msgreader.h"
|
|
|
|
#include <gwenhywfar/ringbuffer.h>
|
|
|
|
#define AQH_MSG_READER_RINGBUFFER_SIZE 1024
|
|
#define AQH_MSG_READER_HEADERBUFFER_SIZE 4
|
|
|
|
|
|
typedef struct AQH_MSG_READER AQH_MSG_READER;
|
|
struct AQH_MSG_READER {
|
|
int fdSocket;
|
|
AQH_OBJECT *fdObject;
|
|
GWEN_RINGBUFFER *ringBuffer;
|
|
|
|
int bytesReceived;
|
|
int bytesLeft;
|
|
uint8_t headerBuffer[AQH_MSG_READER_HEADERBUFFER_SIZE];
|
|
uint8_t *currentMsgBuf;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|