Added Software projects

git-svn-id: file:///srv/dev-disk-by-uuid-17e88007-4d0c-45e0-8757-cacfcc458630/repositories/svn/Diplomarbeit@55 9fe90eed-be63-e94b-8204-d34ff4c2ff93
This commit is contained in:
Matthias
2008-12-23 10:34:08 +00:00
parent ee5a771818
commit 373a8c32b2
348 changed files with 86781 additions and 0 deletions
@@ -0,0 +1,73 @@
/* ---------------------------------------------------------------------------
* MessageQueue.h - v0.1 (c) 2008 Micro-key bv
* ---------------------------------------------------------------------------
* Micro-key bv
* Industrieweg 28, 9804 TG Noordhorn
* Postbus 92, 9800 AB Zuidhorn
* The Netherlands
* Tel: +31 594 503020
* Fax: +31 594 505825
* Email: support@microkey.nl
* Web: www.microkey.nl
* ---------------------------------------------------------------------------
* Description:
* ---------------------------------------------------------------------------
* Version(s): 0.1, Jan 29, 2008, FSc
* Creation.
* ---------------------------------------------------------------------------
*/
#ifndef __MESSAGEQUEUE_H__
#define __MESSAGEQUEUE_H__
/** \file MessageQueue.h
\brief
*/
/* ---------------------------------------------------------------------------
* System include files.
* ---------------------------------------------------------------------------
*/
#include <pthread.h>
/* ---------------------------------------------------------------------------
* Application include files.
* ---------------------------------------------------------------------------
*/
#include "BpMessageFormat.h"
/* ---------------------------------------------------------------------------
* Constant and macro definitions.
* ---------------------------------------------------------------------------
*/
#define TX_QUEUE_SIZE (20)
/* ---------------------------------------------------------------------------
* Type definitions.
* ---------------------------------------------------------------------------
*/
typedef struct t_mq_MESSAGEQUEUE
{
t_bpmsg_message messages[TX_QUEUE_SIZE];
UINT8 head;
UINT8 tail;
UINT8 count;
pthread_mutex_t mutex;
} t_mq_messagequeue;
/* ---------------------------------------------------------------------------
* Variable declarations.
* ---------------------------------------------------------------------------
*/
/* ---------------------------------------------------------------------------
* Function declarations.
* ---------------------------------------------------------------------------
*/
t_mq_messagequeue *mqInit();
RESULT mqAdd( t_mq_messagequeue *queue, t_bpmsg_message *message);
RESULT mqGet( t_mq_messagequeue *queue, t_bpmsg_message *message);
BOOLEAN mqEmpty( t_mq_messagequeue *queue );
#endif /* __MESSAGEQUEUE_H__ */