VR-Link API Documentation for HLA 1516
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
vlutil
vlShmWriter.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
#ifdef DtUSE_UTILITIES_NAMESPACE
13
namespace
DtUSE_UTILITIES_NAMESPACE
14
{
15
#endif
16
17
#define DEBUG 0
18
19
class
DT_DLL_VLUTIL
DtClientServerWriter
20
{
21
public
:
22
DtClientServerWriter
() {};
23
virtual
~DtClientServerWriter
() {};
24
25
virtual
int
Write (
char
*buf,
size_t
size) = 0;
26
virtual
int
Writev (
char
**buflist,
size_t
*sizelist,
int
n) = 0;
27
28
};
29
30
class
DT_DLL_VLUTIL
DtShmMsgQueueWriter
:
public
DtClientServerWriter
31
{
32
public
:
33
34
DtShmMsgQueueWriter
(
DtShmMsgQueue
*q,
int
size,
int
sem,
int
firstSem,
35
bool
wait,
bool
pleaseInit,
bool
dropOldest =
true
);
36
37
virtual
~DtShmMsgQueueWriter
() {}
38
39
virtual
int
Write (
char
*buf,
size_t
size);
40
virtual
int
Writev (
char
**buflist,
size_t
*sizelist,
int
n);
41
42
void
setInternal
(
int
mode) {qManager.setInternal(mode); }
43
void
setGoAway
(
int
mode) {qManager.setGoAway(mode); }
44
int
newDropped
() {
return
newLost; }
45
int
oldDropped
() {
return
oldLost; }
46
int
msgsSent
() {
return
notLost; }
47
48
DtShmMsgQueueManager
qManager
;
49
bool
resourceWait
;
50
int
queueBack
;
51
52
private
:
53
54
int
enqueuev (
char
**buflist,
size_t
*sizelist,
int
n,
int
totalSize);
55
void
copyv(
char
**buflist,
size_t
*sizelist,
int
n,
int
endSize);
56
int
findSpace(
int
start,
int
request,
int
*available);
57
void
moveFront(
void
);
58
59
int
newLost
;
60
int
oldLost
;
61
int
notLost
;
62
65
int
verifyQueue(
void
);
66
#if DEBUG
67
#endif
68
69
70
};
71
72
#ifdef DtUSE_UTILITIES_NAMESPACE
73
}
74
#endif
75
76
Document ID: Generated on Mon Jun 22 21:18:40 EDT 2020 from SVN revision 213785
Copyright © 2005-2018 MAK Technologies. All Rights Reserved (
www.mak.com
)