Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: b2326eec8630b9ac5ecadb6b32f6670b199422f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*******************************************************************************
 * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * CONTRIBUTORS:
 * 		Thomas Schuetz (initial contribution)
 *
 *******************************************************************************/

#ifndef _RMESSAGEQUEUE_H_
#define _RMESSAGEQUEUE_H_

#include "RMessage.h"
#include <stddef.h>

typedef struct RMessageQueue {
	RMessage* first;
	RMessage* last;
	int16 highWaterMark;
	int16 size;

} RMessageQueue;

void RMessageQueue_init(RMessageQueue* self);

void RMessageQueue_push(RMessageQueue* self, RMessage* msg);

RMessage* RMessageQueue_pop(RMessageQueue* self);

int16 RMessageQueue_getSize(RMessageQueue* self);

RMessage* RMessageQueue_getFirst(RMessageQueue* self);

RMessage* RMessageQueue_getLast(RMessageQueue* self);

boool RMessageQueue_isNotEmpty(RMessageQueue* self);

int16 RMessageQueue_getHightWaterMark(RMessageQueue* self);



#endif /* _RMESSAGEQUEUE_H_ */

Back to the top