Instrument Neutral Distributed Interface INDI
2.0.2
integs
SharedBuffer.h
Go to the documentation of this file.
1
/*******************************************************************************
2
Copyright(c) 2022 Ludovic Pollet. All rights reserved.
3
4
This library is free software; you can redistribute it and/or
5
modify it under the terms of the GNU Library General Public
6
License version 2 as published by the Free Software Foundation.
7
8
This library is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
Library General Public License for more details.
12
13
You should have received a copy of the GNU Library General Public License
14
along with this library; see the file COPYING.LIB. If not, write to
15
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16
Boston, MA 02110-1301, USA.
17
*******************************************************************************/
18
19
#ifndef SHAREDBUFFER_H_
20
#define SHAREDBUFFER_H_ 1
21
22
class
SharedBuffer
23
{
24
int
fd;
25
ssize_t size;
26
27
public
:
28
SharedBuffer
();
29
~SharedBuffer
();
30
31
int
getFd
()
const
;
32
33
void
allocate
(ssize_t size);
34
void
write
(
const
void
*
buffer
, ssize_t offset, ssize_t size);
35
void
release
();
36
37
void
attach
(
int
fd
);
38
39
ssize_t
getSize
()
const
40
{
41
return
size;
42
}
43
};
44
45
#endif
// SHAREDBUFFER_H_
46
47
48
49
SharedBuffer
Definition:
SharedBuffer.h:23
SharedBuffer::getFd
int getFd() const
Definition:
SharedBuffer.cpp:91
SharedBuffer::attach
void attach(int fd)
Definition:
SharedBuffer.cpp:60
SharedBuffer::allocate
void allocate(ssize_t size)
Definition:
SharedBuffer.cpp:130
SharedBuffer::getSize
ssize_t getSize() const
Definition:
SharedBuffer.h:39
SharedBuffer::write
void write(const void *buffer, ssize_t offset, ssize_t size)
Definition:
SharedBuffer.cpp:101
SharedBuffer::SharedBuffer
SharedBuffer()
Definition:
SharedBuffer.cpp:49
SharedBuffer::release
void release()
Definition:
SharedBuffer.cpp:81
SharedBuffer::~SharedBuffer
~SharedBuffer()
Definition:
SharedBuffer.cpp:55
fd
int fd
Definition:
intelliscope.c:43
Aux::buffer
std::vector< uint8_t > buffer
Definition:
celestronauxpacket.h:38
Generated on Sat May 13 2023 14:24:24 for Instrument Neutral Distributed Interface INDI by
1.9.1