examples/PIPS/opencmessagequeuelibraryex/engine/inc/msgqlib.h File Reference

Go to the source code of this file.

Defines

#define MAX_MSG_LEN   2048
#define MSGQ_TBL_SZ   101
#define MSG_Q_READY   0
#define MSG_Q_CLEANING   1
#define NO_WAIT   0
#define WAIT_FOREVER   0xFFFF
#define KMsgQLibErr   0x100
#define KMsgQLibNoMemoryErr   (KMsgQLibErr | 1)
#define KMsgQLibQIdErr   (KMsgQLibErr | 2)
#define KMsgQLibParamErr   (KMsgQLibErr | 3)
#define KMsgQLibQFlushErr   (KMsgQLibErr | 4)
#define KMsgQLibQShortErr   (KMsgQLibErr | 5)
#define MSG_Q_FIFO   1
#define MSG_Q_PRIORITY   2
#define MSG_PRI_NORMAL   3
#define MSG_PRI_URGENT   4
#define SEM_Q_FIFO   5
#define SEM_Q_PRIORITY   6
#define OK   0
#define ERROR   -1

Typedefs

typedef unsigned long ULONG
typedef unsigned short ushort_t

Functions

IMPORT_C int MsgQCreate (ULONG qName, ULONG maxMsgs, ULONG qOptions, int *err)
IMPORT_C int MsgQDelete (ULONG qName, int *err)
IMPORT_C int MsgQSend (ULONG qName, char *msg, ULONG nBytes, ULONG priority, int timeout, int *err)
IMPORT_C int MsgQReceive (ULONG qName, char *msg, ULONG maxNBytes, int timeout, int *err)
IMPORT_C int MsgQCheck (ULONG qName, int *err)
IMPORT_C int MsgQMaxCheck (ULONG qName, int *err)
IMPORT_C int MsgQClean (ULONG qName, int *err)

Detailed Description

Description: Header file for MsgQLib Copyright (c) 2007 Nokia Corporation. This material, including documentation and any related computer programs, is protected by copyright controlled by Nokia Corporation.

Definition in file msgqlib.h.


Function Documentation

IMPORT_C int MsgQCreate ( ULONG  qName,
ULONG  maxMsgs,
ULONG  qOptions,
int *  err 
)

Creates a message queue with the argument passed

Parameters:
qName - queue name
maxMsgs - max messages in the queue
qOptions - message queue options MSG_Q_FIFO MSG_Q_PRIORITY
err - error code to be returned
Returns:
Returns status and error code

Definition at line 23 of file msgqcreate.c.

IMPORT_C int MsgQDelete ( ULONG  qName,
int *  err 
)

This function deletes a message queue

Parameters:
qName - queue name
err - error code to be returned
Returns:
Returns status and error code

Definition at line 21 of file msgqdelete.c.

IMPORT_C int MsgQSend ( ULONG  qName,
char *  msg,
ULONG  nBytes,
ULONG  priority,
int  timeout,
int *  err 
)

This function sends a message with internal copy

Parameters:
qName - queue name
msg - message to send
nBytes - length of message
priority - message priority
timeout - milliseconds to wait
err - error code to be returned
Returns:
Returns status and error code

Definition at line 22 of file msgqsend.c.

IMPORT_C int MsgQReceive ( ULONG  qName,
char *  msg,
ULONG  maxNBytes,
int  timeout,
int *  err 
)

This function receives a message with internal copy

Parameters:
qName - queue name
msg - buffer for received message
maxNBytes - length of buffer
timeout - milliseconds to wait
err - error code to be returned
Returns:
Returns status and error code

Definition at line 24 of file msgqrecv.c.

IMPORT_C int MsgQCheck ( ULONG  qName,
int *  err 
)

This function checks how many messages are in a queue

Parameters:
qName - queue name
err - error code to be returned
Returns:
Returns status and error code

Definition at line 21 of file msgqcheck.c.

IMPORT_C int MsgQMaxCheck ( ULONG  qName,
int *  err 
)

This function checks the maximum number of messages in a queue

Parameters:
qName - queue name
err - error code to be returned
Returns:
Returns status and error code

Definition at line 19 of file msgqmaxcheck.c.

IMPORT_C int MsgQClean ( ULONG  qName,
int *  err 
)

This function empties the specified queue

Parameters:
qName - queue name
err - error code to be returned
Returns:
Returns status and error code

Definition at line 20 of file msgqclean.c.


Generated by  doxygen 1.6.2