ipc2: started working on event-based ipc handling.
This commit is contained in:
38
aqhome/ipc2/msgreader_p.h
Normal file
38
aqhome/ipc2/msgreader_p.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/****************************************************************************
|
||||
* 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
|
||||
|
||||
Reference in New Issue
Block a user