VR-Link API Documentation for DIS
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
include
vlutil
vlShmReader.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 1992-2010 VT MAK
3
** All rights reserved.
4
*********************************************************************/
8
#pragma once
9
10
#include "
vlShmQueue.h
"
11
12
#define DEBUG 0
13
14
#define DtCsStatusMessageReceived 0
15
#define DtCsStatusWouldResourceBlock 1
16
#define DtCsStatusWouldBlock 2
17
#define DtCsStatusClosing 3
18
#define DtCsStatusExtCliQuota 4
19
#define DtCsStatusTryAgain 5
20
21
#define DtCsStatusMessageReceived 0
22
#define DtCsStatusWouldResourceBlock 1
23
#define DtCsStatusWouldBlock 2
24
#define DtCsStatusClosing 3
25
#define DtCsStatusExtCliQuota 4
26
27
#ifdef DtUSE_UTILITIES_NAMESPACE
28
namespace
DtUSE_UTILITIES_NAMESPACE
29
{
30
#endif
31
33
34
class
DT_DLL_VLUTIL
DtClientServerReader
35
{
36
public
:
37
DtClientServerReader
() {};
38
virtual
~DtClientServerReader
() {};
39
40
virtual
int
Read(
char
*buf,
size_t
size,
char
*status) = 0;
41
};
42
43
class
DT_DLL_VLUTIL
DtShmMsgQueueReader
:
public
DtClientServerReader
44
{
45
public
:
46
47
DtShmMsgQueueManager
qManager
;
48
49
DtShmMsgQueueReader
(
DtShmMsgQueue
*q,
int
size,
int
sem,
int
firstSem,
50
bool
wait,
bool
pleaseInit,
bool
dropOldest =
true
);
51
52
virtual
~DtShmMsgQueueReader
() {}
53
54
int
Read(
char
*buf,
size_t
size,
char
*status);
55
56
bool
isInternal
() {
return
qManager.isInternal(); }
57
int
msgsRcvd
() {
return
msgsRead; }
58
59
bool
resourceWait
;
60
61
private
:
62
63
int
msgsRead
;
64
65
#if DEBUG
66
int
verifyQueue(
void
);
67
#endif
68
69
};
70
71
#ifdef DtUSE_UTILITIES_NAMESPACE
72
}
73
#endif
74
Document ID: Generated on Wed Oct 23 22:25:48 EDT 2013 from SVN revision 132765
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)