📄 message_queue.h
字号:
/******************************************************************************
*******************************************************************************
** **
** Copyright (c) 2006 Videon Central, Inc. **
** All rights reserved. **
** **
** The computer program contained herein contains proprietary information **
** which is the property of Videon Central, Inc. The program may be used **
** and/or copied only with the written permission of Videon Central, Inc. **
** or in accordance with the terms and conditions stipulated in the **
** agreement/contract under which the programs have been supplied. **
** **
*******************************************************************************
******************************************************************************/
/**
* @file message_queue.h
*
* $Revision: 1.4 $
*
* Implements a Message Queue class
*
*/
#ifndef __MESSAGE_QUEUE_H
#define __MESSAGE_QUEUE_H
#include "mutex.h"
#include "reference_counter.h"
#include "osapi.h"
class MessageQueue : public ReferenceCounter
{
private:
Mutex m_mutex;
OS_MSG_Q_ID m_messageQueueHandle;
uint32 m_queueSize;
uint32 m_messageSize;
VDVD_ERROR Construct ( void );
VDVD_ERROR Destruct ( void );
public:
MessageQueue ( void );
VDVD_ERROR Create ( uint32 queueSize, uint32 messageSize );
VDVD_ERROR Destroy ( void );
VDVD_ERROR Send ( void* message );
VDVD_ERROR Receive ( void* message, int timeoutMilliseconds = OS_WAIT_FOREVER );
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -